Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add base-styles package #17883
Add base-styles package #17883
Changes from all commits
b2a556d
33f2a8b
1e0d7d9
9cae689
82eb4af
b489eda
cb10861
c2988f3
d27eece
b38746d
24d0047
60b0c1b
071883c
910c3b1
68dd606
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Needed for
~@wordpress/base-styles/colors
-style imports to work in the playground.See parcel-bundler/parcel#39
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.
Does a similar setup work for people consuming the package via
webpack
/sass-loader
?How do people consume the package using something like
create-react-app
?@import "../node_modules/@wordpress/base-styles/colors
?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.
~
is a Webpack thing and Playground in Gutenberg uses Parcel. If~
in consumer's build pipeline doesn't resolve tonode_modules
, they'd have to import usingnode_modules/@wordpress/base-styles/colors
directly indeed. I'll mention that in docs.Thanks for asking!
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.
Great!
The reason I ask is because from memory the default setup for
~
inwebpack
/sass-loader
is thatwebpack
resolves and compiles any imports which means any variables/mixins defined in the imported file aren't accessible in the consuming file.e.g.
./node_modules/abc/stuff.scss
./test.scss
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.
No, they do work. :-) I guess it could depend on your Webpack config tho?
I also updated README.md about
~
, wanna check if it's clear now @jameslnewell?