Browse Source

css: Remove redundant spacers in _util

master
Annika Backstrom 3 months ago
parent
commit
2e6e46840d
Signed by: Annika Backstrom <annika@sixohthree.com> GPG Key ID: 1FB1723D467863F4
2 changed files with 3 additions and 31 deletions
  1. 3
    3
      assets/css/_spacers.scss
  2. 0
    28
      assets/css/_util.scss

+ 3
- 3
assets/css/_spacers.scss View File

@@ -2,7 +2,7 @@
2 2
 // libsass (v3.3.2)
3 3
 // ----
4 4
 
5
-$spacer: 1rem;
5
+$spacer: 6px;
6 6
 $spacer-x: $spacer;
7 7
 $spacer-y: $spacer;
8 8
 
@@ -22,7 +22,7 @@ $spacers: ();
22 22
     $length-x:   map-get($lengths, x);
23 23
     $length-y:   map-get($lengths, y);
24 24
 
25
-    .#{$abbrev}-a-#{$size} { #{$prop}:        $length-y $length-x !important; } // a = All sides
25
+    .#{$abbrev}-#{$size} { #{$prop}:        $length-y $length-x !important; } // a = All sides
26 26
     .#{$abbrev}-t-#{$size} { #{$prop}-top:    $length-y !important; }
27 27
     .#{$abbrev}-r-#{$size} { #{$prop}-right:  $length-x !important; }
28 28
     .#{$abbrev}-b-#{$size} { #{$prop}-bottom: $length-y !important; }
@@ -38,4 +38,4 @@ $spacers: ();
38 38
       #{$prop}-bottom: $length-y !important;
39 39
     }
40 40
   }
41
-}
41
+}

+ 0
- 28
assets/css/_util.scss View File

@@ -1,31 +1,3 @@
1
-$multiplier: 6;
2
-
3
-@mixin spacing-helper($property, $base) {
4
-  #{$property}: 1px * $base * $multiplier;
5
-}
6
-
7
-
8
-@mixin create-spacers($shortcut, $property) {
9
-  $i: 0;
10
-  @while $i < 6 {
11
-    .#{$shortcut}-#{$i} {
12
-      @include spacing-helper($property, $i);
13
-    }
14
-    $i: $i + 1;
15
-  }
16
-}
17
-
18
-@include create-spacers('p',  'padding');
19
-@include create-spacers('pt', 'padding-top');
20
-@include create-spacers('pb', 'padding-bottom');
21
-@include create-spacers('pl', 'padding-left');
22
-@include create-spacers('pr', 'padding-right');
23
-@include create-spacers('m',  'margin');
24
-@include create-spacers('mt', 'margin-top');
25
-@include create-spacers('mb', 'margin-bottom');
26
-@include create-spacers('ml', 'margin-left');
27
-@include create-spacers('mr', 'margin-right');
28
-
29 1
 .clear {
30 2
   content: ".";
31 3
   display: block;

Loading…
Cancel
Save