feat: support CJK & ANS spacing

This commit is contained in:
Sivan 2020-03-01 05:51:00 +08:00
parent 25cfc2229a
commit f601c82590
13 changed files with 1125 additions and 87 deletions

View file

@ -3,12 +3,13 @@
@import "../variables";
@mixin hetiInlineHelperClasses {
// 标点悬挂 Punctuation mark hanging
// @todo: 用于标点悬挂用的样式
#{$root-selector}-hang {
@include hang();
}
// 显示强烈着重号
// 强烈着重号 Emphasis Mark
#{$root-selector}-em {
-webkit-text-emphasis: filled circle;
-webkit-text-emphasis-position: under;
@ -17,4 +18,21 @@
-webkit-text-emphasis: none;
}
}
// 内联 Ruby
// 在非行间注排版中使用 ruby 标签且不额外占据空间
// 使用此样式需按字拆分 <ruby class="heti-ruby heti-ruby--inline"><rb></rb><rp>(</rp><rt></rt><rp>)</rp></ruby>
// https://stackoverflow.com/questions/38680695/adjust-the-vertical-positioning-of-ruby-text/38877801#38877801
#{$root-selector}-ruby {
&--inline {
display: inline-flex;
flex-direction: column-reverse;
height: 1.5em;
rt {
display: inline;
line-height: 0.5;
}
}
}
}