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

Commit b4e170f

Browse files
committed
Merge pull request #12 from maximkoretskiy/feature/add_initial_support
Add postcss-initial
2 parents cd4988a + e27cd6f commit b4e170f

File tree

5 files changed

+177
-60
lines changed

5 files changed

+177
-60
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"postcss-custom-properties": "^5.0.0",
4949
"postcss-custom-selectors": "^3.0.0",
5050
"postcss-font-variant": "^2.0.0",
51+
"postcss-initial": "^1.3.1",
5152
"postcss-media-minmax": "^2.1.0",
5253
"postcss-pseudo-class-any-link": "^1.0.0",
5354
"postcss-pseudoelements": "^3.0.0",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
a {
2+
all: initial;
3+
}
4+
5+
a {
6+
animation: initial;
7+
background: initial;
8+
border: initial;
9+
column-rule: initial;
10+
font: initial;
11+
list-style: initial;
12+
outline: initial;
13+
text-decoration: initial;
14+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
a {
2+
animation: none 0s ease 0s 1 normal none running;
3+
backface-visibility: visible;
4+
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
5+
border: medium none currentColor;
6+
border-collapse: separate;
7+
border-image: none;
8+
border-radius: 0;
9+
border-spacing: 0;
10+
bottom: auto;
11+
box-shadow: none;
12+
box-sizing: content-box;
13+
caption-side: top;
14+
clear: none;
15+
clip: auto;
16+
color: inherit;
17+
columns: auto;
18+
column-count: auto;
19+
column-fill: balance;
20+
column-gap: normal;
21+
column-rule: medium none currentColor;
22+
column-span: 1;
23+
column-width: auto;
24+
content: normal;
25+
counter-increment: none;
26+
counter-reset: none;
27+
cursor: auto;
28+
direction: ltr;
29+
display: inline;
30+
empty-cells: show;
31+
float: none;
32+
font: normal normal normal normal medium/normal inherit;
33+
height: auto;
34+
hyphens: none;
35+
left: auto;
36+
letter-spacing: normal;
37+
list-style: disc outside none;
38+
margin: 0;
39+
max-height: none;
40+
max-width: none;
41+
min-height: 0;
42+
min-width: 0;
43+
opacity: 1;
44+
orphans: 0;
45+
outline: medium none invert;
46+
overflow: visible;
47+
overflow-x: visible;
48+
overflow-y: visible;
49+
padding: 0;
50+
page-break-after: auto;
51+
page-break-before: auto;
52+
page-break-inside: auto;
53+
perspective: none;
54+
perspective-origin: 50% 50%;
55+
position: static;
56+
right: auto;
57+
tab-size: 8;
58+
table-layout: auto;
59+
text-align: inherit;
60+
text-align-last: auto;
61+
text-decoration: none solid currentColor;
62+
text-indent: 0;
63+
text-shadow: none;
64+
text-transform: none;
65+
top: auto;
66+
transform: none;
67+
transform-origin: 50% 50% 0;
68+
transform-style: flat;
69+
transition: none 0s ease 0s;
70+
unicode-bidi: normal;
71+
vertical-align: baseline;
72+
visibility: visible;
73+
white-space: normal;
74+
widows: 0;
75+
width: auto;
76+
word-spacing: normal;
77+
z-index: auto;
78+
all: initial;
79+
}
80+
81+
a {
82+
animation: none 0s ease 0s 1 normal none running;
83+
animation: initial;
84+
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
85+
background: initial;
86+
border: medium none currentColor;
87+
border: initial;
88+
column-rule: medium none currentColor;
89+
column-rule: initial;
90+
font: normal normal normal normal medium/normal inherit;
91+
font: initial;
92+
list-style: disc outside none;
93+
list-style: initial;
94+
outline: medium none invert;
95+
outline: initial;
96+
text-decoration: none solid currentColor;
97+
text-decoration: initial;
98+
}

src/features-activation-map.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default {
1919
// fontVariant: [ null ],
2020
// @todo can be done using a callback, this is only used for Firefox < 35
2121
// filter: [ null ],
22+
initial: [ "css-all", "css-initial-value" ],
2223
rem: [ "rem" ],
2324
pseudoElements: [ "css-gencontent" ],
2425
// pseudoClassMatches: [ null ],

src/features.js

Lines changed: 63 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,63 @@
1-
export default {
2-
// Reminder: order is important
3-
customProperties(options) {
4-
return require("postcss-custom-properties")(options)
5-
},
6-
calc(options) {
7-
return require("postcss-calc")(options)
8-
},
9-
customMedia(options) {
10-
return require("postcss-custom-media")(options)
11-
},
12-
mediaQueriesRange(options) {
13-
return require("postcss-media-minmax")(options)
14-
},
15-
customSelectors(options) {
16-
return require("postcss-custom-selectors")(options)
17-
},
18-
colorRebeccapurple(options) {
19-
return require("postcss-color-rebeccapurple")(options)
20-
},
21-
colorHwb(options) {
22-
return require("postcss-color-hwb")(options)
23-
},
24-
colorGray(options) {
25-
return require("postcss-color-gray")(options)
26-
},
27-
colorHexAlpha(options) {
28-
return require("postcss-color-hex-alpha")(options)
29-
},
30-
colorFunction(options) {
31-
return require("postcss-color-function")(options)
32-
},
33-
fontVariant(options) {
34-
return require("postcss-font-variant")(options)
35-
},
36-
filter(options) {
37-
return require("pleeease-filters")(options)
38-
},
39-
rem(options) {
40-
return require("pixrem")(options)
41-
},
42-
pseudoElements(options) {
43-
return require("postcss-pseudoelements")(options)
44-
},
45-
pseudoClassMatches(options) {
46-
return require("postcss-selector-matches")(options)
47-
},
48-
pseudoClassNot(options) {
49-
return require("postcss-selector-not")(options)
50-
},
51-
pseudoClassAnyLink(options) {
52-
return require("postcss-pseudo-class-any-link")(options)
53-
},
54-
colorRgba(options) {
55-
return require("postcss-color-rgba-fallback")(options)
56-
},
57-
autoprefixer(options) {
58-
return require("autoprefixer")(options)
59-
},
60-
}
1+
export default {
2+
// Reminder: order is important
3+
customProperties(options) {
4+
return require("postcss-custom-properties")(options)
5+
},
6+
calc(options) {
7+
return require("postcss-calc")(options)
8+
},
9+
customMedia(options) {
10+
return require("postcss-custom-media")(options)
11+
},
12+
mediaQueriesRange(options) {
13+
return require("postcss-media-minmax")(options)
14+
},
15+
customSelectors(options) {
16+
return require("postcss-custom-selectors")(options)
17+
},
18+
colorRebeccapurple(options) {
19+
return require("postcss-color-rebeccapurple")(options)
20+
},
21+
colorHwb(options) {
22+
return require("postcss-color-hwb")(options)
23+
},
24+
colorGray(options) {
25+
return require("postcss-color-gray")(options)
26+
},
27+
colorHexAlpha(options) {
28+
return require("postcss-color-hex-alpha")(options)
29+
},
30+
colorFunction(options) {
31+
return require("postcss-color-function")(options)
32+
},
33+
fontVariant(options) {
34+
return require("postcss-font-variant")(options)
35+
},
36+
filter(options) {
37+
return require("pleeease-filters")(options)
38+
},
39+
initial(options) {
40+
return require("postcss-initial")(options)
41+
},
42+
rem(options) {
43+
return require("pixrem")(options)
44+
},
45+
pseudoElements(options) {
46+
return require("postcss-pseudoelements")(options)
47+
},
48+
pseudoClassMatches(options) {
49+
return require("postcss-selector-matches")(options)
50+
},
51+
pseudoClassNot(options) {
52+
return require("postcss-selector-not")(options)
53+
},
54+
pseudoClassAnyLink(options) {
55+
return require("postcss-pseudo-class-any-link")(options)
56+
},
57+
colorRgba(options) {
58+
return require("postcss-color-rgba-fallback")(options)
59+
},
60+
autoprefixer(options) {
61+
return require("autoprefixer")(options)
62+
},
63+
}

0 commit comments

Comments
 (0)