4 ms·
The problem I've encountered with these kind of solutions are that they're never universally applicable so you have to know a list of solutions and what situati
by ratbeard 13y ago
The problem I've encountered with these kind of solutions are that they're never universally applicable so you have to know a list of solutions and what situations they can be applied. I wish I could remember a inline-block + vertical alignment specific example but two others would be:
`margin: 0 auto;` to center horizontally requires knowing the width, and it must be smaller than its parent container. If its not then use: `position: absolute; left: 50%; margin-left: - <width / 2>%`, and make sure parent has a height and position relative.
`text-indent: -999em` to hide text (which is admittedly not the best technique) was the cause of our 3d css transform animation running really slow.
With dedicated properties to solve these issues you'd hope they could be universally applied and reasoned about.
- dools 13y agoCheck out stacklayout.com