Skip to content

Commit

Permalink
Moving vui-typography-font mixin into its own file so that it can be …
Browse files Browse the repository at this point in the history
…used elsewhere without importing font.
  • Loading branch information
dbatiste committed Feb 18, 2016
1 parent 81614b5 commit 322fbc8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 36 deletions.
37 changes: 37 additions & 0 deletions font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@import 'bower_components/vui-colors/colors.scss';
@import 'px-to-base-rem.scss';

@mixin vui-typography-font(
$line-height: 1.5
) {

color: $vui-color-ferrite;
font-family: 'Lato', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: 1rem;
font-weight: 300;
line-height: $line-height;
letter-spacing: px-to-base-rem(0.3px);

&.vui-dyslexic,
.vui-dyslexic {
font-weight: 400;
font-family: 'Open Dyslexic', sans-serif;
}

:lang(ar) {
font-family: 'Arabic Transparent', 'Arabic Typesetting', 'Geeza Pro', sans-serif;
}
:lang(zh-CN) {
font-family: 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}
:lang(zh-TW) {
font-family: 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}
:lang(ko) {
font-family: 'Apple SD Gothic Neo', Dotum, sans-serif;
}
:lang(ja) {
font-family: 'Hiragino Kaku Gothic Pro', 'Meiyro', sans-serif;
}

}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vui-typography",
"version": "2.0.1",
"version": "2.0.2",
"description": "Mixins and CSS for applying basic typography styles",
"scripts": {
"clean": "rimraf *.css && rimraf ./test/*.css",
Expand Down
36 changes: 1 addition & 35 deletions typography.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'bower_components/vui-colors/colors.scss';
@import 'px-to-base-rem.scss';
@import 'font.scss';
@import 'import-once.scss';

@include import-once('brightspace fonts') {
Expand All @@ -15,36 +14,3 @@
}

}

@mixin vui-typography-font() {

color: $vui-color-ferrite;
font-family: 'Lato', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: 1rem;
font-weight: 300;
line-height: 1.5;
letter-spacing: px-to-base-rem(0.3px);

&.vui-dyslexic,
.vui-dyslexic {
font-weight: 400;
font-family: 'Open Dyslexic', sans-serif;
}

:lang(ar) {
font-family: 'Arabic Transparent', 'Arabic Typesetting', 'Geeza Pro', sans-serif;
}
:lang(zh-CN) {
font-family: 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}
:lang(zh-TW) {
font-family: 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}
:lang(ko) {
font-family: 'Apple SD Gothic Neo', Dotum, sans-serif;
}
:lang(ja) {
font-family: 'Hiragino Kaku Gothic Pro', 'Meiyro', sans-serif;
}

}

0 comments on commit 322fbc8

Please sign in to comment.