3 ms·
Back then there were images for that; later there was SVG. Triangles with CSS don't actually solve a problem CSS intended to solve.
by ygra 13y ago
Back then there were images for that; later there was SVG. Triangles with CSS don't actually solve a problem CSS intended to solve.
- scotty79 13y agoBack then there were images for borders and even images for padding. CSS solved that. If you add borders why can't you add triangles as well? SVG would be awesome if it could be freely intermixed with HTML. I think I'd ditch HTML for everything other than text boxes and forms.
- ygra 13y agoI haven't seen border images in the wild since CSS added them, I think (apart from examples). Perhaps that was solving a 1998 use-case in 2008. Nevertheless, CSS is still based on styling runs of text and boxes of content. Boxes usually aren't triangular. As for HTML in SVG, there is foreignObject [4.72], but browser support is spotty in places. And wrapping text in arbitrary shapes is on the roadmap for SVG 2, if I remember correctly. But we'll be a bit older when that's universally implemented ;-) [4.72] https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject https://developer.mozilla.org/en-US/docs/Web/SVG/Element/for...
- drifkin 13y agoBorder images are great for making resizable buttons. I've used them often in places where support is guaranteed (e.g., Chrome extensions).
- welly 13y agoWhere does it stop though? Should CSS provide solutions for polygons too? I think borders are a legitimate styling issue that CSS rightly solves, if only for styling tables. I'm not sure that it's CSS's job to create shapes as well - that, in my mind, is definitely the role of images or SVG.