Skip to content

Commit f99771e

Browse files
WesselKuipersjgthms
authored andcommitted
Derive ‘-invert’ sass variables from primary colors (jgthms#2594)
1 parent f6ed0ae commit f99771e

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Fix #2647 -> Missing meta tags in snippet
88
* Fix #2031, Fix #2483 -> Invalid output when declaring a custom shade map
99
* Fix #2060 -> `height: auto` on HTML `audio` element breaks height of element
10+
* Fix #706 -> Derive `-invert` variables using `findColorInvert()`
1011
* #1608 Fix #1552 -> `.container.is-fluid` margins
1112

1213
### New features

docs/_data/variables/utilities/derived-variables.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,49 +107,49 @@
107107
},
108108
"$primary-invert": {
109109
"name": "$primary-invert",
110-
"value": "$turquoise-invert",
110+
"value": "findColorInvert($primary)",
111111
"type": "variable",
112112
"computed_type": "color",
113113
"computed_value": "#fff"
114114
},
115115
"$info-invert": {
116116
"name": "$info-invert",
117-
"value": "$cyan-invert",
117+
"value": "findColorInvert($info)",
118118
"type": "variable",
119119
"computed_type": "color",
120120
"computed_value": "#fff"
121121
},
122122
"$success-invert": {
123123
"name": "$success-invert",
124-
"value": "$green-invert",
124+
"value": "findColorInvert($success)",
125125
"type": "variable",
126126
"computed_type": "color",
127127
"computed_value": "#fff"
128128
},
129129
"$warning-invert": {
130130
"name": "$warning-invert",
131-
"value": "$yellow-invert",
131+
"value": "findColorInvert($warning)",
132132
"type": "variable",
133133
"computed_type": "color",
134134
"computed_value": "rgba(0, 0, 0, 0.7)"
135135
},
136136
"$danger-invert": {
137137
"name": "$danger-invert",
138-
"value": "$red-invert",
138+
"value": "findColorInvert($danger)",
139139
"type": "variable",
140140
"computed_type": "color",
141141
"computed_value": "#fff"
142142
},
143143
"$light-invert": {
144144
"name": "$light-invert",
145-
"value": "$dark",
145+
"value": "findColorInvert($light)",
146146
"type": "variable",
147147
"computed_type": "color",
148148
"computed_value": "hsl(0, 0%, 21%)"
149149
},
150150
"$dark-invert": {
151151
"name": "$dark-invert",
152-
"value": "$light",
152+
"value": "findColorInvert($dark)",
153153
"type": "variable",
154154
"computed_type": "color",
155155
"computed_value": "hsl(0, 0%, 96%)"
@@ -240,7 +240,7 @@
240240
},
241241
"$link-invert": {
242242
"name": "$link-invert",
243-
"value": "$blue-invert",
243+
"value": "findColorInvert($link)",
244244
"type": "variable",
245245
"computed_type": "color",
246246
"computed_value": "#fff"

sass/utilities/derived-variables.sass

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ $blue-invert: findColorInvert($blue) !default
1919
$purple-invert: findColorInvert($purple) !default
2020
$red-invert: findColorInvert($red) !default
2121

22-
$primary-invert: $turquoise-invert !default
23-
$info-invert: $cyan-invert !default
24-
$success-invert: $green-invert !default
25-
$warning-invert: $yellow-invert !default
26-
$danger-invert: $red-invert !default
27-
$light-invert: $dark !default
28-
$dark-invert: $light !default
22+
$primary-invert: findColorInvert($primary) !default
23+
$info-invert: findColorInvert($info) !default
24+
$success-invert: findColorInvert($success) !default
25+
$warning-invert: findColorInvert($warning) !default
26+
$danger-invert: findColorInvert($danger) !default
27+
$light-invert: findColorInvert($light) !default
28+
$dark-invert: findColorInvert($dark) !default
2929

3030
// General colors
3131
@@ -54,7 +54,7 @@ $pre-background: $background !default
5454
// Link colors
5555
5656
$link: $blue !default
57-
$link-invert: $blue-invert !default
57+
$link-invert: findColorInvert($link) !default
5858
$link-visited: $purple !default
5959

6060
$link-hover: $grey-darker !default

0 commit comments

Comments
 (0)