I'm not really sure I understand what the point of this message is. The point of separation between CSS and HTML is not that "designers" are idiots. Nor is it that developers are poor designers. The idea is strictly to keep the data separate from any other concern. This is broken all of the time by all sorts of grid based elements and such. But the idea does seem decent, if a touch naive. That is, to Spolsky's credit…
The thing is HTML is not layout free if you use it as intended. For instance different layouts are defined for table, span or div tags. The same goes for presentation, where h1/h2/h3, input or select tags have a default presentation. You can override most of these defaults (some are still pretty hard to override), but it's still baked in; would your CSS be ignored or not loaded for any reason and you're back on the d…
CSS is unnecessary given a layout language
161–170 of 183 posts
Re: CSS is unnecessary given a layout language
#162Earlier quoted context omitted.
Indeed CSS is broken. But, if you tried to make that case several years ago during the Great War on Table-based Layout, you'd have been absolutely persecuted. Oh how we wrangled with the utter pain that is CSS layout, only to appease the tableless zealots. I can remember wrestling for hours with simple layouts that just wouldn't cooperate cross-browser. Meanwhile, I could achieve those layouts in mere minutes with ta…
Styling is one thing, but layout tends to be intrinsically tied to the content. This is an interesting distinction - thanks. As you say there are issues with separating layout and content, because the two can be hard to separate effectively. I think it is worth the effort though, and sometimes pays off (for example reflowing content for a mobile device). An interesting thought though that we should separate style and…
http://www.smashingmagazine.com/2011/12/12/an-introduction-t...
Re: CSS is unnecessary given a layout language
#163Most "problems" with CSS (with the exception of vertical centering and a few others) are caused by the fact that people can't be bothered to learn CSS. It's funny: if a programmer is told to write CSS but doesn't know how, he'll copy-and-paste from Stack Overflow, get a shit result, and say that CSS sucks. If a programmer is told to write Elm but doesn't know how, he'll learn the language, write some decent Elm, and…
This all day. Take an online course on CSS, really grok the basics, pick a grid framework, and you're done . Should take less than a day to go over it, maybe a week of practice before CSS is another tool in your belt that you can wield with efficacy and ease. The more complicated stuff, it's fine to copy-paste from SO - no shame.
I don't have that problem with any other part of the stack I use for web development.
Re: CSS is unnecessary given a layout language
#164Re: CSS is unnecessary given a layout language
#165I actually like CSS as it is now, and it's getting better ( cough , flexbox). Am I the only one who finds CSS incredibly hard to master, though? I've been writing CSS for years and I still feel like a newbie sometimes, and feel like I'm just tinkering with random attributes until it looks right.
agreed. I've been coding for 20+ years now (shit I feel old), 15 or so years of them with HTML and friends and I still throw my hands up in the air every so often when trying to deal with something as simple as getting stuff to show in the right place on a web page. CSS really is hard to master. Part of that could just be me. I don't really care how it works, I just figure out the smallest amount possible to get what…
Re: CSS is unnecessary given a layout language
#166I actually like CSS as it is now, and it's getting better ( cough , flexbox). Am I the only one who finds CSS incredibly hard to master, though? I've been writing CSS for years and I still feel like a newbie sometimes, and feel like I'm just tinkering with random attributes until it looks right.
I don't mean to be rude[0], but what do you find so difficult about it? The box model makes a lot of sense, and once you understand that you're most of the way there. I still Google for less-common syntax (e.g. adding a strikethrough style to text) from time to time, but most of it is internalized by now[1]. Code School[2] was great when I was first ramping up as a developer. I do also have a great memory[4] for tiny…
Could you perhaps show some examples of websites that you have built (or send me a message privately if you're not comfortable with that)?
One explanation I can think of is that the more willing you are to stray from the 'separation of content from presentation' rule, the easier things are. Many of the CSS problems I run into would be much easier to solve if I could allow my markup to be informed by the styling, rather than the other way around.
Another possibility is that some of the people who 'like' CSS are also the ones designing the site. They might design with their CSS knowledge as a basis.
In contrast, many of us who struggle with CSS probably struggle more because 1) we try to keep the html 'pure', and 2) we are handed designs by others or don't let ourselves be constrained by our knowledge of CSS.
Just some thoughts...
Re: CSS is unnecessary given a layout language
#167Earlier quoted context omitted.
1. Someone _has_ come up with the One True Layout System. It's just that most people like to pretend TeX doesn't exist or, when they grok the box-and-glue layout model, try to reinvent it from scratch.
does TeX have responsive layout with a variable document width? For the past year my ability to use CSS alone to convert an existing HTML Website and make it work on mobile has been putting food on my table. Could I be using TeX for the same thing?
In practice, people bet the farm on CSS....
Re: CSS is unnecessary given a layout language
#168Earlier quoted context omitted.
That. I actually learned CSS in a school. My teachers were real front-end developers. I can honestly say that I never had any problem with CSS and that I never found it to be broken. The only issues that I think of come from trying to fix things for the old IE browsers, which are broken. CSS itself? Mastered it in 3 months if not less. Come on, people. You can't give me both "You are paid less because CSS is easy to…
You seem new to this. Just keep centering variable height content vertically in variable height containers on different browseres until you get what's broken with CSS. You can also try to pick up a newspaper (multicolumn) and try to replicate its layout so it behaves well with dynamic content.
Doing both of those things in IE6 is hard.
To me, IE6 is broken, CSS isn't.
Re: CSS is unnecessary given a layout language
#169Earlier quoted context omitted.
The thing is HTML is not layout free if you use it as intended. For instance different layouts are defined for table, span or div tags. The same goes for presentation, where h1/h2/h3, input or select tags have a default presentation. You can override most of these defaults (some are still pretty hard to override), but it's still baked in; would your CSS be ignored or not loaded for any reason and you're back on the d…
Presentation and semantics are not the same thing. All the default presentation is easy to override if you know what you're doing. CSS is pretty damn simple. You should learn the basics. Namely: cascading, specificity, nesting, inheritance, the _BOX_ model. If you think presentation and semantics are mutually exclusive then you're doing it wrong. Very wrong! The example you give about the default layout of elements c…
In a way I am very intersted in what Google is doing with the material UI. They seem to be ditching native components to reimplement everything.
Basic css is simple and fun. It gets hairy when you try anything mildly complex, and you start to learn magic spells when playing the "I made this screen in Photoshop, make it pixel with pixel perfect fidelity in HTML" game.
Re: CSS is unnecessary given a layout language
#170CSS is broken. I've just been watching a colleague learning HTML/CSS for the first time. HTML was easy and she has a very good handle on that, producing some nice HTML5 markup by hand very quickly. CSS has been a nightmare - mostly not because of selectors or values (that comes later), but because of basic layout issues caused by the nasty hacky layout model of CSS - in particular the concepts of floats, block and in…
Indeed CSS is broken. But, if you tried to make that case several years ago during the Great War on Table-based Layout, you'd have been absolutely persecuted. Oh how we wrangled with the utter pain that is CSS layout, only to appease the tableless zealots. I can remember wrestling for hours with simple layouts that just wouldn't cooperate cross-browser. Meanwhile, I could achieve those layouts in mere minutes with ta…
Hopefully, css tables are very usable, and playing with them is nice and smooth most of the time. Being able to cleanly redeine grids of content on the fly is one of the big advances that css brought to the table I think.