Skip to content

Instantly share code, notes, and snippets.

@crgwbr
Created July 4, 2014 13:31
Show Gist options
  • Save crgwbr/98dd259f2646d36033be to your computer and use it in GitHub Desktop.
Save crgwbr/98dd259f2646d36033be to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
$fonts-chinese: Microsoft YaHei;
$fonts-amharic: fonts;
@mixin vernStandard($langCodes, $fontFamily, $fontSize: "", $direction: ltr, $lineHeight: inherit, $breakWord: "") {
$globalID: unique_id();
$classID: unique_id();
%#{$globalID} { // Applies to lang code and autocomplete
font-family: $fontFamily;
}
%#{$classID} { // Applies where lang-* class is used
font-family: $fontFamily;
direction: $direction;
line-height: $lineHeight;
@if ($fontSize != "") {
font-size: $fontSize;
}
@if ($breakWord == true) {
word-wrap: break-word;
overflow-wrap: break-word;
}
}
@each $langCode in $langCodes { // Loops through $langCode if list is provided
*[lang="#{$langCode}"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="#{$langCode}"][dir="#{$direction}"] {
@extend %#{$globalID};
}
body.lang-#{$langCode},
*.lang-#{$langCode} {
@extend %#{$classID};
}
}
}
@include vernStandard(am, $fonts-amharic, $fontSize: 105%);
@include vernStandard(zh-hans zh-hant csl hks tss, $fonts-chinese, $fontSize: 100%, $lineHeight: 1.5);
*[lang="am"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="am"][dir="ltr"] {
font-family: fonts;
}
body.lang-am,
*.lang-am {
font-family: fonts;
direction: ltr;
line-height: inherit;
font-size: 105%;
}
*[lang="zh-hans"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="zh-hans"][dir="ltr"], *[lang="zh-hant"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="zh-hant"][dir="ltr"], *[lang="csl"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="csl"][dir="ltr"], *[lang="hks"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="hks"][dir="ltr"], *[lang="tss"],
.jsAutoCompleteSelector div.jsAutoCompleteColumn ul li[lang="tss"][dir="ltr"] {
font-family: Microsoft YaHei;
}
body.lang-zh-hans,
*.lang-zh-hans, body.lang-zh-hant,
*.lang-zh-hant, body.lang-csl,
*.lang-csl, body.lang-hks,
*.lang-hks, body.lang-tss,
*.lang-tss {
font-family: Microsoft YaHei;
direction: ltr;
line-height: 1.5;
font-size: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment