-
Notifications
You must be signed in to change notification settings - Fork 891
Stylelint: no WPDS token fallback values for WP Build routes #50502
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| Comment: Remove manual WPDS token fallbacks from wp-build route styles so build-time PostCSS injects canonical design-token fallbacks. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| Comment: Remove manual WPDS token fallbacks from wp-build route styles so build-time PostCSS injects canonical design-token fallbacks. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| Comment: Remove manual WPDS token fallbacks from wp-build route styles so build-time PostCSS injects canonical design-token fallbacks. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| .tabList { | ||
| padding-inline: var(--wpds-dimension-padding-2xl, 24px); | ||
| padding-inline: var(--wpds-dimension-padding-2xl); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| * with it instead of sitting flush to the edge. | ||
| */ | ||
| padding-block-end: 24px; | ||
| padding-inline: var(--wpds-dimension-padding-2xl, 24px); | ||
| padding-inline: var(--wpds-dimension-padding-2xl); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems the plugin didn't add a fallback for this one for some reason. |
||
| } | ||
|
|
||
| .dateFilters { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| Comment: Remove manual WPDS token fallbacks from wp-build route styles so build-time PostCSS injects canonical design-token fallbacks. |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,9 @@ const baseConfig = { | |||||||||||||
| rules: { | ||||||||||||||
| 'plugin-wpds/no-unknown-ds-tokens': true, | ||||||||||||||
| 'plugin-wpds/no-setting-wpds-custom-properties': true, | ||||||||||||||
| 'plugin-wpds/no-token-fallback-values': null, // Disabled because `@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks` is not configured yet. | ||||||||||||||
| // Disabled globally: only wp-build dashboards configure `@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks` | ||||||||||||||
| // which adds fallbacks at build time. | ||||||||||||||
| 'plugin-wpds/no-token-fallback-values': null, | ||||||||||||||
| // In addition to what `@wordpress/stylelint-config/scss-stylistic` does by default, also ignore comments containing /stylelint-disable/. | ||||||||||||||
| '@stylistic/max-line-length': [ | ||||||||||||||
| 80, | ||||||||||||||
|
|
@@ -84,6 +86,27 @@ const baseConfig = { | |||||||||||||
| }, | ||||||||||||||
| ], | ||||||||||||||
| }, | ||||||||||||||
| overrides: [ | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd really rather we don't have a big list of permanent overrides in this global configuration file, that people will have to know to maintain. Are these meant to be temporary? If not, please move these into stylelint config files in each project.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree and they're indeed meant to be temporary and going away as soon as everything can be linted with the same rule across the repo. It's just easier to migrate in smaller chunks, and this was most pragmatic temporary solution. Hopefully no longer than just this week!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, thanks! 🙂
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aight, got pretty far! Among files with
Not on the rule: I might flip the rule the other way around; ignore those and apply everywhere else. Those others are pretty complicated:
I will continue after short vacation. :-)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||
| { | ||||||||||||||
| // Packages with `build:wp-build` in package.json. | ||||||||||||||
| files: [ | ||||||||||||||
| 'projects/packages/backup/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/forms/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/forms/src/dashboard/wp-build/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/jetpack-mu-wpcom/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/newsletter/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/podcast/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/premium-analytics/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/publicize/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/scan/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/seo/routes/**/*.{css,scss,sass}', | ||||||||||||||
| 'projects/packages/videopress/routes/**/*.{css,scss,sass}', | ||||||||||||||
| ], | ||||||||||||||
| rules: { | ||||||||||||||
| 'plugin-wpds/no-token-fallback-values': true, | ||||||||||||||
| }, | ||||||||||||||
| }, | ||||||||||||||
| ], | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| export default baseConfig; | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the plugin didn't add a fallback for this one for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Just checked it's a real valid token.
https://wordpress.github.io/gutenberg/?path=/docs/design-system-tokens-introduction--docs#dimension