style(ja): CJK label rules for Japanese

cjk.css now covers Japanese as well as Chinese: tight tracking, the 9px
floor on dock voice labels and layer buttons, whole travel-mode and preset
labels, catalog-case units in the HUD and the taller Recent Imagery cards.
Japanese also gets strict line breaking (no line starts with ー or a small
kana) and unbroken segment labels (すべて, 平面). Chinese rendering is
unchanged: :is(:lang(zh), :lang(ja)) keeps the :lang(zh) specificity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-28 15:13:52 +04:00
1 parent ed40201481
commit e305447713
1 file changed
+29 -16
+29 -16
View File
@@ -1,6 +1,7 @@
/* Tight tracking keeps Chinese labels readable; preserve Latin tracking for /* Chinese and Japanese text. Tight tracking keeps CJK labels readable;
intel HUD readouts and content marked translate="no", including its containers. */ preserve Latin tracking for intel HUD readouts and content marked
html:lang(zh) translate="no", including its containers. */
html:is(:lang(zh), :lang(ja))
body body
:not( :not(
#intel-hud, #intel-hud,
@@ -12,40 +13,52 @@ html:lang(zh)
letter-spacing: 0.02em !important; letter-spacing: 0.02em !important;
} }
/* Keep small Chinese labels legible at a minimum of 9px. */ /* Japanese line breaking: never start a line with ー, a small kana or closing
html:lang(zh) #command-dock .gev-mic-label, punctuation (プレビュ / ー). */
html:lang(zh) #command-dock #gev-voice-detail, html:lang(ja) body {
html:lang(zh) .gev-voice-tier-btn, line-break: strict;
html:lang(zh) .panel-layer-toggle { }
/* Keep small CJK labels legible at a minimum of 9px. */
html:is(:lang(zh), :lang(ja)) #command-dock .gev-mic-label,
html:is(:lang(zh), :lang(ja)) #command-dock #gev-voice-detail,
html:is(:lang(zh), :lang(ja)) .gev-voice-tier-btn,
html:is(:lang(zh), :lang(ja)) .panel-layer-toggle {
font-size: 9px; font-size: 9px;
} }
/* A two-glyph button label must not break between its glyphs. */ /* A two-glyph button label must not break between its glyphs. */
html:lang(zh) .pp-mode-btn { html:is(:lang(zh), :lang(ja)) .pp-mode-btn {
white-space: nowrap;
}
/* Japanese segment labels are short words (すべて, 平面): keep each whole. */
html:lang(ja) .gev-segment {
white-space: nowrap; white-space: nowrap;
} }
/* Keep unit symbols in their catalog case, including the cockpit readouts. */ /* Keep unit symbols in their catalog case, including the cockpit readouts. */
html:lang(zh) #intel-hud *, html:is(:lang(zh), :lang(ja)) #intel-hud *,
html:lang(zh) #cockpit-hud * { html:is(:lang(zh), :lang(ja)) #cockpit-hud * {
text-transform: none; text-transform: none;
} }
/* Move short travel modes (步行 / 骑行) to the next line as whole words. */ /* Move short travel modes (步行 / 骑行, 徒歩 / 自転車) to the next line as
html:lang(zh) [data-layer-id='directions'] .data-toggle-meta { whole words. */
html:is(:lang(zh), :lang(ja)) [data-layer-id='directions'] .data-toggle-meta {
word-break: keep-all; word-break: keep-all;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
/* Leave room for the complete sensor name and resolution on two lines. */ /* Leave room for the complete sensor name and resolution on two lines. */
html:lang(zh) .recent-imagery-readout .ri-strip { html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-strip {
height: 131px; height: 131px;
} }
html:lang(zh) .recent-imagery-readout .ri-card { html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-card {
height: 123px; height: 123px;
grid-template-rows: 42px 13px 22px 11px 18px; grid-template-rows: 42px 13px 22px 11px 18px;
} }
html:lang(zh) .recent-imagery-readout .ri-card-sensor { html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-card-sensor {
white-space: normal; white-space: normal;
text-overflow: clip; text-overflow: clip;
} }