3 ms·
Most of these are nitpicks. Some are preferences that I would oppose. CSS is inspired by the style sheets of yore, of typeset publications made by ink-smeared
by combatentropy 8y ago
Most of these are nitpicks. Some are preferences that I would oppose.
CSS is inspired by the style sheets of yore, of typeset publications made by ink-smeared metal pressed into paper. A magazine or newspaper might have a "style sheet" that said things like, "Paragraphs shall be 10-point Caslon" and "all second-level headings shall be hanging headings, outdented 5 picas." Before web browsers got a hold of them, stylesheets had already entered the electronic world in desktop-publishing software like QuarkXPress and even Microsoft Word.
The problem they were trying to solve was, how do you update the look and feel your website easily? This was in the days when most websites were static HTML files, and updating all your articles meant changing a file for every page. The most famous and beautiful example of the power of Cascading Style Sheets is CSS Zen Garden. In 2003 Dave Shea provided an unstyled page of HTML, and then designers from around the world contributed stylesheets that transformed the page into wildly different designs (http://www.csszengarden.com/ http://www.csszengarden.com/).
- praptak 8y ago> CSS is inspired by the style sheets of yore Which is in my opinion the reason why it sucks for most of its current use cases. Layout of a paper document and layout of a web page are very different. The web "page" often isn't even a page but rather a GUI for a computer program.
- combatentropy 8y agoFrom the beginning, CSS tutorials said just what you said, that the web is not the printed page and that you should not strive for pixel-perfect layout.
- mjevans 8y agoWhich is exactly what anyone that I've talked to that gets paid to write CSS in any aspect is expected to do with it; pixel-perfect layouts.
- pjmlp 8y agoI already had the "pleasure" of being in a project whose customer was refusing to pay as it was pixel perfect with their Powerpoint designs and across all major browsers and OSes. :(
- praptak 8y agoIt's not necessarily about pixel perfect. Even basic things like "two divs horizontally" are not intuitive in CSS, especially pre-flex-box.
- nicoburns 8y agoCSS grid is a big improvement here though.
- Blaiz0r 8y agoUse spans then...
- praptak 8y agoThe selling point of CSS tho is that layout change should not require change in html.
- Technetium_Hat 8y agodiv { display:inline-block } was that really so hard?