Add RTL admin-bar.css and update fork to WP 5.3-alpha@160fc055da#2972
Add RTL admin-bar.css and update fork to WP 5.3-alpha@160fc055da#2972westonruter merged 5 commits intodevelopfrom
Conversation
39c266d to
2ffc5df
Compare
|
Can we automate this? If I‘m not mistaken we already use rtlcss for other styles. |
|
Yeah, we should. I don't know how to configure that, however. Something like this? // ...
const adminBar = {
...defaultConfig,
module: {
rules: [
{
test: /admin-bar\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
],
},
],
},
plugins: [
new MiniCssExtractPlugin( {
filename: '../css/[name]-compiled.css',
} ),
new RtlCssPlugin( {
filename: '../css/[name]-compiled-rtl.css',
} ),
new WebpackBar( {
name: 'Admin Bar',
color: '#67b255',
} ),
],
};
// ... |
|
At first glance that seems like a step in the right direction 👍 I can have a closer look tomorrow. |
|
Yeah, except it doesn't work 😄 |
|
As for the webpack config, Given that webpack does not yet support standalone CSS processing very well (it always builds a JS chunk), it's probably easiest to just use RTLCSS standalone for this. Since we need to add RTL versions for all other stylesheets anyway, I suggest exploring this in a separate issue. Then we can also look into using PostCSS for all these stylesheets, which allows us to use things like One thing that I already noticed: In order to not override the wrong files or create too many files, we should separate |
Add RTL admin-bar
This PR includes an
admin-bar-rtl.cssand ensures it gets loaded whenis_rtl().Before
After
Update Forks
The
admin-bar.cssin core has been updated since we forked it from WP 4.9. This updates it to the latest: https://github.com/WordPress/wordpress-develop/blob/160fc055da156248277513dd5256fbcc66faa5a7/src/wp-includes/css/admin-bar.cssChanges applied to fork: