Skip to content

Commit e1f8e9b

Browse files
committed
1 parent 2452a69 commit e1f8e9b

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Fix #607 has-addons z-index
1010
# Feature #586 select color modifiers
1111
# Fix #537 -ms-expand
12+
# Fix #578 better `+center` mixin
1213

1314
## 0.4.0
1415

docs/css/bulma-docs.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,11 +1666,9 @@ a.box:active {
16661666
height: 1em;
16671667
position: relative;
16681668
width: 1em;
1669-
left: 50%;
1670-
margin-left: -0.5em;
1671-
margin-top: -0.5em;
16721669
position: absolute;
1673-
top: 50%;
1670+
left: calc(50% - (1em / 2));
1671+
top: calc(50% - (1em / 2));
16741672
position: absolute !important;
16751673
}
16761674

sass/utilities/mixins.sass

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
content: " "
2121
display: table
2222

23-
=center($size)
24-
left: 50%
25-
margin-left: -($size / 2)
26-
margin-top: -($size / 2)
23+
=center($width, $height: 0)
2724
position: absolute
28-
top: 50%
25+
@if $height != 0
26+
left: calc(50% - (#{$width} / 2))
27+
top: calc(50% - (#{$height} / 2))
28+
@else
29+
left: calc(50% - (#{$width} / 2))
30+
top: calc(50% - (#{$width} / 2))
2931

3032
=delete
3133
+unselectable

0 commit comments

Comments
 (0)