-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Minify stylesheets for twentytwentyone theme. #10860
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
base: trunk
Are you sure you want to change the base?
Changes from all commits
6361788
d10d52e
7257263
7f3dc41
ab5bf66
30b41a8
d1286f9
efc129c
1f381d8
c7dff92
44a60ee
8cef9dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -387,8 +387,12 @@ function twenty_twenty_one_content_width() { | |
| * @return void | ||
| */ | ||
| function twenty_twenty_one_scripts() { | ||
| $theme_version = wp_get_theme()->get( 'Version' ); | ||
|
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. Right now, the |
||
|
|
||
| $suffix = ( ! SCRIPT_DEBUG ) ? '.min' : ''; | ||
|
|
||
| // The standard stylesheet. | ||
| wp_enqueue_style( 'twenty-twenty-one-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) ); | ||
| wp_enqueue_style( 'twenty-twenty-one-style', get_template_directory_uri() . '/style' . $suffix . '.css', array(), $theme_version ); | ||
|
|
||
| // RTL styles. | ||
| wp_style_add_data( 'twenty-twenty-one-style', 'rtl', 'replace' ); | ||
|
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. The RTL 'replace' would make sites in right-to-left languages try to fetch a And then fetch the minified dark mode stylesheets like this: |
||
|
|
||
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.
"In production" can start a new sentence, and the lines can wrap better.