Skip to content

Commit 237474d

Browse files
authored
postcss-initial (#1121)
1 parent 1ac1ef7 commit 237474d

File tree

75 files changed

+2268
-158
lines changed

Some content is hidden

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

75 files changed

+2268
-158
lines changed

.github/ISSUE_TEMPLATE/css-issue.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ body:
6060
options:
6161
- PostCSS Preset Env
6262
- PostCSS Bundler
63-
- CSS All Property
6463
- CSS Blank Pseudo
6564
- CSS Has Pseudo
6665
- CSS Prefers Color Scheme
@@ -87,7 +86,9 @@ body:
8786
- PostCSS Global Data
8887
- PostCSS Gradients Interpolation Method
8988
- PostCSS HWB Function
89+
- PostCSS IC Unit
9090
- PostCSS Image Set Function
91+
- PostCSS Initial
9192
- PostCSS Is Pseudo Class
9293
- PostCSS Lab Function
9394
- PostCSS Logical

.github/ISSUE_TEMPLATE/plugin-issue.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ body:
6262
options:
6363
- PostCSS Preset Env
6464
- PostCSS Bundler
65-
- CSS All Property
6665
- CSS Blank Pseudo
6766
- CSS Has Pseudo
6867
- CSS Prefers Color Scheme
@@ -89,7 +88,9 @@ body:
8988
- PostCSS Global Data
9089
- PostCSS Gradients Interpolation Method
9190
- PostCSS HWB Function
91+
- PostCSS IC Unit
9292
- PostCSS Image Set Function
93+
- PostCSS Initial
9394
- PostCSS Is Pseudo Class
9495
- PostCSS Lab Function
9596
- PostCSS Logical

.github/labeler.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
"stylelint-plugin":
3434
- plugins-stylelint/**
3535

36-
"plugins/css-all-property":
37-
- plugins/css-all-property/**
38-
- experimental/css-all-property/**
39-
4036
"plugins/css-blank-pseudo":
4137
- plugins/css-blank-pseudo/**
4238
- experimental/css-blank-pseudo/**
@@ -157,6 +153,10 @@
157153
- plugins/postcss-image-set-function/**
158154
- experimental/postcss-image-set-function/**
159155

156+
"plugins/postcss-initial":
157+
- plugins/postcss-initial/**
158+
- experimental/postcss-initial/**
159+
160160
"plugins/postcss-is-pseudo-class":
161161
- plugins/postcss-is-pseudo-class/**
162162
- experimental/postcss-is-pseudo-class/**

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: repo is clean after "build", "lint" and "docs" steps
6565
run: |
66-
git diff --quiet --exit-code
66+
git diff --name-only --exit-code
6767
6868
# Basic tests
6969
- name: test

package-lock.json

+29-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin-packs/postcss-preset-env/dist/index.cjs

+1-1
Large diffs are not rendered by default.

plugin-packs/postcss-preset-env/dist/index.mjs

+1-1
Large diffs are not rendered by default.

plugin-packs/postcss-preset-env/dist/plugins/plugins-options.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { pluginOptions as postcssInitial } from '../types/postcss-initial/plugin-options';
1+
import type { pluginOptions as postcssInitial } from '@csstools/postcss-initial';
22
import type { pluginOptions as postcssPseudoClassAnyLink } from 'postcss-pseudo-class-any-link';
33
import type { pluginOptions as postcssBlankPseudo } from 'css-blank-pseudo';
44
import type { pluginOptions as postcssPageBreak } from '../types/postcss-page-break/plugin-options';
@@ -52,7 +52,7 @@ import type { pluginOptions as postcssTextDecorationShorthand } from '@csstools/
5252
import type { pluginOptions as postcssTrigonometricFunctions } from '@csstools/postcss-trigonometric-functions';
5353
import type { pluginOptions as postcssUnsetValue } from '@csstools/postcss-unset-value';
5454
export type pluginsOptions = {
55-
/** plugin options for "postcss-initial" */
55+
/** plugin options for "@csstools/postcss-initial" */
5656
'all-property'?: postcssInitial | boolean;
5757
/** plugin options for "postcss-pseudo-class-any-link" */
5858
'any-link-pseudo-class'?: postcssPseudoClassAnyLink | boolean;

plugin-packs/postcss-preset-env/dist/types/postcss-initial/plugin-options.d.ts

-11
This file was deleted.

plugin-packs/postcss-preset-env/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"@csstools/postcss-gradients-interpolation-method": "^4.0.3",
5858
"@csstools/postcss-hwb-function": "^3.0.3",
5959
"@csstools/postcss-ic-unit": "^3.0.0",
60+
"@csstools/postcss-initial": "^0.0.0",
6061
"@csstools/postcss-is-pseudo-class": "^4.0.1",
6162
"@csstools/postcss-logical-float-and-clear": "^2.0.0",
6263
"@csstools/postcss-logical-resize": "^2.0.0",
@@ -94,7 +95,6 @@
9495
"postcss-font-variant": "^5.0.0",
9596
"postcss-gap-properties": "^5.0.0",
9697
"postcss-image-set-function": "^6.0.0",
97-
"postcss-initial": "^4.0.1",
9898
"postcss-lab-function": "^6.0.3",
9999
"postcss-logical": "^7.0.0",
100100
"postcss-nesting": "^12.0.1",

plugin-packs/postcss-preset-env/scripts/plugins-data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"importName": "postcssImageSetFunction"
126126
},
127127
{
128-
"packageName": "postcss-initial",
128+
"packageName": "@csstools/postcss-initial",
129129
"id": "all-property",
130130
"importName": "postcssInitial"
131131
},

plugin-packs/postcss-preset-env/src/lib/format-feature.mjs

-5
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ export function formatStagedFeature(cssdbList, supportedBrowsers, features, feat
5454
// postcss-preset-env : option overrides
5555
pluginOption.enableProgressiveCustomProperties = false;
5656

57-
// https://github.com/maximkoretskiy/postcss-initial#replace
58-
if (feature.id === 'all-property' && 'preserve' in pluginOption) {
59-
pluginOption.replace = pluginOption.preserve;
60-
}
61-
6257
// https://github.com/MattDiMu/postcss-replace-overflow-wrap/blob/ec9914e0b9473a75a5d1fe32ea4311555eb81b71/index.js#L10
6358
if (feature.id === 'overflow-wrap-property' && 'preserve' in pluginOption) {
6459
pluginOption.method = pluginOption.preserve ? 'copy' : 'replace';

plugin-packs/postcss-preset-env/src/plugins/plugins-by-id.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import postcssInitial from 'postcss-initial';
1+
import postcssInitial from '@csstools/postcss-initial';
22
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';
33
import postcssBlankPseudo from 'css-blank-pseudo';
44
import postcssPageBreak from 'postcss-page-break';

plugin-packs/postcss-preset-env/src/plugins/plugins-data.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default [
125125
'importName': 'postcssImageSetFunction',
126126
},
127127
{
128-
'packageName': 'postcss-initial',
128+
'packageName': '@csstools/postcss-initial',
129129
'id': 'all-property',
130130
'importName': 'postcssInitial',
131131
},

plugin-packs/postcss-preset-env/src/plugins/plugins-options.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { pluginOptions as postcssInitial } from '../types/postcss-initial/plugin-options';
1+
import type { pluginOptions as postcssInitial } from '@csstools/postcss-initial';
22
import type { pluginOptions as postcssPseudoClassAnyLink } from 'postcss-pseudo-class-any-link';
33
import type { pluginOptions as postcssBlankPseudo } from 'css-blank-pseudo';
44
import type { pluginOptions as postcssPageBreak } from '../types/postcss-page-break/plugin-options';
@@ -53,7 +53,7 @@ import type { pluginOptions as postcssTrigonometricFunctions } from '@csstools/p
5353
import type { pluginOptions as postcssUnsetValue } from '@csstools/postcss-unset-value';
5454

5555
export type pluginsOptions = {
56-
/** plugin options for "postcss-initial" */
56+
/** plugin options for "@csstools/postcss-initial" */
5757
'all-property'?: postcssInitial | boolean
5858
/** plugin options for "postcss-pseudo-class-any-link" */
5959
'any-link-pseudo-class'?: postcssPseudoClassAnyLink | boolean

plugin-packs/postcss-preset-env/src/types/postcss-initial/index.d.ts

-13
This file was deleted.

plugin-packs/postcss-preset-env/src/types/postcss-initial/plugin-options.ts

-11
This file was deleted.

plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css

+3-5
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
animation: none 0s ease 0s 1 normal none running;
129129
backface-visibility: visible;
130130
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
131-
border: medium none currentColor;
131+
border: medium none currentcolor;
132132
border-collapse: separate;
133133
border-image: none;
134134
border-radius: 0;
@@ -144,14 +144,13 @@
144144
column-count: auto;
145145
column-fill: balance;
146146
column-gap: normal;
147-
column-rule: medium none currentColor;
147+
column-rule: medium none currentcolor;
148148
column-span: 1;
149149
column-width: auto;
150150
content: normal;
151151
counter-increment: none;
152152
counter-reset: none;
153153
cursor: auto;
154-
direction: ltr;
155154
display: inline;
156155
empty-cells: show;
157156
float: none;
@@ -174,7 +173,7 @@
174173
min-width: 0;
175174
opacity: 1;
176175
orphans: 2;
177-
outline: medium none invert;
176+
outline: medium none currentcolor;
178177
overflow: visible;
179178
overflow-x: visible;
180179
overflow-y: visible;
@@ -200,7 +199,6 @@
200199
transform-origin: 50% 50% 0;
201200
transform-style: flat;
202201
transition: none 0s ease 0s;
203-
unicode-bidi: normal;
204202
vertical-align: baseline;
205203
visibility: visible;
206204
white-space: normal;

plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css

+3-5
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
animation: none 0s ease 0s 1 normal none running;
129129
backface-visibility: visible;
130130
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
131-
border: medium none currentColor;
131+
border: medium none currentcolor;
132132
border-collapse: separate;
133133
border-image: none;
134134
border-radius: 0;
@@ -144,14 +144,13 @@
144144
column-count: auto;
145145
column-fill: balance;
146146
column-gap: normal;
147-
column-rule: medium none currentColor;
147+
column-rule: medium none currentcolor;
148148
column-span: 1;
149149
column-width: auto;
150150
content: normal;
151151
counter-increment: none;
152152
counter-reset: none;
153153
cursor: auto;
154-
direction: ltr;
155154
display: inline;
156155
empty-cells: show;
157156
float: none;
@@ -174,7 +173,7 @@
174173
min-width: 0;
175174
opacity: 1;
176175
orphans: 2;
177-
outline: medium none invert;
176+
outline: medium none currentcolor;
178177
overflow: visible;
179178
overflow-x: visible;
180179
overflow-y: visible;
@@ -200,7 +199,6 @@
200199
transform-origin: 50% 50% 0;
201200
transform-style: flat;
202201
transition: none 0s ease 0s;
203-
unicode-bidi: normal;
204202
vertical-align: baseline;
205203
visibility: visible;
206204
white-space: normal;

plugin-packs/postcss-preset-env/test/basic.expect.css

+4-6
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
animation: none 0s ease 0s 1 normal none running;
130130
backface-visibility: visible;
131131
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
132-
border: medium none currentColor;
132+
border: medium none currentcolor;
133133
border-collapse: separate;
134134
-o-border-image: none;
135135
border-image: none;
@@ -150,8 +150,8 @@
150150
column-fill: balance;
151151
-moz-column-gap: normal;
152152
column-gap: normal;
153-
-moz-column-rule: medium none currentColor;
154-
column-rule: medium none currentColor;
153+
-moz-column-rule: medium none currentcolor;
154+
column-rule: medium none currentcolor;
155155
-moz-column-span: 1;
156156
column-span: 1;
157157
-moz-column-width: auto;
@@ -160,7 +160,6 @@
160160
counter-increment: none;
161161
counter-reset: none;
162162
cursor: auto;
163-
direction: ltr;
164163
display: inline;
165164
empty-cells: show;
166165
float: none;
@@ -184,7 +183,7 @@
184183
min-width: 0;
185184
opacity: 1;
186185
orphans: 2;
187-
outline: medium none invert;
186+
outline: medium none currentcolor;
188187
overflow: visible;
189188
overflow-x: visible;
190189
overflow-y: visible;
@@ -213,7 +212,6 @@
213212
transform-origin: 50% 50% 0;
214213
transform-style: flat;
215214
transition: none 0s ease 0s;
216-
unicode-bidi: normal;
217215
vertical-align: baseline;
218216
visibility: visible;
219217
white-space: normal;

0 commit comments

Comments
 (0)