-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Packages: Adding RTL CSS support to the packages CSS #8187
Conversation
@@ -98,8 +99,17 @@ function buildStyle( packagePath ) { | |||
.then( ( result ) => callback( null, result ) ); | |||
}; | |||
|
|||
const postCSSRTLSync = ( ltrCSS, callback ) => { |
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.
Should we merge #8093 and refactor to use the asynchronous code?
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.
I don't really care which one goes first but yeah, we should align
@@ -235,6 +236,13 @@ const config = { | |||
'deprecated', | |||
'dom-ready', | |||
].map( camelCaseDash ) ), | |||
new CopyWebpackPlugin( | |||
gutenbergPackages.map( ( packageName ) => ( { |
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.
Nice and clean 👍
Almost there, in case of |
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 works great, many thanks for fixing it.
🎉
Do we still need the Lines 50 to 54 in a9f6a1e
It's also the sole plugin we use which hasn't been updated for Webpack 4 and would break with the upcoming Webpack 5 release.
|
I think when we merged this PR, we were in a mixed where not all the packages were in the packages folder but I think now it not necessary anymore. |
Okay, I'll plan to push up a pull request in the next day or so. |
Just to make sure it's tracked, I created an issue at #15146. I expect to find some time to look at this on Friday, and have assigned myself accordingly. |
This PR adds RTL support to the packages CSS which allows us to drop the root package folders for all the packages that expose CSS files.
There's a new Webpack step copying the built CSS files from the packages folder into the build folder used by the WordPress registered styles.
Testing instructions
nux
RTL CSS file is generated properly inbuild-style
and copied to the globalbuild
folder.