2016-06-03 23:29:21 +03:00
|
|
|
// scss-lint:disable VendorPrefix
|
|
|
|
@mixin typo-preferred-font($use-preferred: true) {
|
|
|
|
@if $use-preferred {
|
|
|
|
font-family: $preferred-font;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-display-4($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:19:45 +03:00
|
|
|
font-size: $unit * 11.2;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 300;
|
|
|
|
line-height: 1;
|
|
|
|
letter-spacing: -.04em;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-display-3($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:19:45 +03:00
|
|
|
font-size: $unit * 5.6;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
|
|
|
line-height: 1.35;
|
|
|
|
letter-spacing: -.02em;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-display-2($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 4.5;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 4.8;
|
2016-06-03 23:29:21 +03:00
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-display-1($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 3.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 4;
|
2016-06-03 23:29:21 +03:00
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-headline($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 2.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 3.2;
|
2016-06-03 23:29:21 +03:00
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-title($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 2;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 500;
|
|
|
|
line-height: 1;
|
|
|
|
letter-spacing: .02em;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-subhead($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.6;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 2.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
letter-spacing: .04em;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-subhead-2($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.6;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 2.8;
|
2016-06-03 23:29:21 +03:00
|
|
|
letter-spacing: .04em;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-body-2($color-contrast: false, $use-preferred: false) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.4;
|
|
|
|
line-height: $unit * 2.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
letter-spacing: 0;
|
|
|
|
|
|
|
|
@if $use-preferred {
|
|
|
|
font-weight: 500;
|
|
|
|
} @else {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-body-1($color-contrast: false, $use-preferred: false) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
2016-07-24 14:17:59 +03:00
|
|
|
line-height: $unit * 2.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
letter-spacing: 0;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-caption($color-contrast: false, $use-preferred: false) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.2;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 400;
|
|
|
|
line-height: 1;
|
|
|
|
letter-spacing: 0;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-blockquote($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
|
|
|
position: relative;
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 2.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-style: italic;
|
|
|
|
font-weight: 300;
|
|
|
|
line-height: 1.35;
|
|
|
|
letter-spacing: .08em;
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
position: absolute;
|
|
|
|
left: -.5em;
|
|
|
|
content: "“";
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
margin-left: -.05em;
|
|
|
|
content: "”";
|
|
|
|
}
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .54;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-menu($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 500;
|
|
|
|
line-height: 1;
|
|
|
|
letter-spacing: 0;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin typo-button($color-contrast: false, $use-preferred: true) {
|
|
|
|
@include typo-preferred-font($use-preferred);
|
2016-07-24 14:17:59 +03:00
|
|
|
font-size: $unit * 1.4;
|
2016-06-03 23:29:21 +03:00
|
|
|
font-weight: 500;
|
|
|
|
line-height: 1;
|
|
|
|
text-transform: uppercase;
|
|
|
|
letter-spacing: 0;
|
|
|
|
|
|
|
|
@if $color-contrast {
|
|
|
|
opacity: .87;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-- Shadows
|
|
|
|
@mixin focus-shadow() {
|
|
|
|
box-shadow: 0 0 8px rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .36);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-2dp() {
|
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 3px 1px -2px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
|
|
|
0 1px 5px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-3dp() {
|
|
|
|
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 3px 3px -2px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
|
|
|
0 1px 8px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-4dp() {
|
|
|
|
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 1px 10px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity),
|
|
|
|
0 2px 4px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-6dp() {
|
|
|
|
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 1px 18px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity),
|
|
|
|
0 3px 5px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-8dp() {
|
|
|
|
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 3px 14px 2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity),
|
|
|
|
0 5px 5px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin shadow-16dp() {
|
|
|
|
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
2016-06-04 17:36:17 +03:00
|
|
|
0 6px 30px 5px rgba(0, 0, 0, $shadow-ambient-shadow-opacity),
|
|
|
|
0 8px 10px -5px rgba(0, 0, 0, $shadow-key-umbra-opacity);
|
2016-06-03 23:29:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
//-- Animations
|
|
|
|
@mixin material-animation-fast-out-slow-in($duration: .2s) {
|
|
|
|
transition-timing-function: $animation-curve-fast-out-slow-in;
|
|
|
|
transition-duration: $duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin material-animation-linear-out-slow-in($duration: .2s) {
|
|
|
|
transition-timing-function: $animation-curve-linear-out-slow-in;
|
|
|
|
transition-duration: $duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin material-animation-fast-out-linear-in($duration: .2s) {
|
|
|
|
transition-timing-function: $animation-curve-fast-out-linear-in;
|
|
|
|
transition-duration: $duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin material-animation-default($duration: .2s) {
|
|
|
|
transition-timing-function: $animation-curve-default;
|
|
|
|
transition-duration: $duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin no-webkit-scrollbar {
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|