Skip to content

Commit a5aa0f5

Browse files
derick-montaguerfrandse
authored andcommitted
Update colors in documentation
- Remove all color-100 tokens since we are using bootstrap's built-in functions for color lightening - Update changed hex values Signed-off-by: Derick Montague <[email protected]> Change-Id: I08894fdb64021e38ea8b5c0f47e127d72f3d3ecd
1 parent de5f89e commit a5aa0f5

File tree

7 files changed

+46
-38
lines changed

7 files changed

+46
-38
lines changed

docs/.vuepress/components/colors/blues.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export default {
2525
data() {
2626
return {
2727
colors: [
28-
{
29-
variable: 'blue-100',
30-
hex: '#eff2fb',
31-
},
3228
{
3329
variable: 'blue-500',
3430
hex: '#2d60e5'

docs/.vuepress/components/colors/grays.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ export default {
2727
colors: [
2828
{
2929
variable: 'gray-100',
30-
hex: '#fafafa',
30+
hex: '#f4f4f4',
3131
border: true
3232
},
3333
{
3434
variable: 'gray-200',
35-
hex: '#f4f4f4'
35+
hex: '#e6e6e6'
3636
},
3737
{
3838
variable: 'gray-300',
39-
hex: '#dcdee0'
39+
hex: '#d8d8d8'
4040
},
4141
{
4242
variable: 'gray-400',
@@ -56,7 +56,7 @@ export default {
5656
},
5757
{
5858
variable: 'gray-800',
59-
hex: '#333333'
59+
hex: '#3f3f3f'
6060
},
6161
{
6262
variable: 'gray-900',

docs/.vuepress/components/colors/greens.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export default {
2525
data() {
2626
return {
2727
colors: [
28-
{
29-
variable: 'green-100',
30-
hex: '#ecfdf1',
31-
},
3228
{
3329
variable: 'green-500',
3430
hex: '#0a7d06'

docs/.vuepress/components/colors/reds.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export default {
2525
data() {
2626
return {
2727
colors: [
28-
{
29-
variable: 'red-100',
30-
hex: '#feeeed',
31-
},
3228
{
3329
variable: 'red-500',
3430
hex: '#da1416'

docs/.vuepress/components/colors/theme.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ export default {
3333
{
3434
name: "secondary",
3535
variable: "gray-800",
36-
hex: "#333333"
36+
hex: "#3f3f3f"
3737
},
3838
{
3939
name: 'light',
4040
variable: 'gray-100',
41-
hex: '#fafafa',
41+
hex: '#f4f4f4',
4242
border: true
4343
},
4444
{

docs/.vuepress/components/colors/yellows.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export default {
2525
data() {
2626
return {
2727
colors: [
28-
{
29-
variable: 'yellow-100',
30-
hex: '#fff8e4',
31-
},
3228
{
3329
variable: 'yellow-500',
3430
hex: '#efc100'

docs/themes/readme.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ This folder contains Sass helpers and default styles for customizing the OpenBMC
4848
└─ _toasts.scss
4949
└─ helpers
5050
├─ _colors.scss
51+
├─ _functions.scss
5152
├─ _index.scss
5253
├─ _motion.scss
5354
└─ _variables.scss
@@ -66,16 +67,9 @@ The colors.scss file sets all the SASS variables and color maps for the OpenBMC
6667
$black: #000;
6768
$white: #fff;
6869

69-
$blue-100: #eff2fb;
7070
$blue-500: #2d60e5;
71-
72-
$green-100: #ecfdf1;
7371
$green-500: #0a7d06;
74-
75-
$red-100: #feeeed;
7672
$red-500: #da1416;
77-
78-
$yellow-100: #fff8e4;
7973
$yellow-500: #efc100;
8074

8175
$gray-100: #f4f4f4;
@@ -120,14 +114,6 @@ $primary: $blue;
120114
$secondary: $gray-800;
121115
$success: $green;
122116
$warning: $yellow;
123-
124-
// Sass Color Variable Accents
125-
// Used for component styles and are
126-
// not available as variants
127-
$danger-light: $red-100;
128-
$info-light: $blue-100;
129-
$warning-light: $yellow-100;
130-
$success-light: $green-100;
131117
```
132118

133119
##### Custom Theme Colors Map
@@ -149,6 +135,44 @@ $theme-colors: (
149135
- [Learn more about Bootstrap variables](https://getbootstrap.com/docs/4.0/getting-started/theming/#css-variables)
150136
- [View the color palette and hex values in the color guidelines](/guide/guidelines/colors)
151137

138+
#### _functions.scss
139+
Two functions provide a customized way to set color highlights. The `theme-color-light` and `theme-color-dark` are custom functions used to create colors for the `alert`, `badge`, `card`, and `toast` components. They have also set color highlights for some pseudo-elements like `: hover`.
140+
141+
##### Functions
142+
```scss
143+
// This function is usually used to get a lighter
144+
// theme variant color to use as a background color
145+
@function theme-color-light($variant) {
146+
@return theme-color-level($variant, -11.3);
147+
}
148+
149+
@function theme-color-dark($variant) {
150+
@return theme-color-level($variant, 2);
151+
}
152+
```
153+
154+
##### Examples
155+
```scss{8-10,16}
156+
.b-table-sort-icon-left {
157+
background-position: left calc(1.5rem / 2) center !important;
158+
padding-left: calc(1.2rem + 0.65em) !important;
159+
&:focus {
160+
outline: none;
161+
box-shadow: inset 0 0 0 2px theme-color('primary') !important;
162+
}
163+
&:hover {
164+
background-color: theme-color-dark('light');
165+
}
166+
}
167+
}
168+
169+
&.alert-info {
170+
border-left-color: theme-color("info");
171+
background-color: theme-color-light("info");
172+
fill: theme-color("info");
173+
}
174+
```
175+
152176
#### _motion.scss
153177
This bezier curves and durations in this file determine the motion styles throughout the application. These guidelines from the Cabon Design System avoid easing curves that are unnatural, distracting, or purely decorative.
154178

@@ -170,7 +194,7 @@ $exit-easing--expressive: cubic-bezier(0.4, 0.14, 1, 1);
170194
```
171195

172196
##### Example
173-
```scss
197+
```scss{6,9}
174198
.link-skip-nav {
175199
position: absolute;
176200
top: -60px;

0 commit comments

Comments
 (0)