2013-02-05 14:16:51 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
// Variables used throughout the theme
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-02-10 01:04:21 -05:00
|
|
|
// Layout dimensions
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-07-09 19:56:35 -04:00
|
|
|
$small-width: 800px !default;
|
2014-02-10 01:04:21 -05:00
|
|
|
$medium-width: 995px !default;
|
|
|
|
$large-width: 1110px !default;
|
|
|
|
|
2014-05-06 23:53:04 -04:00
|
|
|
// Brand color variables
|
2014-02-10 01:04:21 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
$google: #5b76f7 !default;
|
2016-02-24 20:21:59 -05:00
|
|
|
$instagram: #125688 !default;
|
2014-02-10 01:04:21 -05:00
|
|
|
$facebook: #3b5998 !default;
|
|
|
|
$cas: #70BA61 !default;
|
|
|
|
$twitter: #00bced !default;
|
|
|
|
$yahoo: #810293 !default;
|
|
|
|
$github: #6d6d6d !default;
|
|
|
|
|
2014-03-26 21:16:41 -04:00
|
|
|
// Fonts
|
2013-02-05 14:16:51 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-12-16 09:24:15 -05:00
|
|
|
$base-font-size: 14px !default;
|
2014-04-06 20:06:55 -04:00
|
|
|
$base-font-family: Helvetica, Arial, sans-serif !default;
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2018-01-12 17:27:38 -05:00
|
|
|
// Font-size defintions, multiplier ^ (step / interval)
|
|
|
|
$font-up-6: 2.296em;
|
|
|
|
$font-up-5: 2em;
|
|
|
|
$font-up-4: 1.7511em;
|
|
|
|
$font-up-3: 1.5157em;
|
|
|
|
$font-up-2: 1.3195em;
|
|
|
|
$font-up-1: 1.1487em; // 2^(1/5)
|
|
|
|
$font-0: 1em;
|
|
|
|
$font-down-1: .8706em; // 2^(-1/5)
|
|
|
|
$font-down-2: .7579em; // Smallest size we use based on the 1em base
|
|
|
|
$font-down-3: .6599em;
|
|
|
|
$font-down-4: .5745em;
|
|
|
|
$font-down-5: .5em;
|
|
|
|
$font-down-6: .4355em;
|
|
|
|
|
|
|
|
// Common line-heights
|
|
|
|
$line-height-small: 1;
|
|
|
|
$line-height-medium: 1.2; // Headings or large text
|
|
|
|
$line-height-large: 1.4; // Normal or small text
|
|
|
|
|
|
|
|
// These files don't actually exist. They're injected by Stylesheet::Compiler.
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-05-02 17:46:03 -04:00
|
|
|
@import "theme_variables";
|
2014-04-25 04:26:37 -04:00
|
|
|
@import "plugins_variables";
|
2015-08-20 16:10:54 -04:00
|
|
|
@import "common/foundation/math";
|
2014-05-19 01:17:59 -04:00
|
|
|
|
2018-01-16 19:05:12 -05:00
|
|
|
// Z-index
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
$z-layers: (
|
|
|
|
"max": 9999,
|
|
|
|
"fullscreen": 1700,
|
|
|
|
"modal": (
|
|
|
|
"tooltip": 1600,
|
|
|
|
"popover": 1500,
|
|
|
|
"dropdown": 1400,
|
|
|
|
"content": 1300,
|
|
|
|
"overlay": 1200,
|
|
|
|
),
|
|
|
|
"mobile-composer": 1100,
|
|
|
|
"header": 1000,
|
|
|
|
"tooltip": 600,
|
|
|
|
"composer": (
|
|
|
|
"popover": 500,
|
|
|
|
"content": 400,
|
|
|
|
),
|
|
|
|
"dropdown": 300,
|
|
|
|
"usercard": 200,
|
|
|
|
"timeline": 100,
|
|
|
|
"base": 1
|
|
|
|
);
|
|
|
|
|
|
|
|
@function map-has-nested-keys($map, $keys...) {
|
|
|
|
@each $key in $keys {
|
|
|
|
@if not map-has-key($map, $key) {
|
|
|
|
@return false;
|
|
|
|
}
|
|
|
|
$map: map-get($map, $key);
|
|
|
|
}
|
|
|
|
@return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@function map-deep-get($map, $keys...) {
|
|
|
|
@each $key in $keys {
|
|
|
|
$map: map-get($map, $key);
|
|
|
|
}
|
|
|
|
@return $map;
|
|
|
|
}
|
|
|
|
|
|
|
|
@function z($layers...) {
|
|
|
|
@if not map-has-nested-keys($z-layers, $layers...) {
|
|
|
|
@warn "No layer defined for `#{inspect($layers...)}` in $z-layers map. Check variables.scss, property omitted.";
|
|
|
|
}
|
|
|
|
@return map-deep-get($z-layers, $layers...);
|
|
|
|
}
|
|
|
|
|
2018-01-12 17:27:38 -05:00
|
|
|
// Color utilities
|
|
|
|
// --------------------------------------------------
|
2015-08-20 15:54:07 -04:00
|
|
|
|
2017-08-25 14:09:00 -04:00
|
|
|
// w3c definition of color brightness https://www.w3.org/TR/AERT#color-contrast
|
|
|
|
@function dc-color-brightness($color) {
|
2015-04-23 13:33:29 -04:00
|
|
|
@return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114));
|
2014-08-06 09:31:13 -04:00
|
|
|
}
|
|
|
|
|
2015-08-20 15:54:07 -04:00
|
|
|
// Uses an approximation of sRGB blending, GAMMA=2 instead of GAMMA=2.2
|
2015-08-20 16:31:00 -04:00
|
|
|
@function srgb-scale($foreground, $background, $percent) {
|
2015-08-20 15:54:07 -04:00
|
|
|
$ratio: ($percent / 100%);
|
|
|
|
$iratio: 1 - $ratio;
|
2015-08-20 16:31:00 -04:00
|
|
|
$f_r2: red($foreground) * red($foreground);
|
|
|
|
$f_g2: green($foreground) * green($foreground);
|
|
|
|
$f_b2: blue($foreground) * blue($foreground);
|
|
|
|
$b_r2: red($background) * red($background);
|
|
|
|
$b_g2: green($background) * green($background);
|
|
|
|
$b_b2: blue($background) * blue($background);
|
|
|
|
$r_r2: $f_r2 * $ratio + $b_r2 * $iratio;
|
|
|
|
$r_g2: $f_g2 * $ratio + $b_g2 * $iratio;
|
|
|
|
$r_b2: $f_b2 * $ratio + $b_b2 * $iratio;
|
|
|
|
$r_r: sqrt($r_r2);
|
|
|
|
$r_g: sqrt($r_g2);
|
|
|
|
$r_b: sqrt($r_b2);
|
|
|
|
@return rgb($r_r, $r_g, $r_b);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Replaces dark-light-diff($primary, $secondary, 50%, -50%)
|
2015-08-20 19:47:34 -04:00
|
|
|
@function blend-primary-secondary($percent) {
|
2015-08-20 16:31:00 -04:00
|
|
|
@return srgb-scale($primary, $secondary, $percent);
|
|
|
|
}
|
|
|
|
|
2014-08-06 09:31:13 -04:00
|
|
|
@function dark-light-diff($adjusted-color, $comparison-color, $lightness, $darkness) {
|
2017-08-25 14:09:00 -04:00
|
|
|
@if dc-color-brightness($adjusted-color) < dc-color-brightness($comparison-color) {
|
2015-04-23 13:33:29 -04:00
|
|
|
@return scale-color($adjusted-color, $lightness: $lightness);
|
2014-08-06 09:31:13 -04:00
|
|
|
} @else {
|
2015-04-23 13:33:29 -04:00
|
|
|
@return scale-color($adjusted-color, $lightness: $darkness);
|
2014-08-06 09:31:13 -04:00
|
|
|
}
|
|
|
|
}
|
2015-08-18 15:23:06 -04:00
|
|
|
@function dark-light-choose($light-theme-result, $dark-theme-result) {
|
2017-08-25 14:09:00 -04:00
|
|
|
@if dc-color-brightness($primary) < dc-color-brightness($secondary) {
|
2015-08-18 15:23:06 -04:00
|
|
|
@return $light-theme-result;
|
|
|
|
} @else {
|
|
|
|
@return $dark-theme-result;
|
|
|
|
}
|
|
|
|
}
|
2017-06-11 22:20:14 -04:00
|
|
|
|
|
|
|
// standard color transformations, use these if possible, and add any new dark-light-diffs here
|
|
|
|
|
|
|
|
//primary
|
2017-11-10 11:57:02 -05:00
|
|
|
$primary-very-low: dark-light-diff($primary, $secondary, 97%, -80%);
|
2017-06-11 22:20:14 -04:00
|
|
|
$primary-low: dark-light-diff($primary, $secondary, 90%, -65%);
|
2017-10-10 16:07:46 -04:00
|
|
|
$primary-low-mid: dark-light-diff($primary, $secondary, 70%, -45%);
|
2017-11-27 18:20:07 -05:00
|
|
|
$primary-medium: dark-light-diff($primary, $secondary, 50%, -35%);
|
2017-10-10 16:07:46 -04:00
|
|
|
$primary-high: dark-light-diff($primary, $secondary, 30%, -10%);
|
|
|
|
|
|
|
|
//header_primary
|
|
|
|
$header_primary-low: dark-light-diff($header_primary, $secondary, 90%, -65%);
|
|
|
|
$header_primary-medium: dark-light-diff($header_primary, $secondary, 50%, -20%);
|
|
|
|
$header_primary-high: dark-light-diff($header_primary, $secondary, 20%, 20%);
|
|
|
|
|
2017-06-11 22:20:14 -04:00
|
|
|
//secondary
|
2017-10-10 16:07:46 -04:00
|
|
|
$secondary-low: dark-light-diff($secondary, $primary, 70%, -70%);
|
|
|
|
$secondary-medium: dark-light-diff($secondary, $primary, 50%, -50%);
|
|
|
|
$secondary-high: dark-light-diff($secondary, $primary, 30%, -35%);
|
2017-06-11 22:20:14 -04:00
|
|
|
|
|
|
|
//tertiary
|
|
|
|
$tertiary-low: dark-light-diff($tertiary, $secondary, 85%, -65%);
|
2017-10-10 16:07:46 -04:00
|
|
|
$tertiary-medium: dark-light-diff($tertiary, $secondary, 50%, -45%);
|
|
|
|
$tertiary-high: dark-light-diff($tertiary, $secondary, 20%, -25%);
|
2017-06-11 22:20:14 -04:00
|
|
|
|
|
|
|
//quaternary
|
|
|
|
$quaternary-low: dark-light-diff($quaternary, $secondary, 70%, -70%);
|
|
|
|
|
|
|
|
//highlight
|
|
|
|
$highlight-low: dark-light-diff($highlight, $secondary, 70%, -80%);
|
|
|
|
$highlight-medium: dark-light-diff($highlight, $secondary, 50%, -55%);
|
2017-11-30 10:13:09 -05:00
|
|
|
$highlight-high: dark-light-diff($highlight, $secondary, -50%, -10%);
|
2017-06-11 22:20:14 -04:00
|
|
|
|
|
|
|
//danger
|
|
|
|
$danger-low: dark-light-diff($danger, $secondary, 50%, -40%);
|
|
|
|
$danger-medium: dark-light-diff($danger, $secondary, 30%, -60%);
|
|
|
|
|
|
|
|
//success
|
2017-10-10 16:07:46 -04:00
|
|
|
$success-low: dark-light-diff($success, $secondary, 80%, -60%);
|
|
|
|
$success-medium: dark-light-diff($success, $secondary, 50%, -40%);
|
2017-06-11 22:20:14 -04:00
|
|
|
|
|
|
|
//love
|
|
|
|
$love-low: dark-light-diff($love, $secondary, 85%, -60%);
|