diff options
author | Valentin Popov <valentineus@gmail.com> | 2018-04-11 17:15:16 +0300 |
---|---|---|
committer | Valentin Popov <valentineus@gmail.com> | 2018-04-11 17:16:23 +0300 |
commit | dea81cbba48892c4ff52243588440533b3dce646 (patch) | |
tree | 5efab8711bd404ba1ce79d1221949bed16486345 /_scss/_tools.scss | |
parent | 76ea2daaf6f6c4ba29edce704683b5e6ed225d2b (diff) | |
download | popov.link-dea81cbba48892c4ff52243588440533b3dce646.tar.xz popov.link-dea81cbba48892c4ff52243588440533b3dce646.zip |
Additional tools
Diffstat (limited to '_scss/_tools.scss')
-rw-r--r-- | _scss/_tools.scss | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/_scss/_tools.scss b/_scss/_tools.scss index dd9d0f5..e6f27c2 100644 --- a/_scss/_tools.scss +++ b/_scss/_tools.scss @@ -7,10 +7,36 @@ // Default: content-box // // https://www.w3.org/TR/css-ui-3/#box-sizing - @mixin borderbox($value: content-box) { -webkit-box-sizing: $value; -moz-box-sizing: $value; -ms-box-sizing: $value; box-sizing: $value; } + +// Targeting media types +// +// The @media rule is used in media queries to apply different styles for +// different media types/devices. +// +// https://www.w3.org/TR/css3-mediaqueries/ +@mixin mobile-screen() { + @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { + @content; + } +} + +// Calculates the font size for the title. +// +// Default: 1 +@function get-font-size-for-pc($heading: 1) { + @return 1.4rem + ($heading * .3rem); +} + +// Calculates the size of the mobile font for the title. +// +// Default: 1 +@function get-font-size-for-phone($heading: 1) { + $pc: get-font-size-for-pc($heading); + @return $pc - .4rem; +} |