Bulma 有 2个 变量文件 分为 4 节(sections):
-
初始化变量(Initial variables): 使用字面值来定义它, 比如:
- 颜色(colors):
$blue: hsl(229, 53%, 53%)
- 字体大小(font sizes):
$size-1: 3rem
- 尺寸(dimensions):
$gap: 32px
- 其他值(other values):
$easing: ease-out
or$radius-large: 6px
- 颜色(colors):
-
派生变量(Derived variables): 值是通过在前面文件中所定义的变量通过计算得来. 比如:
-
主色(Primary colors): 派生字初始化变量:
$primary: $turquoise
$link: $blue
$info: $cyan
$success: $green
$warning: $yellow
$danger: $red
$dark: $grey-darker
$text: $grey-dark
$background: $white-ter
: 基本背景色$link: $blue
: the links use the primary color$family-primary: $family-sans-serif
: 主要字体是 sans-serif 无衬线字体系列-
已定义的变量的列表(Lists)和映射(Maps):
$colors: mergeColorMaps(("white": ($white, $black), "black": ($black, $white), "light": ($light, $light-invert), "dark": ($dark, $dark-invert), "primary": ($primary, $primary-invert, $primary-light, $primary-dark), "link": ($link, $link-invert, $link-light, $link-dark), "info": ($info, $info-invert, $info-light, $info-dark), "success": ($success, $success-invert, $success-light, $success-dark), "warning": ($warning, $warning-invert, $warning-light, $warning-dark), "danger": ($danger, $danger-invert, $danger-light, $danger-dark)), $custom-colors)
$shades: mergeColorMaps(("black-bis": $black-bis, "black-ter": $black-ter, "grey-darker": $grey-darker, "grey-dark": $grey-dark, "grey": $grey, "grey-light": $grey-light, "grey-lighter": $grey-lighter, "white-ter": $white-ter, "white-bis": $white-bis), $custom-shades)
$sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 $size-7
-
主色(Primary colors): 派生字初始化变量:
需要覆盖这些变量的值,只用在导入Bulma之前设置他们即可。