Skip to content

Commit

Permalink
Merge pull request #26 from Brightspace/dbatiste/factor-font-styles
Browse files Browse the repository at this point in the history
Factoring out font styles so they can be used elsewhere.
  • Loading branch information
dbatiste committed Nov 3, 2015
2 parents 9bfb568 + dcabe64 commit c2c756a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
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": "1.0.3",
"version": "1.0.4",
"description": "Mixins and CSS for applying basic typography styles",
"scripts": {
"clean": "rimraf *.css",
Expand Down
35 changes: 20 additions & 15 deletions typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ $vui-base-fontSize: 19px;

@mixin vui-typography() {

@include vui-typography-font();

& p {
margin: 1rem 0;
}

}

@mixin vui-typography-font() {

color: $vui-color-ferrite;
font-family: 'Lato', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: 1rem;
Expand Down Expand Up @@ -36,70 +46,65 @@ $vui-base-fontSize: 19px;
font-family: 'Hiragino Kaku Gothic Pro', 'Meiyro', sans-serif;
}

& p {
margin: 1rem 0;
}

}

@mixin vui-typography-font() {

font-family: inherit;

}

@mixin vui-typography-heading1() {
@include vui-typography-font;

color: $vui-color-ferrite;
font-family: inherit;
font-size: px-to-rem(38px, $vui-base-fontSize);
font-weight: 300;
line-height: 2rem;
letter-spacing: px-to-rem(-0.5px, $vui-base-fontSize);
margin: 2rem 0 1rem 0;

}

@mixin vui-typography-heading2() {
@include vui-typography-font;

color: $vui-color-ferrite;
font-family: inherit;
font-size: px-to-rem(28px, $vui-base-fontSize);
font-weight: 300;
line-height: 2rem;
letter-spacing: px-to-rem(-0.3px, $vui-base-fontSize);
margin: 1rem 0 1rem 0;

}

@mixin vui-typography-heading3() {
@include vui-typography-font;

color: $vui-color-ferrite;
font-family: inherit;
font-size: px-to-rem(19px, $vui-base-fontSize);
font-weight: 400;
line-height: 2rem;
letter-spacing: px-to-rem(0.5px, $vui-base-fontSize);
margin: 1rem 0 1rem 0;

}

@mixin vui-typography-small-text() {
@include vui-typography-font;

color: $vui-color-ferrite;
font-family: inherit;
font-size: px-to-rem(14px, $vui-base-fontSize);
font-weight: 400;
line-height: 1rem;
letter-spacing: px-to-rem(0.2px, $vui-base-fontSize);
margin: 1rem 0 1rem 0;

}

@mixin vui-typography-small-strong-text() {
@include vui-typography-font;

color: $vui-color-ferrite;
font-family: inherit;
font-size: px-to-rem(14px, $vui-base-fontSize);
font-weight: 700;
line-height: 1rem;
letter-spacing: px-to-rem(0.4px, $vui-base-fontSize);
margin: 1rem 0 1rem 0;
text-transform: uppercase;

}

0 comments on commit c2c756a

Please sign in to comment.