3 ms·
There's nothing cryptic about floats, block elements and inline elements. But you need to make an effort to learn about them! People assume that CSS should be
by lwhi 16y ago
There's nothing cryptic about floats, block elements and inline elements. But you need to make an effort to learn about them!
People assume that CSS should be easy / that they won't need to learn extra skills - and are then annoyed because it doesn't work in the way they assume it should.
Imo, it's a pretty ridiculous situation - how can a person judge something they don't understand?
- danenania 16y agoThat's the point--it shouldn't take much effort. It's a simple problem made difficult by poor syntax and metaphors. I do understand CSS. I've created plenty of fairly complex layouts with it. That's what allows me to judge it as inferior to other layout models I've used. Why shouldn't it work the way people assume? I see very little benefit for this trade-off, except perhaps for the salaries of CSS gurus.
- lwhi 16y agoI don't understand how an incorrect assumption can be used as a criticism? Just because you assume something, isn't going to make it true. The problems you might want to solve may be simple - but problems that others might want to solve might be more complex. It's not perfect, but CSS actually works reasonably well in a variety of situations. My main concerns were based around browser inconsistencies, but things are much better in 2011 (compared to 2005). There's a strong meme that reinforces the idea that 'CSS is rubbish' - but I think it's actually counter-intuitive to spread it. Basically, all we end up with are a lot of grumbling people who believe it's not worth learning - and don't.
- danenania 16y agoIt isn't about assumptions being correct or incorrect. I'm saying that if possible, a language should adhere to the concepts and vocabulary that people bring to the table instead of inventing its own, unless there are major benefits to be had in doing so. I see no benefits to the layout model of CSS over that of Flex (quite the contrary), and the vocabulary used in Flex means I understand how the system works immediately without having to look anything up because I know what horizontal, vertical, gaps, and constraints are already from my everyday non-technical experience, whereas I have no idea what an 'inline-block' is, and even when I look it up at w3schools, I get "The element will generate a block box, laid out as an inline box", which is gibberish without further research. Clearly learning CSS is non-negotiable for being a successful web developer. I'm not contesting that fact, I'm lamenting it.
- lwhi 16y agoBeing able to specify that an element is placed within a document flow (inline) is useful. Conversely being able to specify that a (block)-level element has its own position (relative or absolute) is also useful. Sometimes it's useful for an element to be placed 'inline', but also share some of the properties that a block-level element has (like width and height) - so 'inline-block' has its place too. I think part of the problem is, there are no every-day terms that can be used to illustrate a lot of the concepts that CSS makes use of. If simple terms were chosen, the ability to do a lot of things would be crippled. Only simple things would be possible - and this wouldn't suit everyone. But I do agree that it would nice if everything made more sense from the get go.
- danenania 16y agoI don't think those properties should be thrown out. As someone said they are useful for what they were meant to do: style documents. But they're very clumsy when it comes to laying out applications. CSS (and/or HTML) simply needs a friendlier and more direct interface for this purpose.
- lwhi 16y agoThat's why we have frameworks :)
- deleted 16y ago[deleted]