You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using display: block for svg doesn't seem ideal.
In this example, I think that the expected render is text and icon side by side (and not one above the other).
<a href="">
Text link
<svg class="...">...</svg>
</a>
Yes it can be solved adding inline-block classes but what about a better default?
Globally, I read that vertical-align only applies to inline or table elements so I think we can switch to display: inline-block (or remove vertical-align: middle).
This is never a problem for me personally because I always use flexbox to position icons next to text, it's the only way to actually center them properly anyways:
<ahref="" class="inline-flex items-center">
Text link
<svgclass="...">...</svg></a>
You can always add inline to SVG elements that you don't want to be block, just like we had to add block to all the ones we didn't want to be inline in 0.x. No plans to change this as personally I haven't once needed to switch anything back to inline and I was adding block on almost every image/SVG/etc 😄 Plus it's a breaking change so we couldn't change it until 2.0 anyways.
Hi @adamwathan,
Using
display: block
for svg doesn't seem ideal.In this example, I think that the expected render is text and icon side by side (and not one above the other).
Yes it can be solved adding
inline-block
classes but what about a better default?Globally, I read that
vertical-align
only applies to inline or table elements so I think we can switch todisplay: inline-block
(or removevertical-align: middle
).Edit: I look at popular framework
Bootstrap use
vertical-align: middle
https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap-reboot.css#L168
Foundation use
display: inline-block
andvertical-align: middle
https://github.com/zurb/foundation-sites/blob/develop/dist/css/foundation.css#L459
Thanks,
Florian
The text was updated successfully, but these errors were encountered: