Skip to content

postcss-initial #1121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/css-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ body:
options:
- PostCSS Preset Env
- PostCSS Bundler
- CSS All Property
- CSS Blank Pseudo
- CSS Has Pseudo
- CSS Prefers Color Scheme
Expand All @@ -87,7 +86,9 @@ body:
- PostCSS Global Data
- PostCSS Gradients Interpolation Method
- PostCSS HWB Function
- PostCSS IC Unit
- PostCSS Image Set Function
- PostCSS Initial
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/plugin-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ body:
options:
- PostCSS Preset Env
- PostCSS Bundler
- CSS All Property
- CSS Blank Pseudo
- CSS Has Pseudo
- CSS Prefers Color Scheme
Expand All @@ -89,7 +88,9 @@ body:
- PostCSS Global Data
- PostCSS Gradients Interpolation Method
- PostCSS HWB Function
- PostCSS IC Unit
- PostCSS Image Set Function
- PostCSS Initial
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
Expand Down
8 changes: 4 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
"stylelint-plugin":
- plugins-stylelint/**

"plugins/css-all-property":
- plugins/css-all-property/**
- experimental/css-all-property/**

"plugins/css-blank-pseudo":
- plugins/css-blank-pseudo/**
- experimental/css-blank-pseudo/**
Expand Down Expand Up @@ -157,6 +153,10 @@
- plugins/postcss-image-set-function/**
- experimental/postcss-image-set-function/**

"plugins/postcss-initial":
- plugins/postcss-initial/**
- experimental/postcss-initial/**

"plugins/postcss-is-pseudo-class":
- plugins/postcss-is-pseudo-class/**
- experimental/postcss-is-pseudo-class/**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

- name: repo is clean after "build", "lint" and "docs" steps
run: |
git diff --quiet --exit-code
git diff --name-only --exit-code

# Basic tests
- name: test
Expand Down
38 changes: 29 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/dist/index.mjs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { pluginOptions as postcssInitial } from '../types/postcss-initial/plugin-options';
import type { pluginOptions as postcssInitial } from '@csstools/postcss-initial';
import type { pluginOptions as postcssPseudoClassAnyLink } from 'postcss-pseudo-class-any-link';
import type { pluginOptions as postcssBlankPseudo } from 'css-blank-pseudo';
import type { pluginOptions as postcssPageBreak } from '../types/postcss-page-break/plugin-options';
Expand Down Expand Up @@ -52,7 +52,7 @@ import type { pluginOptions as postcssTextDecorationShorthand } from '@csstools/
import type { pluginOptions as postcssTrigonometricFunctions } from '@csstools/postcss-trigonometric-functions';
import type { pluginOptions as postcssUnsetValue } from '@csstools/postcss-unset-value';
export type pluginsOptions = {
/** plugin options for "postcss-initial" */
/** plugin options for "@csstools/postcss-initial" */
'all-property'?: postcssInitial | boolean;
/** plugin options for "postcss-pseudo-class-any-link" */
'any-link-pseudo-class'?: postcssPseudoClassAnyLink | boolean;
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@csstools/postcss-gradients-interpolation-method": "^4.0.3",
"@csstools/postcss-hwb-function": "^3.0.3",
"@csstools/postcss-ic-unit": "^3.0.0",
"@csstools/postcss-initial": "^0.0.0",
"@csstools/postcss-is-pseudo-class": "^4.0.1",
"@csstools/postcss-logical-float-and-clear": "^2.0.0",
"@csstools/postcss-logical-resize": "^2.0.0",
Expand Down Expand Up @@ -94,7 +95,6 @@
"postcss-font-variant": "^5.0.0",
"postcss-gap-properties": "^5.0.0",
"postcss-image-set-function": "^6.0.0",
"postcss-initial": "^4.0.1",
"postcss-lab-function": "^6.0.3",
"postcss-logical": "^7.0.0",
"postcss-nesting": "^12.0.1",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/scripts/plugins-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"importName": "postcssImageSetFunction"
},
{
"packageName": "postcss-initial",
"packageName": "@csstools/postcss-initial",
"id": "all-property",
"importName": "postcssInitial"
},
Expand Down
5 changes: 0 additions & 5 deletions plugin-packs/postcss-preset-env/src/lib/format-feature.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ export function formatStagedFeature(cssdbList, supportedBrowsers, features, feat
// postcss-preset-env : option overrides
pluginOption.enableProgressiveCustomProperties = false;

// https://github.com/maximkoretskiy/postcss-initial#replace
if (feature.id === 'all-property' && 'preserve' in pluginOption) {
pluginOption.replace = pluginOption.preserve;
}

// https://github.com/MattDiMu/postcss-replace-overflow-wrap/blob/ec9914e0b9473a75a5d1fe32ea4311555eb81b71/index.js#L10
if (feature.id === 'overflow-wrap-property' && 'preserve' in pluginOption) {
pluginOption.method = pluginOption.preserve ? 'copy' : 'replace';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import postcssInitial from 'postcss-initial';
import postcssInitial from '@csstools/postcss-initial';
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';
import postcssBlankPseudo from 'css-blank-pseudo';
import postcssPageBreak from 'postcss-page-break';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default [
'importName': 'postcssImageSetFunction',
},
{
'packageName': 'postcss-initial',
'packageName': '@csstools/postcss-initial',
'id': 'all-property',
'importName': 'postcssInitial',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { pluginOptions as postcssInitial } from '../types/postcss-initial/plugin-options';
import type { pluginOptions as postcssInitial } from '@csstools/postcss-initial';
import type { pluginOptions as postcssPseudoClassAnyLink } from 'postcss-pseudo-class-any-link';
import type { pluginOptions as postcssBlankPseudo } from 'css-blank-pseudo';
import type { pluginOptions as postcssPageBreak } from '../types/postcss-page-break/plugin-options';
Expand Down Expand Up @@ -53,7 +53,7 @@ import type { pluginOptions as postcssTrigonometricFunctions } from '@csstools/p
import type { pluginOptions as postcssUnsetValue } from '@csstools/postcss-unset-value';

export type pluginsOptions = {
/** plugin options for "postcss-initial" */
/** plugin options for "@csstools/postcss-initial" */
'all-property'?: postcssInitial | boolean
/** plugin options for "postcss-pseudo-class-any-link" */
'any-link-pseudo-class'?: postcssPseudoClassAnyLink | boolean
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
animation: none 0s ease 0s 1 normal none running;
backface-visibility: visible;
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
border: medium none currentColor;
border: medium none currentcolor;
border-collapse: separate;
border-image: none;
border-radius: 0;
Expand All @@ -144,14 +144,13 @@
column-count: auto;
column-fill: balance;
column-gap: normal;
column-rule: medium none currentColor;
column-rule: medium none currentcolor;
column-span: 1;
column-width: auto;
content: normal;
counter-increment: none;
counter-reset: none;
cursor: auto;
direction: ltr;
display: inline;
empty-cells: show;
float: none;
Expand All @@ -174,7 +173,7 @@
min-width: 0;
opacity: 1;
orphans: 2;
outline: medium none invert;
outline: medium none currentcolor;
overflow: visible;
overflow-x: visible;
overflow-y: visible;
Expand All @@ -200,7 +199,6 @@
transform-origin: 50% 50% 0;
transform-style: flat;
transition: none 0s ease 0s;
unicode-bidi: normal;
vertical-align: baseline;
visibility: visible;
white-space: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
animation: none 0s ease 0s 1 normal none running;
backface-visibility: visible;
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
border: medium none currentColor;
border: medium none currentcolor;
border-collapse: separate;
border-image: none;
border-radius: 0;
Expand All @@ -144,14 +144,13 @@
column-count: auto;
column-fill: balance;
column-gap: normal;
column-rule: medium none currentColor;
column-rule: medium none currentcolor;
column-span: 1;
column-width: auto;
content: normal;
counter-increment: none;
counter-reset: none;
cursor: auto;
direction: ltr;
display: inline;
empty-cells: show;
float: none;
Expand All @@ -174,7 +173,7 @@
min-width: 0;
opacity: 1;
orphans: 2;
outline: medium none invert;
outline: medium none currentcolor;
overflow: visible;
overflow-x: visible;
overflow-y: visible;
Expand All @@ -200,7 +199,6 @@
transform-origin: 50% 50% 0;
transform-style: flat;
transition: none 0s ease 0s;
unicode-bidi: normal;
vertical-align: baseline;
visibility: visible;
white-space: normal;
Expand Down
10 changes: 4 additions & 6 deletions plugin-packs/postcss-preset-env/test/basic.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
animation: none 0s ease 0s 1 normal none running;
backface-visibility: visible;
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
border: medium none currentColor;
border: medium none currentcolor;
border-collapse: separate;
-o-border-image: none;
border-image: none;
Expand All @@ -150,8 +150,8 @@
column-fill: balance;
-moz-column-gap: normal;
column-gap: normal;
-moz-column-rule: medium none currentColor;
column-rule: medium none currentColor;
-moz-column-rule: medium none currentcolor;
column-rule: medium none currentcolor;
-moz-column-span: 1;
column-span: 1;
-moz-column-width: auto;
Expand All @@ -160,7 +160,6 @@
counter-increment: none;
counter-reset: none;
cursor: auto;
direction: ltr;
display: inline;
empty-cells: show;
float: none;
Expand All @@ -184,7 +183,7 @@
min-width: 0;
opacity: 1;
orphans: 2;
outline: medium none invert;
outline: medium none currentcolor;
overflow: visible;
overflow-x: visible;
overflow-y: visible;
Expand Down Expand Up @@ -213,7 +212,6 @@
transform-origin: 50% 50% 0;
transform-style: flat;
transition: none 0s ease 0s;
unicode-bidi: normal;
vertical-align: baseline;
visibility: visible;
white-space: normal;
Expand Down
Loading