@profitlich/template-toolkit 2.3.0 → 2.4.1

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": "@profitlich/template-toolkit",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {
@@ -200,7 +200,7 @@ $mediaqueries: (
200
200
  // @include mode($layout, padding/margin, all/top/right/bottom/left, 0, 0, 0, 0)
201
201
 
202
202
  @if $important == true {
203
- $important: !important;
203
+ $important: '!important';
204
204
  }
205
205
 
206
206
  @if ( map.get(config.$units, $layout) == 'px' ) {
@@ -239,4 +239,4 @@ $mediaqueries: (
239
239
  @if $position == left {
240
240
  #{$mode}-left: $top;
241
241
  }
242
- }
242
+ }
@@ -13,21 +13,40 @@
13
13
  // Wenn es keine $mediaquery in der map gibt, gebe einen Fehler aus
14
14
  @if not $queries {
15
15
  @error "No value could be retrieved from `#{$mediaquery}`. "
16
- + "Please make sure it is defined in `$mediaqueries` map.";
16
+ +"Please make sure it is defined in `$mediaqueries` map.";
17
17
  }
18
18
 
19
19
  // Include the media mixin with $queries
20
+ // Für implizite breakpoints funktionieren die Funktionen wie size() nicht, daher müssen sie hier gesetzt werden
20
21
  @include media($queries) {
21
- @content($mediaquery);
22
+ $_layout-alias: (
23
+ tabletFrom: tablet,
24
+ tabletTo: tablet,
25
+ tabletPortrait: tablet,
26
+ tabletPortraitFrom: tablet,
27
+ tabletLandscape: tablet,
28
+ tabletLandscapeFrom: tablet,
29
+ desktopFrom: desktop,
30
+ desktopTo: desktop,
31
+ bigFrom: big,
32
+ );
33
+ $layout: $mediaquery;
34
+ @if map.has-key($_layout-alias, $mediaquery) {
35
+ $layout: map.get($_layout-alias, $mediaquery);
36
+ }
37
+ @content($layout);
22
38
  }
23
39
  }
24
40
 
25
41
  @mixin media($queries) {
42
+
26
43
  // Erst wenn alle mediaqueries geschachtelt geschrieben sind,
27
44
  // wird der @content ausgegeben
28
- @if list.length($queries) == 0 {
45
+ @if list.length($queries)==0 {
29
46
  @content;
30
- } @else {
47
+ }
48
+
49
+ @else {
31
50
  $first-key: list.nth(map.keys($queries), 1);
32
51
 
33
52
  // Schreibt nur die mediaquery, nicht den Inhalt
@@ -39,4 +58,4 @@
39
58
  }
40
59
  }
41
60
  }
42
- }
61
+ }