4 ms·
> it seems impossible to use multiple sizes in a single document How so? It's possible in most cases to stick an extra class on the icon, say `.2x` and add a
by jekrb 12y ago
> it seems impossible to use multiple sizes in a single document
How so? It's possible in most cases to stick an extra class on the icon, say `.2x` and add a rule to your css such as —
[class*="2x"] {
transform: scale(2)
}
- lziz 12y agoPerfectly viable technique, though if they are written in SASS/LESS/whatever, the author could refactor the icons to mixins with a parameter that sets the scale, so the values themselves are "true".
- madeofpalk 12y agoThe author could refactor them to use ems or percents instead of pixels, that way they would automatically change size depending on their parent.
- madeofpalk 12y agoDownside of using this is transform still leaves the box size that's in the flow of the document the same size. Problematic if you have the icons inline, or in elements like buttons.