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

Commit 672fe6a

Browse files
committed
Remove some not future css plugins (#375)
1 parent 974e40b commit 672fe6a

16 files changed

+23
-187
lines changed

docs/content/features.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ backgroundModifier: darkRoad
99

1010
**Note that according to your [browser scope](/usage/#browsers) some
1111
transformation can be skipped to avoid extra useless output.**
12-
Eg: if you use don't cover IE 8, rem fallback and rgba fallback might be skipped.
1312

1413
## automatic vendor prefixes
1514

@@ -259,22 +258,6 @@ body {
259258
|
260259
[Plugin documentation](https://github.com/postcss/postcss-color-hex-alpha)
261260

262-
## `rgba` function (`rgb` fallback)
263-
264-
Add solid colors fallback for rgba colors
265-
(if your browser scope cover old browsers, eg: IE8).
266-
267-
```css
268-
body {
269-
background: rgba(153, 221, 153, 0.8);
270-
/* you will have the same value without alpha as a fallback */
271-
}
272-
```
273-
274-
[Specification](http://www.w3.org/TR/css3-color/)
275-
|
276-
[Plugin documentation](https://github.com/postcss/postcss-color-rgba-fallback)
277-
278261
## `rebeccapurple` color
279262

280263
Allows you to use the new color keyword as a homage to
@@ -356,21 +339,6 @@ div {
356339
|
357340
[Plugin documentation](https://github.com/maximkoretskiy/postcss-initial)
358341

359-
## `rem` unit (`px` fallback)
360-
361-
`rem` fallback to `px`
362-
(if your browser scope cover old browsers, eg: IE8).
363-
364-
```css
365-
h1 {
366-
font-size: 1.5rem;
367-
}
368-
```
369-
370-
[Specification](http://www.w3.org/TR/css3-values/#rem-unit)
371-
|
372-
[Plugin documentation](https://github.com/robwierzbowski/node-pixrem)
373-
374342
## `:any-link` pseudo-class
375343

376344
Allows you to use `:any-link` pseudo class.
@@ -416,21 +384,6 @@ p:not(:first-child, .special) {
416384
|
417385
[Plugin documentation](https://github.com/postcss/postcss-selector-NOT)
418386

419-
## `::` pseudo syntax (`:` fallback)
420-
421-
Adjust `::` to `:`
422-
(if your browser scope cover old browsers, eg: IE8).
423-
424-
```css
425-
a::before {
426-
/* ... */
427-
}
428-
```
429-
430-
[Specification](http://www.w3.org/TR/css3-selectors/#pseudo-elements)
431-
|
432-
[Plugin documentation](https://github.com/axa-ch/postcss-pseudoelements)
433-
434387
## `overflow-wrap` property (`word-wrap` fallback)
435388

436389
Converts `overflow-wrap` to `word-wrap` (many browser support only the old [word-wrap](http://caniuse.com/#feat=wordwrap) property).

docs/content/index.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
8787
<li class="r-Grid-cell r-minS--1of2">
8888
<a href="/features/#rrggbbaa-colors"><code>#rrggbbaa</code> colors</a>
8989
</li>
90-
<li class="r-Grid-cell r-minS--1of2">
91-
<a href="/features/#rgba-function-rgb-fallback"><code>rgba</code> function
92-
<small class="cssnext-FeaturesList-small">
93-
(<code>rgb</code> fallback</code>)
94-
</small>
95-
</a>
96-
</li>
9790
<li class="r-Grid-cell r-minS--1of2">
9891
<a href="/features/#rebeccapurple-color"><code>rebeccapurple</code> color</a>
9992
</li>
@@ -109,12 +102,6 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
109102
<li class="r-Grid-cell r-minS--1of2">
110103
<a href="/features/#initial-value"><code>initial</code> value</a>
111104
</li>
112-
<li class="r-Grid-cell r-minS--1of2">
113-
<a href="/features/#rem-unit-px-fallback"><code>rem</code> unit</a>
114-
<small class="cssnext-FeaturesList-small">
115-
(<code>px</code> fallback)
116-
</small>
117-
</li>
118105
<li class="r-Grid-cell r-minS--1of2">
119106
<a href="/features/#any-link-pseudo-class"><code>:any-link</code> pseudo-class</a>
120107
</li>
@@ -127,12 +114,6 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
127114
(to l.3)
128115
</small>
129116
</li>
130-
<li class="r-Grid-cell r-minS--1of2">
131-
<a href="/features/#pseudo-syntax-fallback"><code>::</code>pseudo syntax</a>
132-
<small class="cssnext-FeaturesList-small">
133-
(<code>:</code> fallback)
134-
</small>
135-
</li>
136117
<li class="r-Grid-cell r-minS--1of2">
137118
<a href="/features/#replace-overflow-wrap"><code>overflow-wrap</code> property</a>
138119
<small class="cssnext-FeaturesList-small">

docs/content/playground.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<textarea class="js-cssnext-Playground-from cssnext-Playground-code cssnext-Playground-code--from" spellcheck="false">
1212
/* custom properties */
1313
:root {
14-
--fontSize: 1rem;
15-
--mainColor: #12345678;
16-
--highlightColor: hwb(190, 35%, 20%);
14+
--fontSize: 1rem;
15+
--mainColor: #12345678;
16+
--highlightColor: hwb(190, 35%, 20%);
1717
}
1818

1919
/* custom properties set & @apply rule */
@@ -34,16 +34,16 @@
3434

3535
/* some var() & calc() */
3636
body {
37-
color: var(--mainColor);
37+
color: var(--mainColor);
3838

39-
font-size: var(--fontSize);
40-
line-height: calc(var(--fontSize) * 1.5);
41-
padding: calc((var(--fontSize) / 2) + 1px);
39+
font-size: var(--fontSize);
40+
line-height: calc(var(--fontSize) * 1.5);
41+
padding: calc((var(--fontSize) / 2) + 1px);
4242
}
4343

4444
/* custom media query usage */
4545
@media (--viewport-medium) {
46-
body { font-size: calc(var(--fontSize) * 1.2); }
46+
body { font-size: calc(var(--fontSize) * 1.2); }
4747
}
4848

4949
/* custom selectors */
@@ -52,17 +52,17 @@
5252

5353
/* image-set function */
5454
.foo {
55-
background-image:
56-
image-set(
57-
url(img/test.png) 1x,
58-
url(img/test-2x.png) 2x
59-
);
55+
background-image:
56+
image-set(
57+
url(img/test.png) 1x,
58+
url(img/test-2x.png) 2x
59+
);
6060
}
6161

6262
/* colors stuff */
6363
a {
64-
color: var(--highlightColor);
65-
transition: color 1s; /* autoprefixed ! */
64+
color: var(--highlightColor);
65+
transition: color 1s; /* autoprefixed ! */
6666
}
6767
a:hover { color: gray(255, 50%) }
6868
a:active { color: rebeccapurple }
@@ -71,34 +71,34 @@
7171

7272
/* font stuff */
7373
h2 {
74-
font-variant-caps: small-caps;
74+
font-variant-caps: small-caps;
7575
}
7676

7777
table {
78-
font-variant-numeric: lining-nums;
78+
font-variant-numeric: lining-nums;
7979
}
8080

8181
/* filters */
8282
.blur {
83-
filter: blur(4px);
83+
filter: blur(4px);
8484
}
8585
.sepia {
86-
filter: sepia(.8);
86+
filter: sepia(.8);
8787
}
8888

8989
/* overflow-wrap fallback */
9090
body {
91-
overflow-wrap: break-word;
91+
overflow-wrap: break-word;
9292
}
9393

9494
/* attribute case insensitive */
9595
[frame=hsides i] {
96-
border-style: solid none;
96+
border-style: solid none;
9797
}
9898

9999
/* system-ui font-family */
100100
body {
101-
font-family: system-ui;
101+
font-family: system-ui;
102102
}
103103

104104
</textarea>

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"autoprefixer": "^6.0.2",
2525
"caniuse-api": "^1.5.3",
2626
"chalk": "^1.1.1",
27-
"pixrem": "^3.0.0",
2827
"pleeease-filters": "^3.0.0",
2928
"postcss": "^5.0.4",
3029
"postcss-apply": "^0.3.0",
@@ -37,7 +36,6 @@
3736
"postcss-color-hwb": "^2.0.0",
3837
"postcss-color-rebeccapurple": "^2.0.0",
3938
"postcss-color-rgb": "^1.1.4",
40-
"postcss-color-rgba-fallback": "^2.0.0",
4139
"postcss-custom-media": "^5.0.0",
4240
"postcss-custom-properties": "^5.0.0",
4341
"postcss-custom-selectors": "^3.0.0",
@@ -48,7 +46,6 @@
4846
"postcss-media-minmax": "^2.1.0",
4947
"postcss-nesting": "^2.0.5",
5048
"postcss-pseudo-class-any-link": "^1.0.0",
51-
"postcss-pseudoelements": "^3.0.0",
5249
"postcss-replace-overflow-wrap": "^1.0.0",
5350
"postcss-selector-matches": "^2.0.0",
5451
"postcss-selector-not": "^2.0.0"

src/__tests__/fixtures/features/color-rgba.browsers

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/__tests__/fixtures/features/color-rgba.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/__tests__/fixtures/features/color-rgba.expected.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/__tests__/fixtures/features/pseudo-elements.browsers

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/__tests__/fixtures/features/pseudo-elements.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/__tests__/fixtures/features/pseudo-elements.expected.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/__tests__/fixtures/features/rem.browsers

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/__tests__/fixtures/features/rem.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/__tests__/fixtures/features/rem.expected.css

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/__tests__/option.browsers.js

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import cssnext from ".."
44

55
tape("cssnext browsers option", function(t) {
66

7-
// no recent browser need pixrem
8-
const remInput = "body{font-size:2rem}"
9-
t.equal(
10-
cssnext({ browsers: "last 1 version" }).process(remInput).css,
11-
remInput,
12-
"should not enable px fallback when all browsers support it"
13-
)
14-
157
const customPropsInput = ":root{--foo:bar}baz{qux:var(--foo)}"
168
const customPropsOutput = "baz{qux: bar}"
179

@@ -60,33 +52,3 @@ tape("cssnext browsers option propagation to autoprefixer", function(t) {
6052

6153
t.end()
6254
})
63-
64-
tape("cssnext browsers option propagation to pixrem", function(t) {
65-
const input = "body{font-size: 1rem}"
66-
const output = "body{font-size: 16px;font-size: 1rem}"
67-
68-
// IE 8 needs rem fallback
69-
t.equal(
70-
cssnext({ browsers: "ie 8" }).process(input).css,
71-
output,
72-
"should propagate browsers option to pixrem"
73-
)
74-
75-
// IE 9 doesn't need rem fallback on a simple font-size
76-
t.equal(
77-
cssnext({ browsers: "ie 9" }).process(input).css,
78-
input,
79-
"should propagate browsers option to pixrem"
80-
)
81-
82-
// IE 9 needs rem on pseudo element
83-
const inputWeirdCase = input.replace("body", "body::before")
84-
const outputWeirdCase = output.replace("body", "body::before")
85-
t.equal(
86-
cssnext({ browsers: "ie 9" }).process(inputWeirdCase).css,
87-
outputWeirdCase,
88-
"should propagate browsers option to pixrem"
89-
)
90-
91-
t.end()
92-
})

src/features.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ export default {
6666
// https://npmjs.com/package/postcss-initial
6767
initial: (options) => require("postcss-initial")(options),
6868

69-
// https://npmjs.com/package/pixrem
70-
rem: (options) => require("pixrem")(options),
71-
72-
// https://npmjs.com/package/postcss-pseudoelements
73-
pseudoElements: (options) => require("postcss-pseudoelements")(options),
74-
7569
// https://npmjs.com/package/postcss-selector-matches
7670
pseudoClassMatches: (options) => require("postcss-selector-matches")(options),
7771

@@ -81,9 +75,6 @@ export default {
8175
// https://npmjs.com/package/postcss-pseudo-class-any-link
8276
pseudoClassAnyLink: (options) => require("postcss-pseudo-class-any-link")(options),
8377

84-
// https://npmjs.com/package/postcss-color-rgba-fallback
85-
colorRgba: (options) => require("postcss-color-rgba-fallback")(options),
86-
8778
// https://www.npmjs.com/package/postcss-replace-overflow-wrap
8879
overflowWrap: (options) => require("postcss-replace-overflow-wrap")(options),
8980

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const plugin = postcss.plugin("postcss-cssnext", (options) => {
1818
const features = options.features
1919

2020
// propagate browsers option to plugins that supports it
21-
const pluginsToPropagateBrowserOption = [ "autoprefixer", "rem" ]
21+
const pluginsToPropagateBrowserOption = [ "autoprefixer" ]
2222
pluginsToPropagateBrowserOption.forEach((name) => {
2323
const feature = features[name]
2424

0 commit comments

Comments
 (0)