Commit b90fe46
committed
Editor: Fix block custom CSS pseudo element selectors in global styles.
Fixes a regression introduced in [58241] where selectors with pseudo elements are wrapped within `:where()` causing malformed CSS and the CSS rule(s) not being applied.
When processing custom CSS for blocks, this changeset:
* Strips the pseudo-elements from the original nested selector, performs the required wrapping in `:root :where`, then re-appends the pseudo-element selector with its leading combinators if present.
* Removes empty CSS rules.
It includes the PHP changes.
Reference:
* PHP changes from [WordPress/gutenberg#63980 Gutenberg PR 63980].
Follow-up to [58241], [56812], [55216].
Props aaronrobertshaw, wongjn, harlet7, dballari, ramonopoly, andrewserong, aristath, hellofromTonya.
Fixes #61769.
git-svn-id: https://develop.svn.wordpress.org/trunk@58896 602fd350-edb4-49c9-b593-d223f7449a821 parent 656e87b commit b90fe46
File tree
2 files changed
+41
-5
lines changed- src/wp-includes
- tests/phpunit/tests/theme
2 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1451 | 1455 | | |
1452 | 1456 | | |
1453 | 1457 | | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
1454 | 1461 | | |
1455 | 1462 | | |
1456 | 1463 | | |
| |||
1463 | 1470 | | |
1464 | 1471 | | |
1465 | 1472 | | |
1466 | | - | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1467 | 1486 | | |
1468 | 1487 | | |
1469 | | - | |
1470 | | - | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1471 | 1492 | | |
1472 | 1493 | | |
1473 | 1494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5243 | 5243 | | |
5244 | 5244 | | |
5245 | 5245 | | |
| 5246 | + | |
5246 | 5247 | | |
5247 | 5248 | | |
5248 | 5249 | | |
| |||
5270 | 5271 | | |
5271 | 5272 | | |
5272 | 5273 | | |
| 5274 | + | |
| 5275 | + | |
| 5276 | + | |
| 5277 | + | |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
5273 | 5281 | | |
5274 | 5282 | | |
5275 | 5283 | | |
| |||
5285 | 5293 | | |
5286 | 5294 | | |
5287 | 5295 | | |
| 5296 | + | |
| 5297 | + | |
| 5298 | + | |
| 5299 | + | |
| 5300 | + | |
| 5301 | + | |
| 5302 | + | |
5288 | 5303 | | |
5289 | 5304 | | |
5290 | 5305 | | |
5291 | 5306 | | |
5292 | 5307 | | |
5293 | 5308 | | |
5294 | | - | |
| 5309 | + | |
5295 | 5310 | | |
5296 | 5311 | | |
5297 | 5312 | | |
5298 | 5313 | | |
5299 | 5314 | | |
5300 | 5315 | | |
5301 | 5316 | | |
5302 | | - | |
| 5317 | + | |
5303 | 5318 | | |
5304 | 5319 | | |
5305 | 5320 | | |
| |||
0 commit comments