It's like those creative kids building super Mario-clones in Excel, It's certainly possible but it's still madness. But I guess those kids don't complain about Excel being a lousy game engine...
Hell Yes CSS
41–50 of 120 posts
Re: Hell Yes CSS
#42I wrote a (much shorter) article in a similar vein a few years ago: https://css-tricks.com/css-is-awesome/ I find it fascinating (saddening, but fascinating) that so many programmers are so turned-off by CSS and find it so unintuitive. I almost want to set out on a research project to figure out why that is. My experience with it couldn't be more different. Here's one way of looking at CSS (which I didn't think of un…
I'm not a fan of CSS. I learned it well enough to build a decent UI toolkit (draggable modals, collapsible, etc.)
I hate how CSS tries to mix layout and style. A million articles about not using tables for layout, and it took 20+ years to get a grid. I tried to do some fancy text and element alignment with CSS, and it was not having it (and, yes, I know about display: table). In the end I reverted to a table. It worked, and I moved on with life.
It is ridiculously hard to draw things in absolute positions. In many cases, it is easier to do a tiny bit of math and compute the positions of objects, rather than have to define parent/child relationships. But for true absolute positioning, you have to throw divs into a "portal" of some sort, and move that object into the root element. This makes doing things like pretty drag and drop extremely painful.
Browsers are buggy as hell, and often something works on everything but [insert your most hated browser]. That's a hint that the spec is too complicated.
I agree with your assessment, in that if you try to construct the world from scratch, you'll be "fighting the beast the whole way." I disagree that this is positive quality of the thing.
Re: Hell Yes CSS
#43Earlier quoted context omitted.
I'm sure someone will come and say they disagree, but I find CSS extremely unintuitive as well. The primitives it has compose very poorly. There are too many ways to do the same thing, each with their own weird quirks. Sometimes it's really hard to get it to render something simple. I mean... Just centering something on the screen is needlessly complicated. I wish CSS was more like a programming language, with a mini…
I agree with your comment mostly but just to note that it is no longer complicated to center things. .centered { display: flex; justify-content: center; align-items: center; } Indeed there are two (at least) more ways to both horizontally and vertically center something (using CSS Grid and the good old translate(-50%, -50%)) and with flex I always have a hard time remembering if it is justify-items or justify-content…
.foo {
display: table;
margin-left: auto;
margin-right: auto; }
Hello, world!
Here, it is only centered when “display: table” is present. e.g. this is not centered:
.foo {
/* display: table; DISABLED */
margin-left: auto;
margin-right: auto; }
Hello, world!
Simple “display: table” two-column layout:
.all {
display: table;
margin-left: auto;
margin-right: auto;
}
.sub {
display: table-row;
}
.left {
display: table-cell;
}
.right {
display: table-cell;
}
Hello, world!
Left side.
Right bar
Right side.
There are ways to vertically center content, but since that wasn’t something CSS was designed to do (for the kinds of things where something vertically centered makes sense, we were supposed to be making web apps in Java), they are all clunky.Re: Hell Yes CSS
#44Now, I think what helps me is that I've had 20 years to learn it as changes appeared.
If I had to learn it all in one go now, how confused would I be? Very? Lots?
It could be that a good way to learn CSS would be to try and replicate that experience and learn the history of it, not just the current state.
Re: Hell Yes CSS
#45I’m just glad we’re no longer in the IE6 days where getting something as simple as a stable three-column pure CSS layout was a nay-to-impossible challenge. IE9 was probably the first version of IE with decent CSS (read ”display: table” which wasn’t broken); all of the other browsers (which didn’t have IE9’s market share at the time) had already added “display: table” support. Before “display: table” was widely suppor…
Re: Hell Yes CSS
#46I wrote a (much shorter) article in a similar vein a few years ago: https://css-tricks.com/css-is-awesome/ I find it fascinating (saddening, but fascinating) that so many programmers are so turned-off by CSS and find it so unintuitive. I almost want to set out on a research project to figure out why that is. My experience with it couldn't be more different. Here's one way of looking at CSS (which I didn't think of un…
I'll bite. I'm not a fan of CSS. I learned it well enough to build a decent UI toolkit (draggable modals, collapsible, etc.) I hate how CSS tries to mix layout and style. A million articles about not using tables for layout, and it took 20+ years to get a grid. I tried to do some fancy text and element alignment with CSS, and it was not having it (and, yes, I know about display: table). In the end I reverted to a tab…
[1] Edit: CSS was designed for styled documents, such as online resumes or blogs. It was not designed to make interactive apps, which is why it doesn’t fit that paradigm well. Everyone thought Java applets would run the interactive web, and we would be making web applications in Java today if Microsoft had not killed Java on the web in the late 1990s with IE.
Re: Hell Yes CSS
#47I’m just glad we’re no longer in the IE6 days where getting something as simple as a stable three-column pure CSS layout was a nay-to-impossible challenge. IE9 was probably the first version of IE with decent CSS (read ”display: table” which wasn’t broken); all of the other browsers (which didn’t have IE9’s market share at the time) had already added “display: table” support. Before “display: table” was widely suppor…
LOL IE :)
Re: Hell Yes CSS
#48Earlier quoted context omitted.
I'm sure someone will come and say they disagree, but I find CSS extremely unintuitive as well. The primitives it has compose very poorly. There are too many ways to do the same thing, each with their own weird quirks. Sometimes it's really hard to get it to render something simple. I mean... Just centering something on the screen is needlessly complicated. I wish CSS was more like a programming language, with a mini…
Well, CSS is pretty old, and as such old, backwards-compatible specs do, it's utterly bloated. I tend to use CSS Grid and Flex almost exclusively, since they are a lot more intuitive than the block and inline combo. But then again if you look at the origin of CSS, it all makes sense. CSS was never developed to be used for app-like interfaces. At it's inception, it was intended as a style sheet for documents (specific…
For the newbies, back in the CSS 1 days, the intention was to create separate styling rules to make maintaining or changing styles easier. If you ever had to style HTML before CSS by wrapping each and every any colour or font change in HTML elements or embedding background colour attributes inside each table cell, you'll understand the pain it was addressing. The CSS 1 spec was relatively small and easy to understand - although pretty limited.
I first seriously tried to make that work in the IE4 days. IE4 was almost kinda OK at CSS1, but NN4.x was just awful. Opera was (not surprisingly) the best at CSS, but nobody used it.
The complex layout stuff came not log after in the much bigger CSS 2, but the nature of IE only badly implementing a fraction of it for a decade or more meant that most people just cargo culted IE work arounds and never really sat down to learn any of the principles. Not claiming they were great principles, just that there were some :)
Re: Hell Yes CSS
#49Earlier quoted context omitted.
I'll bite. I'm not a fan of CSS. I learned it well enough to build a decent UI toolkit (draggable modals, collapsible, etc.) I hate how CSS tries to mix layout and style. A million articles about not using tables for layout, and it took 20+ years to get a grid. I tried to do some fancy text and element alignment with CSS, and it was not having it (and, yes, I know about display: table). In the end I reverted to a tab…
>A million articles about not using tables for layout, and it took 20+ years to get a grid To be fair, CSS 2.0 (from 1998) has “display: table” which allows table layout in pure CSS. [1] The problem was not CSS. The problem was Internet Explorer 6; “display: table” was not viable to use until the early 2010s when IE6 usage finally plunged. [1] Edit: CSS was designed for styled documents, such as online resumes or blo…
I think it's just a fundamental issue where CSS is trying to be both layout and style. Works great for basic document formatting, but once you try to do something complex, it all falls apart. Or, rather, it should fall apart, but we've spent the last couple decades duct taping it together.
Every JavaScript framework ultimately hits a wall where it has to interact with CSS. It can't be abstracted away.
I really do believe more money and effort should be spent looking for an alternative.
Re: Hell Yes CSS
#50When people complain about CSS they seem to forget that HTML and CSS started as basically an Word-alternative, or actually more like an RTF-format for the web. Doing anything other than that is simply misuse, and all features we slap on to CSS3 and HTML5 does not change this. That's the reason you can not center a div without "hacks". It's like those creative kids building super Mario-clones in Excel, It's certainly…
As it turns out, HTML wasn’t even originally a Word alternative. The original web, as envisioned by Tim Berners-Lee used something called “semantic” markup. For example, a HTML page would have , and it was up to the browser and end user whether was bold, italic, or in another color. It was only in the late 1990s, during the Netscape-IE wars, that CSS was tacked on to HTML; that’s why CSS syntax looks nothing like HTML syntax. CSS changed the web from a world where could look any of a number of different ways in to a world where would be, say, Lora Serif 600 weight italic at 24point. Javascript dynamically altering webpages to make applications was never the plan. It only ended up that way because Java applets on the web were effectively killed by Microsoft when Internet Explorer won the IE-Netscape wars, and no other plugin was widely available to fill the gap Java left. Flash was too proprietary and closed-source to take over the web, but it was huge for a while until Javascript finally caught up in the post-IE web of the 2010s.