perf(tokens): ️ reduce lang selector cost

The original lang selector was too broad and execute needlessly.
This commit is contained in:
alistair3149 2024-10-29 18:48:13 -04:00
parent 2b3dbd9960
commit 2d9febf0e2
No known key found for this signature in database
2 changed files with 14 additions and 14 deletions

View file

@ -46,22 +46,22 @@ sup {
}
em {
:lang( ja ) &,
:lang( ko ) &,
:lang( mn ) &,
:lang( zh ) & {
&:lang( ja ),
&:lang( ko ),
&:lang( mn ),
&:lang( zh ) {
/* CJK languages do not use italics for emphasis */
font-style: normal;
text-emphasis: filled;
}
:lang( ja ) &,
:lang( ko ) &,
:lang( mn ) & {
&:lang( ja ),
&:lang( ko ),
&:lang( mn ) {
text-emphasis-position: over right;
}
:lang( zh ) & {
&:lang( zh ) & {
text-emphasis-position: under right;
}
}

View file

@ -336,13 +336,13 @@
@media ( prefers-contrast: less ) {
--font-weight-normal: 300;
}
}
/* CJK languages need increased line-height for readability */
:lang( ja ),
:lang( ko ),
:lang( zh ) {
--line-height: 1.75;
/* CJK languages need increased line-height for readability */
&:lang( ja ),
&:lang( ko ),
&:lang( zh ) {
--line-height: 1.75;
}
}
// TODO: Update with implementation on T376559 when it is finalized