@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.22.3-beta.0.7",
3
+ "version": "2.22.3-beta.0.9",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -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-name{$suffix}
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
  }
@@ -44,6 +44,14 @@
44
44
  margin: 0;
45
45
  padding: 0;
46
46
  line-height: 1.2;
47
+
48
+ @include bp-up(md) {
49
+ line-height: 1.1;
50
+ }
51
+
52
+ @include bp-up(lg) {
53
+ line-height: 1;
54
+ }
47
55
  }
48
56
 
49
57
  @include bp-up(sm-xs) {
@@ -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
+ }