Commit ef3b96b7 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner

Move font mixins into utils and normalize naming

parent 95409c5c
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
@mixin form-input { @mixin form-input {
@include var.font-normal; @include utils.font--medium;
@include utils.border; @include utils.border;
border-radius: 2px; border-radius: 2px;
padding: 0.5em 0.75em; padding: 0.5em 0.75em;
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
@mixin primary-action-btn { @mixin primary-action-btn {
@include focus.outline-on-keyboard-focus; @include focus.outline-on-keyboard-focus;
@include var.font-normal; @include utils.font--medium;
color: var.$grey-1; color: var.$grey-1;
background-color: var.$grey-mid; background-color: var.$grey-mid;
height: 35px; height: 35px;
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
} }
&__title { &__title {
@include var.font-big; @include utils.font--large;
color: var.$color-brand; color: var.$color-brand;
font-weight: 700; font-weight: 700;
} }
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
@include layout.row($align: center); @include layout.row($align: center);
&__tab { &__tab {
@include utils.font-large; @include utils.font--large;
@include utils.border-right; @include utils.border-right;
flex: 1 1; flex: 1 1;
text-align: center; text-align: center;
......
...@@ -46,3 +46,30 @@ ...@@ -46,3 +46,30 @@
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
@mixin font-base {
line-height: var.$line-height;
font-weight: normal;
color: var.$color-text;
}
@mixin font--xsmall {
@include font-base;
font-size: var.$font-size--xsmall;
}
@mixin font--small {
@include font-base;
font-size: var.$font-size--small;
}
@mixin font--medium {
@include font-base;
font-size: var.$font-size--medium;
}
@mixin font--large {
@include font-base;
font-size: var.$font-size--large;
font-weight: 500;
}
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
} }
&__timestamp-edited { &__timestamp-edited {
@include var.font-small; @include utils.font--small;
font-style: italic; font-style: italic;
color: var.$color-text-light; color: var.$color-text-light;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
@use "../../mixins/utils"; @use "../../mixins/utils";
.annotation-license { .annotation-license {
@include var.font-small; @include utils.font--small;
@include utils.border-top; @include utils.border-top;
padding-top: 0.5em; padding-top: 0.5em;
......
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
} }
& .form-input { & .form-input {
@include var.font-small; @include utils.font--small;
padding: 0.5em; padding: 0.5em;
border-radius: 0; border-radius: 0;
} }
&__permissions { &__permissions {
@include var.font-small; @include utils.font--small;
margin: 0.5em 0; margin: 0.5em 0;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.group-list__menu-label { .group-list__menu-label {
@include var.font-big; @include utils.font--large;
align-items: center; align-items: center;
color: var.$color-text; color: var.$color-text;
display: flex; display: flex;
......
...@@ -13,9 +13,8 @@ ...@@ -13,9 +13,8 @@
} }
&__sub-panel-title { &__sub-panel-title {
@include var.font-big; @include utils.font--large;
flex-grow: 1; flex-grow: 1;
font-weight: 500;
} }
&__subcontent { &__subcontent {
...@@ -49,7 +48,7 @@ ...@@ -49,7 +48,7 @@
@include layout.row($align: center); @include layout.row($align: center);
&__tab { &__tab {
@include var.font-big; @include utils.font--large;
@include utils.border-right; @include utils.border-right;
flex: 1 1; flex: 1 1;
text-align: center; text-align: center;
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
// Content area of the menu. // Content area of the menu.
.menu__content { .menu__content {
@include var.font-big; @include utils.font--large;
@include utils.border; @include utils.border;
background-color: white; background-color: white;
box-shadow: var.$popup-menu-shadow; box-shadow: var.$popup-menu-shadow;
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
} }
.selection-tabs__count { .selection-tabs__count {
@include var.font-tiny; @include utils.font--xsmall;
position: relative; position: relative;
bottom: 3px; bottom: 3px;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@use "../../variables" as var; @use "../../variables" as var;
.top-bar { .top-bar {
@include var.font-big; @include utils.font--large;
@include utils.border-bottom; @include utils.border-bottom;
color: var.$grey-mid; color: var.$grey-mid;
background: var.$white; background: var.$white;
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
.top-bar__login-button { .top-bar__login-button {
@include buttons.button; @include buttons.button;
@include var.font-big; @include utils.font--large;
padding: 0 0.25em; padding: 0 0.25em;
color: var.$color-brand; color: var.$color-brand;
......
@use '../variables' as var; @use '../variables' as var;
@use '../mixins/utils';
// Base styles // Base styles
// ----------- // -----------
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
// ---------------- // ----------------
body { body {
@include var.font-normal; @include utils.font--medium;
height: 100%; height: 100%;
background-color: var.$color-background; background-color: var.$color-background;
......
@use "../variables" as var; @use "../variables" as var;
@use "../mixins/utils";
@mixin styled-text() { @mixin styled-text() {
// Reset the line-height in case any parent elements have set it. // Reset the line-height in case any parent elements have set it.
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
} }
blockquote { blockquote {
@include var.font-normal; @include utils.font--medium;
border-left: 3px solid var.$grey-3; border-left: 3px solid var.$grey-3;
color: var.$color-text-light; color: var.$color-text-light;
......
...@@ -70,6 +70,12 @@ $sans-font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', ...@@ -70,6 +70,12 @@ $sans-font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif !default; sans-serif !default;
$mono-font-family: Open Sans Mono, Menlo, DejaVu Sans Mono, monospace !default; $mono-font-family: Open Sans Mono, Menlo, DejaVu Sans Mono, monospace !default;
$font-size--xsmall: 10px;
$font-size--small: 11px;
$font-size--medium: 13px;
$font-size--large: 14px;
$line-height: 1.4;
// Transitional Typography (Temporary) // Transitional Typography (Temporary)
// ----------------------------------- // -----------------------------------
...@@ -114,26 +120,3 @@ $icon-size--large: 24px; ...@@ -114,26 +120,3 @@ $icon-size--large: 24px;
// Mixins // Mixins
// ------ // ------
@mixin font-tiny {
font-size: 10px;
line-height: 14px;
font-weight: 400;
}
@mixin font-small {
font-size: 11px;
line-height: 15px;
font-weight: 400;
}
@mixin font-normal {
font-size: 13px;
line-height: 17px;
font-weight: 400;
}
@mixin font-big {
font-size: 14px;
line-height: 20px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment