]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix #1078 (#1111)
authorColin Frick <colin@bash.li>
Tue, 5 Sep 2017 11:49:18 +0000 (13:49 +0200)
committerJeremy Thomas <bbxdesign@gmail.com>
Tue, 5 Sep 2017 11:49:18 +0000 (13:49 +0200)
* Rearrange responsive typography definition. Fixes #1078

* Renamed mixin (compliant with the styleguide)

sass/base/helpers.sass

index d1b08c7e44680041d61698a0bf0dbcd7bddc38ea..cc5e14594ba800871cd234e3f6f1fe509d8fb456 100644 (file)
 
 // Typography
 
-@each $size in $sizes
-  $i: index($sizes, $size)
-  .is-size-#{$i}
-    font-size: $size !important
-  +mobile
-    .is-size-#{$i}-mobile
-      font-size: $size !important
-  +tablet
-    .is-size-#{$i}-tablet
-      font-size: $size !important
-  +touch
-    .is-size-#{$i}-touch
-      font-size: $size !important
-  +desktop
-    .is-size-#{$i}-desktop
-      font-size: $size !important
-  +widescreen
-    .is-size-#{$i}-widescreen
-      font-size: $size !important
-  +fullhd
-    .is-size-#{$i}-fullhd
+=typography-size($target:'')
+  @each $size in $sizes
+    $i: index($sizes, $size)
+    .is-size-#{$i}#{if($target == '', '', '-' + $target)}
       font-size: $size !important
 
++typography-size()
+
++mobile
+  +typography-size('mobile')
+
++tablet
+  +typography-size('tablet')
+
++touch
+  +typography-size('touch')
+
++desktop
+  +typography-size('desktop')
+
++widescreen
+  +typography-size('widescreen')
+
++fullhd
+  +typography-size('fullhd')
+
 $alignments: ('centered': 'center', 'left': 'left', 'right': 'right')
 
 @each $alignment, $text-align in $alignments