@internetstiftelsen/styleguide 2.22.3-beta.0.7 → 2.22.3-beta.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ $colors: (
|
|
|
76
76
|
@each $key, $value in $map {
|
|
77
77
|
&#{if($key != $base, #{$separator}#{$key}, '')} {
|
|
78
78
|
@if type-of($value) == 'map' {
|
|
79
|
-
@include color_classes($value, $attribute, $prefix, $separator: '-', $element: $element);
|
|
79
|
+
@include color_classes($value, $attribute, $prefix: '.', $separator: '-', $element: $element);
|
|
80
80
|
}
|
|
81
81
|
@else {
|
|
82
82
|
@if ($element != '') {
|
|
@@ -94,13 +94,12 @@ $colors: (
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/// Generate wordpress color classes with attribute and value
|
|
97
|
-
/// Generates this: .has-color
|
|
97
|
+
/// Generates this: .has-colorname-color
|
|
98
98
|
/// @group Colors
|
|
99
99
|
@mixin wordpress_color_classes($map, $attribute, $separator: '-', $suffix: '', $base: 'base') {
|
|
100
100
|
@each $key, $value in $map {
|
|
101
101
|
@if type-of($value) == 'map' {
|
|
102
102
|
&#{if($key != $base, #{$separator}#{$key}, '')} {
|
|
103
|
-
content: str-replace($key, 'color-', '');
|
|
104
103
|
@include wordpress_color_classes($value, $attribute, $separator, '-color');
|
|
105
104
|
}
|
|
106
105
|
}
|
|
@@ -79,3 +79,14 @@
|
|
|
79
79
|
text-decoration: underline;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
// Generate parent element link color classes e.g. .u-color-ruby a
|
|
84
|
+
/// @group Colors
|
|
85
|
+
.u-link-color {
|
|
86
|
+
@include color_classes (
|
|
87
|
+
$map: $colors,
|
|
88
|
+
$separator: '-',
|
|
89
|
+
$attribute: 'color',
|
|
90
|
+
$element: 'a'
|
|
91
|
+
);
|
|
92
|
+
}
|