refactor: use scss features

This commit is contained in:
Guilherme Danno 2020-05-16 00:54:46 -03:00
parent 594580ec2d
commit 575dcd8334
4 changed files with 45 additions and 37 deletions

View File

@ -1,5 +1,11 @@
html { @mixin font($weight: null, $size: null) {
font-family: "Noto Sans", sans-serif; font-family: "Noto Sans", sans-serif;
font-weight: $weight;
font-size: $size;
}
html {
@include font;
font-size: 93%; font-size: 93%;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
text-size-adjust: 100%; text-size-adjust: 100%;
@ -7,25 +13,16 @@ html {
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
h1,
h2,
h3 {
font-family: "Noto Sans", sans-serif;
}
h1 { h1 {
font-weight: 400; @include font(400, 1.8em);
font-size: 1.8em;
} }
h2 { h2 {
font-weight: 400; @include font(400, 1.5em);
font-size: 1.5em;
} }
h3 { h3 {
font-weight: 400; @include font(400, 1.17em);
font-size: 1.17em;
} }
.layout-tv { .layout-tv {

View File

@ -1,31 +1,31 @@
h1 { @mixin header-font($size: null) {
font-weight: 400; font-weight: 400;
font-size: 1.8em; font-size: $size;
} }
.layout-desktop h1 { html {
font-size: 2em; @media all and (min-height: 720px) {
}
h2 {
font-weight: 400;
font-size: 1.5em;
}
h3 {
font-weight: 400;
font-size: 1.17em;
}
@media all and (min-height: 720px) {
html {
font-size: 20px; font-size: 20px;
} }
}
/* This is supposed to be 1080p, but had to reduce the min height to account for possible browser chrome */ /* This is supposed to be 1080p, but had to reduce the min height to account for possible browser chrome */
@media all and (min-height: 1000px) { @media all and (min-height: 1000px) {
html {
font-size: 27px; font-size: 27px;
} }
} }
h1 {
@include header-font(1.8em);
.layout-desktop & {
font-size: 2em;
}
}
h2 {
@include header-font(1.8em);
}
h3 {
@include header-font(1.17em);
}

View File

@ -2,8 +2,8 @@
padding-bottom: 15em; padding-bottom: 15em;
} }
@media all and (min-width: 62.5em) { #guideTab {
#guideTab { @media all and (min-width: 62.5em) {
padding-left: 0.5em; padding-left: 0.5em;
} }
} }

View File

@ -16,6 +16,17 @@ body {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
.clipForScreenReader {
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
}
.material-icons { .material-icons {
/* Fix font ligatures on older WebOS versions */ /* Fix font ligatures on older WebOS versions */
-webkit-font-feature-settings: "liga"; -webkit-font-feature-settings: "liga";