Drop the usage of the local CSS rule#3826
Conversation
src/wp-includes/script-loader.php
Outdated
| $items[] = ( 'data' === $item['format'] ) | ||
| ? "url({$item['url']})" | ||
| : "url('{$item['url']}') format('{$item['format']}')"; | ||
| } | ||
|
|
||
| return $src; | ||
| return implode( ', ', $items ); |
There was a problem hiding this comment.
This change is out-of-scope for the defect bugfix. Let's instead keep parity with the fix made in Gutenberg WordPress/gutenberg#47254.
I'll update this PR.
There was a problem hiding this comment.
@Luehrsen Though I do understand why this change was made, I've reverted it for the commit.
Why? To keep it matching (parity with) the same code in the Fonts API (being developed in Gutenberg).
This is intentional to keep what's in Core synchronized with what's in the API being developed in Gutenberg.
This change could be considered in the Fonts API. Please feel free to open an issue and PR for discussion. Thank you!
hellofromtonya
left a comment
There was a problem hiding this comment.
- Confirmed changes match (have parity with) the same fix made in the Font API WordPress/gutenberg#47254 ✅
- Has change annotations ✅
- Works as expected ✅
Ready for commit 👍
|
Committed via https://core.trac.wordpress.org/changeset/55314. Thanks for your contributions! |
As discussed, loading the local font file can lean to unexpected compatibility issues due to version or locale mismatches of the font.
Vendors like Google have dropped using local in their font delivery.
That is why I would propose dropping the local rule altogether.
Trac ticket: https://core.trac.wordpress.org/ticket/57430
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.