3 ms·
> Huh? Do you not remember/know what it was like to style webpages with FONT elements before CSS? CSS was a godsend. That was the separating content from presen
by lmm 11y ago
> Huh? Do you not remember/know what it was like to style webpages with FONT elements before CSS? CSS was a godsend. That was the separating content from presentation breakthrough.
Have you tried using FONT recently? (Or indeed, any time this decade?) When you're generating your pages programmatically it's really easy to separate content and presentation concerns in code but then combine them when finally rendering the page. You can use a normal programming language which is much clearer than CSS selectors. CSS was necessary in the days of hand-written HTML, but once you have a CMS you might as well use FONT and inline styles (possibly using CSS just with single classes, as a kind of "cache" to avoid repeating the same inline styling block everywhere).
- rubbingalcohol 11y agoWhat if you don't want to use a CMS?
- iopq 11y agoThen just hand-code your layout logic
- antod 11y agoNo thanks. FONT is listed as "obsolete, non conforming, not to be used" in the HTML5 spec. It couldn't do very much in terms of styling anyway. I would rather keep styles in a reusable cachable resource than bloat out the HTML. I would rather styling changes NOT turn into coding exercises, especially ones that cause a massive 'WTF?' for some future maintainer.
- olavk 11y agoSeriously, you think programatically transforming a document into presentational html is simpler than using a css selector?
- lmm 11y agoI already build up my HTML programmatically from reusable components, following DRY (Don't you?). That means the markup for what it means to be e.g. a paragraph heading is already in one place. It's no trouble to style it there, with a font tag, and if I want to change it then I can change it there. And if I want to abstract out a particular piece of styling and reuse it across several components, it's just code, I factor it out the same way I would anything else. So yes, seriously, it's simpler than using a CSS selector.