discourse/app/assets/stylesheets/common/foundation/variables.scss

53 lines
1.5 KiB
SCSS
Raw Normal View History

2013-02-05 14:16:51 -05:00
// --------------------------------------------------
// Variables used throughout the theme
// --------------------------------------------------
// Layout dimensions
// --------------------------------------------------
$small-width: 800px !default;
$medium-width: 995px !default;
$large-width: 1110px !default;
2014-05-06 23:53:04 -04:00
// Brand color variables
// --------------------------------------------------
$google: #5b76f7 !default;
$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;
$base-line-height: 19px !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
/* These files don't actually exist. They're injected by DiscourseSassImporter. */
@import "theme_variables";
@import "plugins_variables";
// w3c definition of color brightness
2014-08-06 09:31:13 -04:00
@function brightness($color) {
@return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114));
2014-08-06 09:31:13 -04:00
}
@function dark-light-diff($adjusted-color, $comparison-color, $lightness, $darkness) {
@if brightness($adjusted-color) < brightness($comparison-color) {
@return scale-color($adjusted-color, $lightness: $lightness);
2014-08-06 09:31:13 -04:00
} @else {
@return scale-color($adjusted-color, $lightness: $darkness);
2014-08-06 09:31:13 -04:00
}
}
@function dark-light-choose($light-theme-result, $dark-theme-result) {
@if brightness($primary) < brightness($secondary) {
@return $light-theme-result;
} @else {
@return $dark-theme-result;
}
}