]> git.proxmox.com Git - extjs.git/blob - extjs/modern/theme-base/sass/etc/mixins/font.scss
add extjs 6.0.1 sources
[extjs.git] / extjs / modern / theme-base / sass / etc / mixins / font.scss
1 /**
2 * @class Global_CSS
3 */
4
5 /**
6 * Adds a font specification to an element.
7 * Uses a single "font" property if possible, otherwise uses separate font-family, font-size,
8 * font-weight and line-height properties.
9 *
10 * @param {number/string} $font-weight
11 * The font-weight
12 *
13 * @param {number/string} $font-size
14 * The font-size
15 *
16 * @param {number/string} $line-height
17 * The line-height
18 *
19 * @param {string} $font-family
20 * The font-family
21 *
22 * @private
23 */
24 @mixin font($font-weight: null, $font-size: null, $line-height: null, $font-family: null) {
25 @if $font-family == null or $font-size == null {
26 // if font-family or font-size is null we cannot use a single "font" declaration
27 font-weight: $font-weight;
28 font-size: $font-size;
29 line-height: $line-height;
30 font-family: $font-family;
31 } @else if $line-height == null {
32 font: $font-weight $font-size $font-family;
33 } @else {
34 font: $font-weight #{$font-size}/#{$line-height} $font-family;
35 }
36 }