Opened 6 months ago
Last modified 2 months ago
#64109 assigned enhancement
Bundled themes: Stylesheets should be minified in classic themes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | has-patch |
| Focuses: | css, performance | Cc: |
Description (last modified by )
This is a follow-up to #63012 which minified stylesheets in bundled block themes. The same remains to be done for bundled classic themes. This includes dedicated stylesheets for blocks, which would then allow them to be inlined per #58519. See also #63007 which enabled the stylesheets for bundled block themes to be inlined.
Blocking:
Change History (13)
This ticket was mentioned in PR #10818 on WordPress/wordpress-develop by @rutviksavsani.
3 months ago
#3
- Keywords has-patch added; needs-patch removed
@westonruter commented on PR #10818:
3 months ago
#5
@rutviksavsani it might make sense to open a pull request first just for the Twenty Twenty-One theme to facilitate review and it iron our the kinks. Then once that is reviewed and committed, another PR can be opened to replicate the established pattern from TT1 to the prior classic themes.
That is to say, maybe cherry pick https://github.com/WordPress/wordpress-develop/pull/10818/commits/136b585659adaa0a1437b6599b18f16e80a785e8 into a separate PR.
This ticket was mentioned in PR #10860 on WordPress/wordpress-develop by @rutviksavsani.
3 months ago
#6
This PR implements the Minification for TwentyTwentyOne theme initially to test out before we convert all of them in https://github.com/WordPress/wordpress-develop/pull/10818
Trac ticket: https://core.trac.wordpress.org/ticket/64109
@rutviksavsani commented on PR #10860:
3 months ago
#7
@westonruter As suggested in the other PR for minification of stylesheets for themes, Here I have created a separate PR for TT1.
@westonruter commented on PR #10860:
2 months ago
#8
cc @sabernhardt
@westonruter commented on PR #10818:
2 months ago
#9
That is to say, maybe cherry pick 136b585 into a separate PR.
See https://github.com/WordPress/wordpress-develop/pull/10860
@westonruter commented on PR #10860:
2 months ago
#10
@rutviksavsani With r61628 (05e54af), IE support has been removed from the theme and this has introduced merge conflicts. Would you address?
## Summary
Implements automated CSS minification for 11 classic WordPress themes (Twenty Ten through Twenty Twenty-One) to improve frontend performance. Minified CSS files are conditionally loaded based on the
SCRIPT_DEBUGconstant.Initial reference PR: https://github.com/WordPress/wordpress-develop/pull/10081
## Changes Made
### Build Infrastructure
cssmin:themesGrunt task for automated CSS minification.gitignoreto exclude generated.min.cssfiles from version control### Per-Theme Changes
Each theme received:
package.json- npm build configuration with cssnano dependenciespackage-lock.json- Locked dependency versionscontributing.txt- Developer documentation for CSS minification workflowfunctions.php- Conditional loading logic usingSCRIPT_DEBUGTrac ticket: https://core.trac.wordpress.org/ticket/64109