Skip to content

Instantly share code, notes, and snippets.

@terrylinooo
Created March 18, 2017 11:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save terrylinooo/0bf6009514810b44c0823271cc627817 to your computer and use it in GitHub Desktop.
「Han.css 漢字標準格式」只針對注音符號的部分,如果只需要排版注音符號,實在沒必要載入全部的 Sass
ruby.zhuyin h-zhuyin,
ruby.mps h-zhuyin,
h-ruby.zhuyin h-zhuyin {
position: relative;
letter-spacing: 0; }
ruby.zhuyin h-diao,
ruby.mps h-diao,
h-ruby.zhuyin h-diao {
position: absolute;
right: -0.9em;
bottom: 0.5em;
display: block;
font-size: 1.5em; }
ruby.zhuyin h-diao h-char,
ruby.mps h-diao h-char,
h-ruby.zhuyin h-diao h-char {
-webkit-writing-mode: horizontal-tb;
writing-mode: horizontal-tb; }
ruby.zhuyin [diao='˙'] h-diao,
ruby.mps [diao='˙'] h-diao,
h-ruby.zhuyin [diao='˙'] h-diao {
top: -0.3em;
right: auto;
bottom: auto;
left: 0;
font-size: 1em; }
ruby.zhuyin [diao^='ㆴ'] h-diao,
ruby.zhuyin [diao^='ㆵ'] h-diao,
ruby.zhuyin [diao^='ㆶ'] h-diao,
ruby.zhuyin [diao^='ㆷ'] h-diao,
ruby.zhuyin [diao='󳆴'] h-diao,
ruby.zhuyin [diao='󳆵'] h-diao,
ruby.zhuyin [diao='󳆶'] h-diao,
ruby.zhuyin [diao='󳆷'] h-diao,
ruby.mps [diao^='ㆴ'] h-diao,
ruby.mps [diao^='ㆵ'] h-diao,
ruby.mps [diao^='ㆶ'] h-diao,
ruby.mps [diao^='ㆷ'] h-diao,
ruby.mps [diao='󳆴'] h-diao,
ruby.mps [diao='󳆵'] h-diao,
ruby.mps [diao='󳆶'] h-diao,
ruby.mps [diao='󳆷'] h-diao,
h-ruby.zhuyin [diao^='ㆴ'] h-diao,
h-ruby.zhuyin [diao^='ㆵ'] h-diao,
h-ruby.zhuyin [diao^='ㆶ'] h-diao,
h-ruby.zhuyin [diao^='ㆷ'] h-diao,
h-ruby.zhuyin [diao='󳆴'] h-diao,
h-ruby.zhuyin [diao='󳆵'] h-diao,
h-ruby.zhuyin [diao='󳆶'] h-diao,
h-ruby.zhuyin [diao='󳆷'] h-diao {
right: -1em;
bottom: -0.125em;
font-size: 1em; }
h-ru[annotation] {
position: relative;
display: inline-table;
border-collapse: collapse;
border-spacing: 0;
line-height: 1.1;
text-align: center;
vertical-align: 1em; }
h-ru[annotation] > h-ru[annotation] {
vertical-align: -0.1em; }
h-ru[annotation] > h-ru,
h-ru[annotation] > rb,
h-ru[annotation] > rt {
line-height: 1;
text-align: center; }
h-ru[annotation] > rt {
display: table-header-group;
height: 1em;
font-size: 0.5em;
white-space: nowrap;
word-break: normal; }
h-ru[annotation] > rt:before, h-ru[annotation] > rt:after {
content: " "; }
h-ru[order='0'] > rt,
h-ruby[rightangle][doubleline] h-ru[order='0'] > rt {
display: table-header-group; }
h-ru[order='1'] > rt,
h-ruby[rightangle] h-ru[order='0'] > rt,
h-ruby[rightangle][doubleline] h-ru[order='1'] > rt {
display: table-footer-group; }
h-ru[order='0'] > h-ru[order='1'] {
vertical-align: 0.15em; }
h-ruby[rightangle][doubleline] h-ru[order='0'] rt {
line-height: 1.5; }
h-ruby[rightangle][doubleline] h-ru[annotation] {
vertical-align: 0.5em; }
[zhuyin] h-zhuyin {
-moz-text-emphasis: none;
-webkit-text-emphasis: none;
text-emphasis: none;
font-style: normal;
font-weight: normal;
line-height: normal;
text-decoration: none;
text-indent: 0;
position: relative;
display: inline-block;
height: 1em;
width: 0.4em;
vertical-align: text-top; }
[zhuyin] h-zhuyin > * {
-moz-transform: scale(0.4);
-ms-transform: scale(0.4);
-webkit-transform: scale(0.4);
transform: scale(0.4);
-moz-transform-origin: left top;
-ms-transform-origin: left top;
-webkit-transform-origin: left top;
transform-origin: left top;
display: inline-block; }
[zhuyin] h-yin {
position: absolute;
left: 0;
height: 1em;
vertical-align: top;
line-height: 1; }
[zhuyin] h-diao {
position: absolute;
bottom: 0;
right: -0.9em;
line-height: 1; }
[zhuyin] h-yin:empty,
[zhuyin] h-diao:empty {
display: none; }
[zhuyin] [length='0'] {
margin-right: 0; }
[zhuyin] [length='0'] h-zhuyin {
display: none; }
[zhuyin] [length='1'] h-yin {
top: 0.3em; }
[zhuyin] [length='1'] h-diao {
bottom: 0; }
[zhuyin] [length='2'] h-yin {
top: 0.05em; }
[zhuyin] [length='2'] h-diao {
bottom: -0.3em; }
[zhuyin] [length='3'] h-yin {
top: -0.05em;
line-height: 0.85; }
[zhuyin] [length='3'] h-diao {
bottom: -0.35em; }
[zhuyin] [diao='˙'] h-diao {
top: 0;
right: auto;
bottom: auto;
left: 0.06em; }
[zhuyin] [diao='˙'] [length='1'] h-diao {
top: 0.15em; }
[zhuyin] [diao='˙'] [length='2'] h-diao {
top: -0.05em; }
[zhuyin] [diao='˙'] [length='3'] h-diao {
top: -0.2em; }
[zhuyin] [diao='˪'] h-diao,
[zhuyin] [diao='˫'] h-diao {
-moz-transform: scale(0.6);
-ms-transform: scale(0.6);
-webkit-transform: scale(0.6);
transform: scale(0.6);
-moz-transform-origin: left top;
-ms-transform-origin: left top;
-webkit-transform-origin: left top;
transform-origin: left top; }
[zhuyin] [diao^='ㆴ'] h-diao,
[zhuyin] [diao^='ㆵ'] h-diao,
[zhuyin] [diao^='ㆶ'] h-diao,
[zhuyin] [diao^='ㆷ'] h-diao,
[zhuyin] [diao='󳆴'] h-diao,
[zhuyin] [diao='󳆵'] h-diao,
[zhuyin] [diao='󳆶'] h-diao,
[zhuyin] [diao='󳆷'] h-diao {
bottom: -0.6em;
margin-right: 0.3em; }
[zhuyin] {
margin-right: 0.2em;
display: inline-block;
line-height: 1.8; }
[rightangle] h-ru[annotation] {
vertical-align: 0;
line-height: 1; }
[rightangle] rt:after {
content: "";
display: inline-block;
width: 1.2em; }
h-ru h-ru[zhuyin] {
margin-top: -0.4em;
margin-bottom: -0.2em;
line-height: 1.8; }
h-jinze,
h-word {
display: inline-block;
text-indent: 0; }
/**
* Zhuyin Heiti
*/
@font-face {
font-family: 'Zhuyin Heiti';
src: local("Hiragino Sans GB"), local("Heiti TC"), local("Microsoft Jhenghei"); }
@font-face {
font-family: 'Zhuyin Heiti';
src: local("Heiti TC"), local("Microsoft Jhenghei");
unicode-range: U+3127; }
@font-face {
font-family: 'Zhuyin Heiti';
unicode-range: U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+31B4, U+31B5, U+31B6, U+31B7, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; }
/**
* Romanisation (checked tone ligature [陽入韻連字])
*/
@font-face {
font-family: 'Romanization Sans';
unicode-range: U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; }
.no-unicoderange ruby h-zhuyin, .no-unicoderange
ruby h-diao, .no-unicoderange
h-ruby h-zhuyin, .no-unicoderange
h-ruby h-diao {
font-family: "Zhuyin Kaiti", cursive, serif; }
ruby h-diao,
h-ruby h-diao {
font-family: "Zhuyin Kaiti", cursive, serif; }
ruby.romanization rt,
ruby [annotation] rt,
h-ruby.romanization rt,
h-ruby [annotation] rt {
font-family: "Romanization Sans", "Helvetica Neue", Helvetica, Arial, han-typeface("Han Heiti", default, ""), sans-serif; }
/*# sourceMappingURL=han_less.css.map */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment