Skip to content

Commit

Permalink
Add align()
Browse files Browse the repository at this point in the history
  • Loading branch information
CorySimmons committed Oct 23, 2013
1 parent 0f401ed commit 8031f75
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions css/jeet/utilities.styl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ unstack()
else
text-align left

// Horizontal/Vertical/Both Alignment - Parent container needs position relative. IE9+
align(direction = both)
position absolute
if (direction == horizontal) or (direction == h)
left 50%
transform translateX(-50%)
else if (direction == vertical) or (direction == v)
top 50%
transform translateY(-50%)
else
top 50%
left 50%
transform translate(-50%, -50%)

// Clearfix
cf()
*zoom 1
Expand Down

0 comments on commit 8031f75

Please sign in to comment.