ugly modification

This commit is contained in:
xiaolai 2022-12-09 00:45:42 +08:00
parent af637c7a6d
commit 9e6ac7777c
3 changed files with 39 additions and 13 deletions

View file

@ -767,13 +767,15 @@
}
autoSpacing () {
document.addEventListener('DOMContentLoaded', () => {
const callback = () => {
const $$rootList = document.querySelectorAll(this.rootSelector);
for (let $$root of $$rootList) {
this.spacingElement($$root);
}
});
};
if (document.readyState === 'complete') setTimeout(callback);
else document.addEventListener('DOMContentLoaded', callback);
}
}

View file

@ -216,10 +216,6 @@
clear: both;
}
.heti:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti:not(:lang(zh)) {
letter-spacing: 0;
}
.heti > *:first-child,
.heti section > *:first-child,
.heti td > *:first-child {
@ -332,6 +328,22 @@
color: inherit;
}
.heti:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti:not(:lang(zh)) {
letter-spacing: 0;
}
.heti a,
.heti abbr,
.heti code,
.heti heti-spacing,
.heti [lang="en-US"] {
/*
There should be no leeter-spacing between
English characters.
*/
letter-spacing: normal;
}
.heti h1,
.heti h2,
.heti h3,

View file

@ -6,13 +6,6 @@
// 清容器浮动
@include clear-float();
// 非中文时不加间距
letter-spacing: $letter-spacing-medium;
@include non-cjk-block {
letter-spacing: $letter-spacing-normal;
}
// 清容器内首尾元素外边距
&,
section,
@ -113,4 +106,23 @@
}
}
}
// 非中文时不加间距
letter-spacing: $letter-spacing-medium;
@include non-cjk-block {
letter-spacing: $letter-spacing-normal;
}
a,
abbr,
code,
heti-spacing,
[lang="en-US"] {
/*
There should be no leeter-spacing between
English characters.
*/
letter-spacing: normal;
}
}