style: add letter spacing to cjk header, navbar and post titles

This commit is contained in:
radishzzz 2025-05-11 00:52:02 +01:00
parent 385b5508aa
commit 9c1d2241d4
8 changed files with 25 additions and 64 deletions

View file

@ -7,10 +7,7 @@
/* Global Styles */
.heti {
--at-apply: 'break-words leading-1.5em tracking-0.02em hyphens-auto';
}
.heti:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) {
--at-apply: 'tracking-0';
--at-apply: 'cjk:tracking-0.02em break-words leading-1.5em hyphens-auto';
}
/* Customized Post Title */
@ -48,12 +45,7 @@
.heti :where(h1),
.heti :where(h2),
.heti :where(h3) {
--at-apply: 'text-pretty tracking-0.05em';
}
.heti :where(h1:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))),
.heti :where(h2:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))),
.heti :where(h3:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
--at-apply: 'text-balance tracking-0';
--at-apply: 'cjk:text-pretty cjk:tracking-0.05em text-balance';
}
.heti :where(h1 + h2),
.heti :where(h2 + h3),
@ -65,10 +57,7 @@
/* Paragraphs */
.heti :where(p) {
--at-apply: 'mb-4 text-justify text-pretty';
}
.heti :where(p:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
--at-apply: 'text-start';
--at-apply: 'cjk:text-justify mb-4 text-pretty';
}
/* Links */
@ -103,12 +92,9 @@ html.dark .heti pre :where(span) {
/* Inline Code */
.heti :where(code) {
--at-apply: 'px-0.4em py-0.2em text-0.85em tracking-0 uno-round-border bg-secondary/5';
--at-apply: 'cjk:break-all px-0.4em py-0.2em text-0.85em tracking-0 uno-round-border bg-secondary/5';
counter-reset: line;
}
.heti :where(code:is(:lang(zh), :lang(ja), :lang(ko))) {
--at-apply: 'break-all';
}
.heti :where(code) span.line {
--at-apply: 'relative pl-8';
}
@ -266,16 +252,12 @@ html.dark .heti sup a:target {
}
/* Cite */
.heti :where(cite:is(:lang(zh), :lang(ja), :lang(ko))) {
--at-apply: 'not-italic';
.heti :where(cite) {
--at-apply: 'cjk:not-italic';
}
/* Quotes */
.heti :where(q) {
.heti :where(q:is(:lang(zh), :lang(ja), :lang(ko))) {
quotes: "「" "」" "『" "』";
}
.heti :where(q:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
quotes: initial;
quotes: auto;
}