Replace node-sass with sass, keeping extend#12510
Conversation
This reverts commit bd476f6.
…rdpress-develop into replace-node-sass
…rdpress-develop into replace-node-sass
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
GitHub Desktop told me the compiled stylesheets changed line endings to CRLF, but I saw them as LF in my file editor. I edited the |
| @mixin non-latin-fonts() { | ||
| @each $lang, $font__fallback in $font__fallbacks { | ||
| &:lang(#{$lang}) { | ||
| font-family: unquote( $font__fallback ); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This could still be replaced by the language simplification and grouping, but that would fit ticket 47925 better.
| @mixin non-latin-fonts() { | |
| @each $lang, $font__fallback in $font__fallbacks { | |
| &:lang(#{$lang}) { | |
| font-family: unquote( $font__fallback ); | |
| } | |
| } | |
| } | |
| @mixin non-latin-fonts() { | |
| // Arabic | |
| &:is(:lang(ar),:lang(ary),:lang(azb),:lang(ckb),:lang(fa),:lang(haz),:lang(ps)) { | |
| font-family: Tahoma, Arial, sans-serif; | |
| } | |
| // Cyrillic | |
| &:is(:lang(be),:lang(bg),:lang(kk),:lang(mk),:lang(mn),:lang(ru),:lang(sah),:lang(sr),:lang(tt),:lang(uk)) { | |
| font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif; | |
| } | |
| // Chinese (Hong Kong) | |
| &:lang(zh-HK) { | |
| font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif; | |
| } | |
| // Chinese (Taiwan) | |
| &:lang(zh-TW) { | |
| font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif; | |
| } | |
| // Chinese (China) | |
| &:lang(zh-CN) { | |
| font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif; | |
| } | |
| // Devanagari and Gujarati | |
| &:is(:lang(bn),:lang(gu),:lang(hi),:lang(mr),:lang(ne)) { | |
| font-family: Arial, sans-serif; | |
| } | |
| // Greek | |
| &:lang(el) { | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| } | |
| // Hebrew | |
| &:lang(he) { | |
| font-family: "Arial Hebrew", Arial, sans-serif; | |
| } | |
| // Japanese | |
| &:lang(ja) { | |
| font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, "Helvetica Neue", sans-serif; | |
| } | |
| // Korean | |
| &:lang(ko) { | |
| font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", Dotum, sans-serif; | |
| } | |
| // Thai | |
| &:lang(th) { | |
| font-family: "Sukhumvit Set", "Helvetica Neue", helvetica, arial, sans-serif; | |
| } | |
| // Vietnamese | |
| &:lang(vi) { | |
| font-family: "Libre Franklin", sans-serif; | |
| } | |
| } |
| } | ||
|
|
||
| h2 { | ||
| @include non-latin-fonts(); |
There was a problem hiding this comment.
The non-latin fonts do not work correctly in the editor since it started using the iframe, because the iframe lacks the lang attribute, but I added the mixin for H2 headings in Cover blocks as well as the citation in a floating Pullquote block anyway.
| .site-header.featured-image .entry-meta, | ||
| .site-header.featured-image .entry-title, | ||
| .site-header.featured-image#masthead .site-title a { | ||
| .site-header.featured-image .entry-title, .site-header.featured-image#masthead .site-title a { |
There was a problem hiding this comment.
Some selectors are not on their own line, but that is quite minor.
However, if it helps, the other PR has notes for changes to the postcss.config.js file.
Co-authored by @desrosj
node-sasswithsassin package, and updates the build scripts.lighten(),darken(), andmix()with the previously computed color values.@extendfor 76 of the 81 selectors instyle.css(andstyle-rtl.css) and 30 of 33 selectors instyle-editor.css.//—so they do not print in an unrelated place, such asTrac 63013
Use of AI Tools
This is built on #12156, which involved Claude and Copilot, but I did not use AI in addition to that.
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.