Skip to content

Commit ed0119f

Browse files
Merge branch 'postcss-preset-env--v8' into feature/logical-revamp-v8
# Conflicts: # .github/ISSUE_TEMPLATE/css-issue.yml # .github/ISSUE_TEMPLATE/plugin-issue.yml # .github/labeler.yml # package-lock.json # plugins/postcss-logical/README.md
2 parents 8d4d4d3 + 1f649f6 commit ed0119f

File tree

377 files changed

+12465
-6184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+12465
-6184
lines changed

.github/ISSUE_TEMPLATE/css-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ body:
8888
- PostCSS Lab Function
8989
- PostCSS Logical
9090
- PostCSS Logical Float and Clear
91+
- PostCSS Logical Viewport Units
9192
- PostCSS Media Queries Aspect-Ratio Number Values
9293
- PostCSS Media Query Ranges
9394
- PostCSS Nested Calc

.github/ISSUE_TEMPLATE/plugin-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ body:
9090
- PostCSS Lab Function
9191
- PostCSS Logical
9292
- PostCSS Logical Float and Clear
93+
- PostCSS Logical Viewport Units
9394
- PostCSS Media Queries Aspect-Ratio Number Values
9495
- PostCSS Media Query Ranges
9596
- PostCSS Nested Calc

.github/bin/generate-docs/install-template.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
- [PostCSS CLI](#postcss-cli)
77
- [PostCSS Load Config](#postcss-load-config)
88
- [Webpack](#webpack)
9-
- [Create React App](#create-react-app)
109
- [Next.js](#nextjs)
1110
- [Gulp](#gulp)
1211
- [Grunt](#grunt)
@@ -142,28 +141,6 @@ module.exports = {
142141
};
143142
```
144143

145-
## Create React App
146-
147-
Add [React App Rewired] and [React App Rewire PostCSS] to your project:
148-
149-
```bash
150-
npm install react-app-rewired react-app-rewire-postcss <packageName> --save-dev
151-
```
152-
153-
Use [React App Rewire PostCSS] and [<humanReadableName>] in your
154-
`config-overrides.js` file:
155-
156-
```js
157-
const reactAppRewirePostcss = require('react-app-rewire-postcss');
158-
const <exportName> = require('<packageName>');
159-
160-
module.exports = config => reactAppRewirePostcss(config, {
161-
plugins: () => [
162-
<exportName>(/* pluginOptions */)
163-
]
164-
});
165-
```
166-
167144
## Next.js
168145

169146
Read the instructions on how to [customize the PostCSS configuration in Next.js](https://nextjs.org/docs/advanced-features/customizing-postcss-config)
@@ -255,6 +232,4 @@ grunt.initConfig({
255232
[PostCSS CLI]: https://github.com/postcss/postcss-cli
256233
[PostCSS Loader]: https://github.com/postcss/postcss-loader
257234
[<humanReadableName>]: https://github.com/csstools/postcss-plugins/tree/main/<packagePath>
258-
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
259-
[React App Rewired]: https://github.com/timarney/react-app-rewired
260235
[Next.js]: https://nextjs.org

.github/bin/generate-docs/readme.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ instructions for:
7272
- [PostCSS CLI](INSTALL.md#postcss-cli)
7373
- [PostCSS Load Config](INSTALL.md#postcss-load-config)
7474
- [Webpack](INSTALL.md#webpack)
75-
- [Create React App](INSTALL.md#create-react-app)
7675
- [Next.js](INSTALL.md#nextjs)
7776
- [Gulp](INSTALL.md#gulp)
7877
- [Grunt](INSTALL.md#grunt)`);

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@
140140
- plugins/postcss-logical-float-and-clear/**
141141
- experimental/postcss-logical-float-and-clear/**
142142

143+
"plugins/postcss-logical-viewport-units":
144+
- plugins/postcss-logical-viewport-units/**
145+
- experimental/postcss-logical-viewport-units/**
146+
143147
"plugins/media-queries-aspect-ratio-number-values":
144148
- plugins/postcss-media-queries-aspect-ratio-number-values/**
145149
- experimental/postcss-media-queries-aspect-ratio-number-values/**

e2e/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Installing PostCSS
2+
3+
[EXPERIMENTAL CSS Has Pseudo] runs in all Node environments, with special instructions for:
4+
5+
⚠️ Experimental version of [CSS Has Pseudo](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo)
6+
7+
| [Node](#node) | [PostCSS CLI](#postcss-cli) | [Webpack](#webpack) | [Gulp](#gulp) | [Grunt](#grunt) |
8+
| --- | --- | --- | --- | --- |
9+
10+
## Node
11+
12+
Add [CSS Has Pseudo] to your project:
13+
14+
```bash
15+
npm install css-has-pseudo --save-dev
16+
```
17+
18+
Use it as a [PostCSS] plugin:
19+
20+
```js
21+
const postcss = require('postcss');
22+
const cssHasPseudoExperimental = require('@csstools/css-has-pseudo-experimental');
23+
24+
postcss([
25+
cssHasPseudoExperimental(/* pluginOptions */)
26+
]).process(YOUR_CSS /*, processOptions */);
27+
```
28+
29+
## PostCSS CLI
30+
31+
Add [PostCSS CLI] to your project:
32+
33+
```bash
34+
npm install postcss-cli --save-dev
35+
```
36+
37+
Use [CSS Has Pseudo] in your `postcss.config.js` configuration file:
38+
39+
```js
40+
const cssHasPseudoExperimental = require('@csstools/css-has-pseudo-experimental');
41+
42+
module.exports = {
43+
plugins: [
44+
cssHasPseudoExperimental(/* pluginOptions */)
45+
]
46+
}
47+
```
48+
49+
## Webpack
50+
51+
Add [PostCSS Loader] to your project:
52+
53+
```bash
54+
npm install postcss-loader --save-dev
55+
```
56+
57+
Use [CSS Has Pseudo] in your Webpack configuration:
58+
59+
```js
60+
const cssHasPseudoExperimental = require('@csstools/css-has-pseudo-experimental');
61+
62+
module.exports = {
63+
module: {
64+
rules: [
65+
{
66+
test: /\.css$/,
67+
use: [
68+
'style-loader',
69+
{ loader: 'css-loader', options: { importLoaders: 1 } },
70+
{ loader: 'postcss-loader', options: {
71+
ident: 'postcss',
72+
plugins: () => [
73+
cssHasPseudoExperimental(/* pluginOptions */)
74+
]
75+
} }
76+
]
77+
}
78+
]
79+
}
80+
}
81+
```
82+
83+
## Gulp
84+
85+
Add [Gulp PostCSS] to your project:
86+
87+
```bash
88+
npm install gulp-postcss --save-dev
89+
```
90+
91+
Use [CSS Has Pseudo] in your Gulpfile:
92+
93+
```js
94+
const postcss = require('gulp-postcss');
95+
const cssHasPseudoExperimental = require('@csstools/css-has-pseudo-experimental');
96+
97+
gulp.task('css', () => gulp.src('./src/*.css').pipe(
98+
postcss([
99+
cssHasPseudoExperimental(/* pluginOptions */)
100+
])
101+
).pipe(
102+
gulp.dest('.')
103+
));
104+
```
105+
106+
## Grunt
107+
108+
Add [Grunt PostCSS] to your project:
109+
110+
```bash
111+
npm install grunt-postcss --save-dev
112+
```
113+
114+
Use [CSS Has Pseudo] in your Gruntfile:
115+
116+
```js
117+
const cssHasPseudoExperimental = require('@csstools/css-has-pseudo-experimental');
118+
119+
grunt.loadNpmTasks('grunt-postcss');
120+
121+
grunt.initConfig({
122+
postcss: {
123+
options: {
124+
use: [
125+
cssHasPseudoExperimental(/* pluginOptions */)
126+
]
127+
},
128+
dist: {
129+
src: '*.css'
130+
}
131+
}
132+
});
133+
```
134+
135+
[EXPERIMENTAL CSS Has Pseudo]: https://github.com/csstools/postcss-plugins/tree/main/experimental/css-has-pseudo
136+
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
137+
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
138+
[PostCSS]: https://github.com/postcss/postcss
139+
[PostCSS CLI]: https://github.com/postcss/postcss-cli
140+
[PostCSS Loader]: https://github.com/postcss/postcss-loader

0 commit comments

Comments
 (0)