4 ms·
CSS was never meant to be used for drawing complex shapes. If you are using those hacks instead of proper SVG or canvas paths then you are doing it wrong.
by jarek-foksa 14y ago
CSS was never meant to be used for drawing complex shapes. If you are using those hacks instead of proper SVG or canvas paths then you are doing it wrong.
- rrreese 14y agoCan you explain why this is wrong? I appreciate this was never intended, but what is actually wrong here?
- jarek-foksa 14y agoWhat makes it wrong is the fact that we already have means for describing complex graphics that are: - more readable - easier to maintain - easier to tweak - much more powerful For similar reasons it's considered to be wrong to use HTML tables for page layout instead of CSS.
- boingboing 14y agobutthurt much?
- deleted 14y ago[deleted]
- rytis 14y agoTotally with you on this. Really sad to see that a "triangle" is actually a "border"! Seriously, WTF?! Or is it just me, and everyone else is ok with that?
- liamondrop 14y agoJust you. It's an exercise meant to push the boundaries and get people thinking creatively. Also, the triangle thing is a pretty common and useful hack.
- vibrunazo 14y agoIt's just a funny thing to giggle at. But I really hope no one will use this in production.
- malandrew 14y agoIt's used all the time in production to produce the arrow effect on tooltips and similar elements.
- haydenchambers 14y agotwitter bootstrap uses exactly this technique.. pretty sure there a few sites using it then
- alecperkins 14y agoI'm currently working on a site that uses it heavily in production for visual enhancements and details. It's a great trick that works well, and doesn't require any additional markup if you use :before and :after pseudo-elements. Using CSS instead of images means it's easy to programmatically manipulate it, as well. eg A color picker system with a notch that varies with the color being picked. The new Google+ design uses the triangle trick with a twist, making an open triangle that shows what's underneath it, like your cover photo.
- tylermenezes 14y agoSo what, the solution is draw it in canvas? What about the large number of people without support? I understand not using it for circles, but I've actually seen the triangle bit used quite often, and it makes sense.
- pacomerh 14y agoWow what you wrote is actually the oposite of the definition of what 'hacker' means, a few kittens died with that comment. What happened to being inventive?.
- Achshar 14y agoThat's exactly what someone must have said when people were using tables for site structure and someone like OP tried to correct them. Hack is essentially to get things done. In no way does it mean write new specifications.