prep docs for displaying the colors

This commit is contained in:
Mark Otto 2017-06-15 11:15:28 -07:00
parent be39742d65
commit 516af79509
5 changed files with 86 additions and 1 deletions

26
_data/colors.yml Normal file
View File

@ -0,0 +1,26 @@
- name: blue
hex: "#007aff"
- name: indigo
hex: "#2b29bb"
- name: purple
hex: "#882ae0"
- name: pink
hex: "#f14095"
- name: red
hex: "#ea0242"
- name: orange
hex: "#ff8d00"
- name: yellow
hex: "#ffec00"
- name: green
hex: "#34da36"
- name: teal
hex: "#1dde8e"
- name: cyan
hex: "#08eff3"
- name: white
hex: "#fff"
- name: gray
hex: "#464a4c"
- name: gray-dark
hex: "#292b2c"

18
_data/grays.yml Normal file
View File

@ -0,0 +1,18 @@
- name: 100
hex: "#f8f9fa"
- name: 200
hex: "#ebedef"
- name: 300
hex: "#ced3d8"
- name: 400
hex: "#abb3bd"
- name: 500
hex: "#7c8a99"
- name: 600
hex: "#55626f"
- name: 700
hex: "#4a5560"
- name: 800
hex: "#384048"
- name: 900
hex: "#131619"

16
_data/theme-colors.yml Normal file
View File

@ -0,0 +1,16 @@
- name: primary
hex: "#007aff"
- name: secondary
hex: "#ced4da"
- name: success
hex: "#51cf66"
- name: info
hex: "#38d9a9"
- name: warning
hex: "#ff922b"
- name: danger
hex: "#f03e3e"
- name: foreground
hex: "#343a40"
- name: background
hex: "#fff"

24
assets/scss/_colors.scss Normal file
View File

@ -0,0 +1,24 @@
//
// Docs color palette classes
//
@each $color, $value in $colors {
.swatch-#{$color} {
background-color: #{$value};
@include color-yiq($value);
}
}
@each $color, $value in $theme-colors {
.swatch-#{$color} {
background-color: #{$value};
@include color-yiq($value);
}
}
@each $color, $value in $grays {
.swatch-#{$color} {
background-color: #{$value};
@include color-yiq($value);
}
}

View File

@ -10,7 +10,7 @@
//
// Background information on nomenclature and architecture decisions here.
//
// - Bootstrap variables and mixins are included for easy reuse.
// - Bootstrap functions, variables, and mixins are included for easy reuse.
// Doing so gives us access to the same core utilities provided by Bootstrap.
// For example, consistent media queries through those mixins.
//
@ -48,6 +48,7 @@
@import "team";
@import "browser-bugs";
@import "brand";
@import "colors";
@import "clipboard-js";
// Load docs dependencies