-
-
Save Victa/1552181 to your computer and use it in GitHub Desktop.
/* Fix webkit percent bug */ | |
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-width: 767px){ | |
.row>[class$="columns"]:last-of-type{ | |
display: table-cell; | |
float: none;width: auto; | |
margin:0; | |
} | |
.row>[class$="columns"]:nth-last-of-type(2){ | |
margin-right:4.4%; | |
} | |
.row>[class$="columns"]:last-of-type::after { | |
content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "; | |
visibility: hidden; | |
clear: both; | |
height: 0 !important; | |
display: block; | |
line-height: 0; | |
} | |
} |
That is fascinating - thanks for posting this. This is essentially forcing the last column to expand out like a table cell and consume the remaining space, eliminating the gap. I see what you mean about the offsets, this complicates things a bit. I'll poke around at this tomorrow, but if you have any notions for resolving that piece I'd love to hear it. I committed this as is to a branch of Foundation called 'webkit-grid', feel free to check out and make pull requests against that.
Glad to see that'll help you.
In foundation, you have chosen to make a margin on the left. Unfortunately, there would not have had this problem with offsets if you choose a right margin. :-)
But, I don't believe that you will change your grid system just for this crazy bug!
And no problems, If I have an idea, I'll make a pull request this time.
FYI, I found this tricks idea in OOCSS grid http://oocss.org/grids_docs.html
Looking forward to the request. We chose left margin because then we could make it work with first-child which has much greater support than last-child or last-of-type.
TO