The fact that this exists and is lauded as clever rather than being ridiculed for its opaqueness really gets my goat.
Animation to Explain CSS Triangles
21–30 of 107 posts
Re: Animation to Explain CSS Triangles
#22Re: Animation to Explain CSS Triangles
#23I vote we change the name from CSS to PWL. PWL is, of course, Puzzle Web Language. This is what I hate about CSS: it's a jigsaw puzzle that must be brute-forced. The fact that this exists and is lauded as clever rather than being ridiculed for its opaqueness really gets my goat.
Re: Animation to Explain CSS Triangles
#24Re: Animation to Explain CSS Triangles
#25Earlier quoted context omitted.
Why would he be when it's mostly cross-browser? It means you dont need to draw the triangle and throw it into a .png or your sprite then deal with all that crap. You have a triangle that you can use to point at things AND you can modify the borders to change the size of that triangle on the fly. Yay.
I'm currently learning CSS, and it really all seems like dirty hacks to me. margin: o auto;? So I can't tell this to just horizontally center itself automatically? Don't get me wrong, I love dirty hacks, just not if they're forced onto me. I guess in a couple of weeks stockholm syndrome will set in, and I'll love it, but for the beginner, especially if you're moving there from either design (What, I need to hack thin…
Re: Animation to Explain CSS Triangles
#26Re: Animation to Explain CSS Triangles
#27Note: You only need to specify 3 borders. Eg. a triangle pointing down: .triangle-down { border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 7px solid #444; }
Re: Animation to Explain CSS Triangles
#28Earlier quoted context omitted.
I'm currently learning CSS, and it really all seems like dirty hacks to me. margin: o auto;? So I can't tell this to just horizontally center itself automatically? Don't get me wrong, I love dirty hacks, just not if they're forced onto me. I guess in a couple of weeks stockholm syndrome will set in, and I'll love it, but for the beginner, especially if you're moving there from either design (What, I need to hack thin…
I don't know any developers who like CSS. It's just a thing we have to do.
Re: Animation to Explain CSS Triangles
#29Re: Animation to Explain CSS Triangles
#30I'm sorry, I have very little experience with web design, but is this the supposed way to create a triangle? It seems weird there would be no way to build shapes with primitives.
It's the only way to do it with pure CSS. A more sane approach would be to use a raster or vector image. It is pretty silly.
This hack on the other hand will work in every browser all the way back to Netscape Navigator or earlier.