Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 8b4d2f9

Browse files
devversionThomasBurleson
authored andcommitted
chore(docs): autoprefix docs stylesheet (#9800)
* Uses the shared autoprefixer from the gulp utils to autoprefix the docs CSS (instead of always doing it manually as in #9786) > Kept a few special properties like (`-webkit-font-smoothing` because those can't be autoprefixed) Closes #9785
1 parent 7e49c78 commit 8b4d2f9

File tree

5 files changed

+17
-70
lines changed

5 files changed

+17
-70
lines changed

docs/app/css/layout-demo.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ demo-include {
7676
}
7777
[ng-panel] {
7878
transition: 0.45s cubic-bezier(0.35, 0, 0.25, 1);
79-
-webkit-transition: 0.45s cubic-bezier(0.35, 0, 0.25, 1);
8079
position: absolute;
8180
left: 0;
8281
top: 0;

docs/app/css/style.css

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ body.docs-body {
3737
position: fixed !important;
3838

3939
transform: scale(0);
40-
41-
/* Manually prefix because the docs won't be prefixed. See #9785 */
42-
-webkit-transition: transform 0.2s;
43-
-moz-transition: transform 0.2s;
44-
-o-transition: transform 0.2s;
4540
transition: transform 0.2s;
4641
}
4742

@@ -70,7 +65,7 @@ body.docs-body {
7065
}
7166

7267
.training_info {
73-
opacity:0.4;
68+
opacity: 0.4;
7469
text-transform: none;
7570
}
7671
/***************
@@ -79,10 +74,6 @@ body.docs-body {
7974
a {
8075
text-decoration: none;
8176
font-weight: 400;
82-
-webkit-transition: border-bottom 0.35s;
83-
-moz-transition: border-bottom 0.35s;
84-
-ms-transition: border-bottom 0.35s;
85-
-o-transition: border-bottom 0.35s;
8677
transition: border-bottom 0.35s;
8778
}
8879
h1, h2, h3, h4, h5, h6 {
@@ -184,8 +175,6 @@ ul.skip-links li a {
184175
text-decoration: none;
185176
top: 0;
186177
width: 92%;
187-
-webkit-transition: opacity 0.15s linear;
188-
-moz-transition: opacity 0.15s linear;
189178
transition: opacity 0.15s linear;
190179
}
191180
ul.skip-links li a:focus {
@@ -362,19 +351,10 @@ body[dir=rtl] .menu-heading {
362351
text-align: right;
363352
}
364353

365-
366-
.docs-menu li.parentActive,
367-
.docs-menu li.parentActive .menu-toggle-list {
368-
/*background-color: #2C80D2 !important;*/
369-
}
370354
.menu-toggle-list {
371355
overflow: hidden;
372356
position: relative;
373357
z-index: 1;
374-
-webkit-transition: 0.75s cubic-bezier(0.35, 0, 0.25, 1);
375-
-webkit-transition-property: height;
376-
-moz-transition: 0.75s cubic-bezier(0.35, 0, 0.25, 1);
377-
-moz-transition-property: height;
378358
transition: 0.75s cubic-bezier(0.35, 0, 0.25, 1);
379359
transition-property: height;
380360
}
@@ -398,13 +378,10 @@ body[dir=rtl] .menu-heading {
398378
speak: none;
399379
vertical-align: middle;
400380
transform: rotate(180deg);
401-
-webkit-transform: rotate(180deg);
402381
transition: transform 0.3s ease-in-out;
403-
-webkit-transition: -webkit-transform 0.3s ease-in-out;
404382
}
405383
.md-button-toggle .md-toggle-icon.toggled {
406384
transform: rotate(0deg);
407-
-webkit-transform: rotate(0deg);
408385
}
409386

410387
/* End Docs Menu */
@@ -500,14 +477,12 @@ docs-demo {
500477
.demo-container {
501478
border-radius: 4px;
502479
margin-bottom: 16px;
503-
-webkit-transition: 0.02s padding cubic-bezier(0.35, 0, 0.25, 1);
504480
transition: 0.02s padding cubic-bezier(0.35, 0, 0.25, 1);
505481
position: relative;
506482
padding-bottom: 0;
507483
}
508484
.demo-source-tabs {
509485
z-index: 1;
510-
-webkit-transition: all 0.45s cubic-bezier(0.35, 0, 0.25, 1);
511486
transition: all 0.45s cubic-bezier(0.35, 0, 0.25, 1);
512487
height: 448px;
513488
background: #fff;
@@ -542,12 +517,6 @@ md-tabs.demo-source-tabs .active md-tab-label {
542517
}
543518
.demo-content {
544519
position: relative;
545-
overflow:hidden;
546-
display: -webkit-box;
547-
display: -webkit-flex;
548-
display: -moz-box;
549-
display: -moz-flex;
550-
display: -ms-flexbox;
551520
display: flex;
552521
}
553522
.small-demo .demo-source-tabs:not(.ng-hide) {
@@ -558,19 +527,9 @@ md-tabs.demo-source-tabs .active md-tab-label {
558527
}
559528

560529
.doc-content > * {
561-
-webkit-box-flex: 1 1 auto;
562-
-webkit-flex: 1 1 auto;
563-
-moz-box-flex: 1 1 auto;
564-
-moz-flex: 1 1 auto;
565-
-ms-flex: 1 1 auto;
566530
flex: 1 1 auto;
567531
}
568532
.demo-content > * {
569-
-webkit-box-flex: 1 1 0%;
570-
-webkit-flex: 1 1 0%;
571-
-moz-box-flex: 1 1 0%;
572-
-moz-flex: 1 1 0%;
573-
-ms-flex: 1 1 0%;
574533
flex: 1 1 0%;
575534
}
576535

@@ -613,8 +572,6 @@ md-toolbar.demo-toolbar .md-button.active, md-toolbar.demo-toolbar .md-button.ac
613572
}
614573

615574
md-toolbar.demo-toolbar .md-button {
616-
-webkit-transition: all 0.3s linear;
617-
-moz-transition: all 0.3s linear;
618575
transition: all 0.3s linear;
619576
color: #616161;
620577
}
@@ -669,7 +626,6 @@ ul.buckets li a {
669626
font-weight: 500;
670627
padding: 16px 0;
671628
text-decoration: none;
672-
-webkit-transition: all 0.45s cubic-bezier(0.35, 0, 0.25, 1);
673629
background-color: #f6f6f6 !important;
674630
box-shadow: none !important;
675631
margin-right: 0;
@@ -719,9 +675,6 @@ header.api-profile-header > h2 {
719675
margin-right: 8px;
720676
text-align: center;
721677
margin-top: 14px;
722-
-webkit-align-self: flex-start;
723-
-moz-align-self: flex-start;
724-
-ms-flex-item-align: start;
725678
align-self: flex-start;
726679
}
727680
.api-params-title {
@@ -739,8 +692,6 @@ ul.methods .method-function-syntax {
739692
font-weight: normal;
740693
font-size: 2.0rem;
741694
margin: 0;
742-
-webkit-margin-before: 0;
743-
-webkit-margin-after: 0;
744695
}
745696

746697
h3 .method-function-syntax {
@@ -910,11 +861,7 @@ docs-demo .doc-demo-content {
910861
}
911862

912863
.no-transition {
913-
-webkit-transition: none !important;
914-
-moz-transition: none !important;
915-
-ms-transition: none !important;
916-
-o-transition: none !important;
917-
transition: none !important;
864+
transition: none !important;
918865
}
919866

920867
table.attributes, table.md-api-table {

docs/gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ gulp.task('docs-css', ['docs-app', 'build', 'docs-css-dependencies'], function()
153153
'docs/app/css/style.css'
154154
])
155155
.pipe(concat('docs.css'))
156+
.pipe(utils.autoprefix())
156157
.pipe(gulp.dest('dist/docs'));
157158
});
158159

gulp/util.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var path = require('path');
88
var rename = require('gulp-rename');
99
var filter = require('gulp-filter');
1010
var concat = require('gulp-concat');
11-
var autoprefixer = require('gulp-autoprefixer');
1211
var series = require('stream-series');
1312
var lazypipe = require('lazypipe');
1413
var glob = require('glob').sync;
@@ -29,7 +28,7 @@ var ROOT = constants.ROOT;
2928
var utils = require('../scripts/gulp-utils.js');
3029

3130
exports.buildJs = buildJs;
32-
exports.autoprefix = autoprefix;
31+
exports.autoprefix = utils.autoprefix;
3332
exports.buildModule = buildModule;
3433
exports.filterNonCodeFiles = filterNonCodeFiles;
3534
exports.readModuleArg = readModuleArg;
@@ -73,17 +72,6 @@ function buildJs () {
7372
}
7473
}
7574

76-
function autoprefix () {
77-
78-
return autoprefixer({browsers: [
79-
'last 2 versions',
80-
'not ie <= 10',
81-
'not ie_mob <= 10',
82-
'last 4 Android versions',
83-
'Safari >= 8'
84-
]});
85-
}
86-
8775
function minifyCss(extraOptions) {
8876
var options = {
8977
autoprefixer: false,
@@ -190,7 +178,7 @@ function buildModule(module, opts) {
190178
.pipe(gulpif, /default-theme.scss/, concat(name + '-default-theme.scss'))
191179
.pipe(sass)
192180
.pipe(dedupeCss)
193-
.pipe(autoprefix)
181+
.pipe(utils.autoprefix)
194182
(); // Invoke the returning lazypipe function to create our new pipe.
195183
}
196184

scripts/gulp-utils.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var filter = require('gulp-filter');
33
var through2 = require('through2');
44
var lazypipe = require('lazypipe');
55
var gutil = require('gulp-util');
6+
var autoprefixer = require('gulp-autoprefixer');
67
var Buffer = require('buffer').Buffer;
78
var fs = require('fs');
89

@@ -309,3 +310,14 @@ exports.cssToNgConstant = function(ngModule, factoryName) {
309310
next();
310311
});
311312
};
313+
314+
exports.autoprefix = function() {
315+
316+
return autoprefixer({browsers: [
317+
'last 2 versions',
318+
'not ie <= 10',
319+
'not ie_mob <= 10',
320+
'last 4 Android versions',
321+
'Safari >= 8'
322+
]});
323+
};

0 commit comments

Comments
 (0)