1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
Files
checktheroads-hyperglass/hyperglass/render/templates/theme.sass.j2
2019-08-22 20:27:57 -07:00

50 lines
1.3 KiB
Django/Jinja

// Jinja2-rendered theme elements
$hg-primary: {{ colors.primary }}
$hg-background: {{ colors.background }}
$hg-light: {{ colors.light }}
$hg-dark: {{ colors.dark }}
$hg-danger: {{ colors.danger }}
$hg-warning: {{ colors.warning }}
// Functions
@function findTextColor($color)
@if (lightness($color) > 55%)
@return $hg-dark
@else
@return $hg-light
@function findAltBackgroundColor($color)
@if (lightness($color) > 55%)
@return $hg-light
@else
@return $hg-dark
@function findFooterColor($color)
@if (lightness($color) > 55%)
$darker-color: scale-color($hg-light, $lightness: -3%)
@return grayscale($darker-color)
@else
$darker-color: scale-color($hg-dark, $lightness: -3%)
@return grayscale($darker-color)
// App variables
$hg-loading: findAltBackgroundColor($hg-background)
$hg-footer: findFooterColor($hg-background)
// Theme Overrides
$enable-responsive-font-sizes: true
$enable-validation-icons: false
$theme-colors: ("primary": $hg-primary, "danger": $hg-danger, "warning": $hg-warning, "light": $hg-light, "dark": $hg-dark, "loading": $hg-loading, "footer": $hg-footer)
$body-bg: $hg-background
$body-color: findTextColor($body-bg)
$border-radius: .44rem
$border-radius-lg: .4rem
$border-radius-sm: .35rem