Skip to content

Commit 130356c

Browse files
author
Shuwen Qian
committed
Remove vendor prefix mixins in favor of autoprefixer
1 parent 7718ea4 commit 130356c

30 files changed

Lines changed: 140 additions & 125 deletions

File tree

docs/docs.scss

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ section:last-child {
149149
}
150150

151151
.docs-logo {
152-
@include display(flex);
153-
@include align-items(center);
154-
@include justify-content(center);
152+
display: flex;
153+
align-items: center;
154+
justify-content: center;
155155
position: relative;
156156
box-sizing: border-box;
157157
height: 100%;
@@ -178,9 +178,9 @@ section:last-child {
178178
height: 100%;
179179

180180
.footer-logo-box {
181-
@include display(flex);
182-
@include align-items(center);
183-
@include justify-content(center);
181+
display: flex;
182+
align-items: center;
183+
justify-content: center;
184184
}
185185

186186
.powered-by,
@@ -307,8 +307,8 @@ table {
307307
/* -- -- -- -- -- -- -- -- -- -- -- -- -- */
308308
/* example styling */
309309
.example {
310-
@include display(flex);
311-
@include flex-direction(column);
310+
display: flex;
311+
flex-direction: column;
312312
@include justify-content(flex-start);
313313
box-sizing: border-box;
314314
padding: 1.25em;
@@ -351,10 +351,10 @@ table {
351351
/* -- -- -- -- -- -- -- -- -- -- -- -- -- */
352352
/* intro specific styling */
353353
.hp-header {
354-
@include display(flex);
355-
@include align-items(center);
356-
@include justify-content(space-between);
357-
@include flex-direction(row);
354+
display: flex;
355+
align-items: center;
356+
justify-content: space-between;
357+
flex-direction: row;
358358
width: 100%;
359359
background: $mainNavBg;
360360

@@ -394,9 +394,9 @@ table {
394394
}
395395

396396
.intro-content.top {
397-
@include display(flex);
398-
@include align-items(center);
399-
@include flex-direction(row);
397+
display: flex;
398+
align-items: center;
399+
flex-direction: row;
400400
box-sizing: border-box;
401401

402402
.hero-image {
@@ -418,8 +418,8 @@ table {
418418
}
419419

420420
.intro-content.bottom {
421-
@include display(flex);
422-
@include flex-direction(row);
421+
display: flex;
422+
flex-direction: row;
423423
box-sizing: border-box;
424424

425425
.hero-block {
@@ -494,8 +494,8 @@ table {
494494

495495
.intro-block {
496496
.intro-content.top {
497-
@include align-items(flex-start);
498-
@include flex-direction(column);
497+
align-items: flex-start;
498+
flex-direction: column;
499499

500500
.hero-image {
501501
width: 50%;
@@ -521,7 +521,7 @@ table {
521521
}
522522

523523
.intro-content.bottom {
524-
@include flex-direction(column);
524+
flex-direction: column;
525525

526526
.hero-block {
527527
width: 100%;
@@ -541,7 +541,7 @@ table {
541541

542542
.docs-footer {
543543
.footer-logo-box {
544-
@include flex-direction(row);
544+
flex-direction: row;
545545
}
546546
}
547547
}
@@ -557,9 +557,9 @@ table {
557557
}
558558

559559
.hp-header {
560-
@include align-items(flex-start);
561-
@include justify-content(center);
562-
@include flex-direction(column);
560+
align-items: flex-start;
561+
justify-content: center;
562+
flex-direction: column;
563563

564564
.docs-logo {
565565
display: none;
@@ -568,7 +568,7 @@ table {
568568

569569
.docs-footer {
570570
.footer-logo-box {
571-
@include flex-direction(column);
571+
flex-direction: column;
572572
}
573573

574574
.powered-by,

grunt/tasks/build.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ module.exports = function(grunt) {
6868
}
6969
},
7070

71+
postcss: {
72+
options: {
73+
processors: [
74+
require('autoprefixer')({browsers: 'last 2 versions'})
75+
]
76+
},
77+
dist: {
78+
src: '<%= build_dir %>/**/*.css'
79+
}
80+
},
81+
7182
uglify: {
7283
dist: {
7384
files: [{
@@ -324,6 +335,7 @@ module.exports = function(grunt) {
324335
'clean:build',
325336
'copy:build',
326337
'sass:dist',
338+
'postcss',
327339
'cssUrlEmbed',
328340
'style:imports',
329341
'hogan_static:fonts',
@@ -339,6 +351,7 @@ module.exports = function(grunt) {
339351
'clean:build',
340352
'copy:build',
341353
'sass:dev',
354+
'postcss',
342355
'style:imports',
343356
'hogan_static:fonts',
344357
'hogan_static:index'

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
],
1515
"license": "BSD",
1616
"devDependencies": {
17+
"autoprefixer": "^6.0.3",
1718
"grunt": "*",
1819
"grunt-banner": "^0.3.1",
1920
"grunt-bump": "^0.3.0",
@@ -27,6 +28,7 @@
2728
"grunt-github-changes": "0.0.6",
2829
"grunt-hogan-static": "0.3.0",
2930
"grunt-jsonlint": "^1.0.4",
31+
"grunt-postcss": "^0.7.0",
3032
"grunt-sass": "*",
3133
"grunt-shell": "^1.1.2",
3234
"grunt-text-replace": "^0.4.0",

src/mm-action/mm-action.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
}
2525

2626
.action {
27-
@include display(inline-flex);
28-
@include align-items(center);
27+
display: inline-flex;
28+
align-items: center;
2929

3030
color: inherit;
3131
cursor: pointer;

src/mm-button/mm-button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535

3636
.button.fit {
3737
@include fitContent();
38-
@include justify-content(center);
38+
justify-content: center;
3939
}

src/mm-calendar/mm-calendar.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@
4545
}
4646

4747
.month-year {
48-
@include display(flex);
49-
@include align-items(center);
50-
@include justify-content(space-between);
48+
display: flex;
49+
align-items: center;
50+
justify-content: space-between;
5151
margin-bottom: 4px;
5252

5353
.left-arrow, .right-arrow {
5454
cursor: pointer;
5555
}
5656

5757
.left-arrow {
58-
@include transform(scaleX(-1));
58+
transform: scaleX(-1);
5959
}
6060
}
6161

@@ -128,7 +128,7 @@
128128
&.last.selected {
129129
&::before {
130130
@include pointerBg($color-D15);
131-
@include transform(scaleX(-1));
131+
transform: scaleX(-1);
132132
left: -3px;
133133
}
134134
}
@@ -164,7 +164,7 @@
164164
&.last.selected:hover {
165165
&::before {
166166
@include pointerBg($color-D21);
167-
@include transform(scaleX(-1));
167+
transform: scaleX(-1);
168168
left: -3px;
169169
}
170170
}

src/mm-checkbox/mm-checkbox.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
margin-right: 7px;
1818
cursor: pointer;
1919
white-space: nowrap;
20-
@include user-select(none);
20+
user-select: none;
2121

2222
.icon {
2323
color: inherit;
@@ -40,13 +40,13 @@
4040
:host(:active) .checkbox {
4141
border-color: $color-A17;
4242
box-shadow: inset 1px 1px 0 $color-A18;
43-
@include background-image(linear-gradient(bottom, $color-A15 0%, $color-A16 100%));
43+
background-image: linear-gradient(to top, $color-A15 0%, $color-A16 100%);
4444

4545
&.partial,
4646
&.selected {
4747
border-color: $color-D18;
4848
box-shadow: inset 1px 1px 0 $color-D19;
49-
@include background-image(linear-gradient(bottom, $color-D16 0%, $color-D17 100%));
49+
background-image: linear-gradient(to top, $color-D16 0%, $color-D17 100%);
5050
}
5151
}
5252

@@ -63,7 +63,7 @@
6363
border-radius: 3px;
6464
background-color: $color-A14;
6565
box-shadow: inset 0 1px 0 rgba(255,255,255,.27);
66-
@include background-image(linear-gradient(bottom, $color-A9 0%, $color-F0 100%));
66+
background-image: linear-gradient(to top, $color-A9 0%, $color-F0 100%);
6767
width:16px;
6868
height: 16px;
6969
position: relative;
@@ -96,7 +96,7 @@
9696
&.selected {
9797
border-color: $color-D13;
9898
box-shadow: inset 1px 1px 0 rgba(255,255,255,.2);
99-
@include background-image(linear-gradient(bottom, $color-D14 0%, $color-D15 100%));
99+
background-image: linear-gradient(to top, $color-D14 0%, $color-D15 100%);
100100
}
101101
}
102102

src/mm-docs-nav/mm-docs-nav.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
}
2121

2222
#labelArea {
23-
@include display(flex);
24-
@include align-items(center);
25-
@include justify-content(space-between);
23+
display: flex;
24+
align-items: center;
25+
justify-content: space-between;
2626
box-sizing: border-box;
2727
padding: 10px 20px;
2828

2929
& > ::content mm-header, mm-icon {
3030
pointer-events: none;
31-
@include user-select(none);
31+
user-select: none;
3232
}
3333

3434
mm-icon.opened {
35-
@include transform(scaleY(-1));
35+
transform: scaleY(-1);
3636
}
3737
}
3838

src/mm-docs-shell/mm-docs-shell.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
}
4545

4646
.mobile-header-box {
47-
@include display(flex);
48-
@include align-items(center);
47+
display: flex;
48+
align-items: center;
4949

5050
position: absolute;
5151
left: 0;

src/mm-drawer/mm-drawer.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#container {
3333
overflow: hidden;
34-
@include transition(height 0.3s ease-in-out);
34+
transition: height 0.3s ease-in-out;
3535
}
3636

3737
#content {
@@ -40,10 +40,10 @@
4040

4141
#toggle {
4242
@include fontSmoothing();
43-
@include user-select(none);
43+
user-select: none;
4444
position: absolute;
4545
left: 50%;
46-
@include transform(translateX(-50%));
46+
transform: translateX(-50%);
4747
padding: 5px 7px;
4848
background: inherit;
4949
border: inherit;
@@ -56,12 +56,12 @@
5656
mm-icon {
5757
color: #525252;
5858
vertical-align: inherit;
59-
@include transform(scaleY(-1));
59+
transform: scaleY(-1);
6060
}
6161

6262
&.expanded {
6363
mm-icon {
64-
@include transform(scaleY(1));
64+
transform: scaleY(1);
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)