]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix #578
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 2 Apr 2017 13:37:10 +0000 (14:37 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 2 Apr 2017 13:41:00 +0000 (14:41 +0100)
CHANGELOG.md
docs/css/bulma-docs.css
sass/utilities/mixins.sass

index 3054246ebab9c6bfef8866ec1bb058e51e10c255..a2cd2ffb4cf79a004ffe85b215629ee4a7df1ff6 100644 (file)
@@ -9,6 +9,7 @@
 # Fix #607 has-addons z-index
 # Feature #586 select color modifiers
 # Fix #537 -ms-expand
+# Fix #578 better `+center` mixin
 
 ## 0.4.0
 
index 5b5e9a5636c218d7a38d3281ae1dce14754cfe54..c2de947f1669d1f71abe0dd0c1b74f8210e86c6e 100644 (file)
@@ -1666,11 +1666,9 @@ a.box:active {
   height: 1em;
   position: relative;
   width: 1em;
-  left: 50%;
-  margin-left: -0.5em;
-  margin-top: -0.5em;
   position: absolute;
-  top: 50%;
+  left: calc(50% - (1em / 2));
+  top: calc(50% - (1em / 2));
   position: absolute !important;
 }
 
index 1c1fd3080157e46b1a89abd4eb51b5b7600f6ecf..8ac340c75dae1ca17aa82e02a35ed6806131e579 100644 (file)
     content: " "
     display: table
 
-=center($size)
-  left: 50%
-  margin-left: -($size / 2)
-  margin-top: -($size / 2)
+=center($width, $height: 0)
   position: absolute
-  top: 50%
+  @if $height != 0
+    left: calc(50% - (#{$width} / 2))
+    top: calc(50% - (#{$height} / 2))
+  @else
+    left: calc(50% - (#{$width} / 2))
+    top: calc(50% - (#{$width} / 2))
 
 =delete
   +unselectable