CSS (Cascading Style Sheets) (2)
The Truth About â!importantâ
Sometimes I wake up at night, full of agony, tears in my eyes. The Holiest Alliance Against !important
is haunting me. I see their countless crusaders gallop at innocent web developers with merciless force, incessantly blowing their deafening hornsâŚ
#58 ¡ ¡ development

New Book: âThe Little Book of HTML/CSS Frameworksâ
Itâs out! My new book, The Little Book of HTML/CSS Frameworks, is now available. I myself have been surprised by the sudden release, and while Iâm still unsure about how print copies can be obtained, the book can now be downloaded for free at OâReilly.
#57 ¡ ¡ books, development, html, frameworks
On the Deterioration of HTML/CSS Practices
Presentational markup for everyone.
#56 ¡ ¡ development, html, maintainability
CSS and Specificity
On one of CSSâ greatest features, going from using graphs for greater understanding to affirming fundamentals for saner coding.
#55 ¡ ¡ development
Google and HTML/CSS Code Quality
For much of Googleâs life time there have been few Google web pages of high code quality. That had changed over the last years, but now there are regressions. On the rise and fall of Googleâs websites.
#54 ¡ ¡ development, html, conformance, quality
CSS, DRY, and Code Optimization
Why we should minimize repetition in style sheetsâperhaps through using declarations just onceâ, focus more on CSS optimization, and consider that avoiding problems is also a way of solving them.
#53 ¡ ¡ development, maintainability, optimization
On Declaration Sorting in CSS
I keep on seeing people advocate to sort declarations âby type.â And every time I wonder, why is this idea still going around? Type sorting is extraordinarily ineffective, for itâs extremely slow and consistently unreliableâŚ
#52 ¡ ¡ development, maintainability
CSS: When to Use Generated Content
Generated content means a special option in CSS to embed content in documents. Itâs achieved through the content property. Fast forward, generated content should only be used for non-critical content; there it can be a very sharp instrument.
#51 ¡ ¡ development
CSS, HTML, and the Problem of Spec Fragmentation
We have not one but two fundamental problems with CSS. One is unrestricted growth and complexity leading to poor understanding and poor code. Another one is spec fragmentation, also an issue with HTML, which results in inefficiencies. We should look for a better balance.
#50 ¡ ¡ development, html
Object-Oriented HTML, and OOCSS
âObject-oriented CSSâ is the idea of treating page elements as objects, giving all these objects classes, treating objectsâ classes as single entities in style sheets, and taking it from there. I reviewed the old OOCSS site and Smashing Magazineâs introduction.
#49 ¡ ¡ development, html
How to Order CSS Selectors
There are a number of ways to write style sheets. The domain of style guides, many of them go into some detail. What I, despite my work on a number of guides, have so far missed, is a reference to sort selectors and rules, as proposed here.
#48 ¡ ¡ development
The CSS Problem
CSS is growing too large while CSS 2 has not nearly been understood by authors. This non-sustainable growth is a big problem for CSS.
#47 ¡ ¡ development
Print Style Sheets and URLs
Print style sheets are awesome. Theyâre easy to write, too. Site owners and developers who care about print typically know what to do. Alas thereâs one thing thatâs done rather the wrong than in any right way: printing URLsâŚ
#46 ¡ ¡ development, design
Testing Tricks: CSS Bookmarklets
On complex development environments and CSS bookmarklets as a testing complement. Complement as in youâve done everything you can but want to err on the safe side.
#45 ¡ ¡ development
CSS: How to Host Right-to-Left Styling
For international projects, donât use separate style sheets for right-to-left (RTL) styling: use natural (@dir
) or artificial (@id
, @class
) hooks instead. The only exception are unbearable performance issues due to hundreds of RTL rulesâŚ
#44 ¡ ¡ development, maintainability
CSS Validation and Vendor Extensions: Throw Warnings, Not Errors
If you understand valid code as a quality baseline, you validate your code. If you validate style sheets, you come across errors like âProperty -moz-border-radius
doesnât existâââŚ
#43 ¡ ¡ development, conformance
âpxâ Is Dead, Long Live âpxâ
Itâs over. There is no ban on px
anymore. The only reason why we as web developers had to adjust coding practices were user agents that failed to meet user agent accessibility guidelines.
#42 ¡ ¡ development
HTML/CSS Frameworks: Useful, Universal, Usable, Unobtrusive
A high quality HTML/CSS framework needs to have four attributes: useful, universal, usable, and unobtrusive. The four Uâs.
#41 ¡ ¡ development, html, frameworks, quality
HTML, CSS, and Web Development Practices: Past, Present, and Future
Articles with a title consisting of more than 15,000 characters donât need an introduction.
#40 ¡ ¡ development, html, maintainability
The True Advantage of CSS
Despite CSS being around for a long, long time, there are still some myths around it. Reading Mikeâs post on CSS evangelism again I couldnât only relate to Mikeâs concerns, I also felt reminded ofâŚ
#39 ¡ ¡ development, maintainability
Diagnostic Styling Reloaded
Eric cultivated the concept of âdiagnostic styling,â meaning using CSS to track down problems within HTML documents. Iâve been working with diagnostic style sheets for general quality assuranceâŚ
#38 ¡ ¡ development, quality
Microformats, Key Flaws
I like the idea behind microformats, but Iâm not convinced of the way that idea is brought to life. I see three major flaws that appear to make microformats stand in their own way.
#37 ¡ ¡ development, html
âhandheldâ Media Type, RIP?
Website authors donât use handheld
as itâs barely supported; mobile device manufacturers donât support handheld
because itâs barely used. This is kind of the situation I think weâre facing, and itâs a problem.
#36 ¡ ¡ development
Letâs Make The Web Faster
Two weeks after my last outcry regarding slowness on the Web thereâs a more proactive response: Google launched code.google.com/speed, subtitled âletâs make the Web faster.â
#35 ¡ ¡ development, html, performance
Maintainability Guide
Maintainability is important in order to deal with change. Good maintainability means making change easier and more affordable, and avoiding change that is not necessaryâŚ
#34 ¡ ¡ development, html, maintainability
CSS: The Maintenance Issue #1 and How You Can Avoid It
The biggestâas most unnecessaryâmaintenance issue in web development is, as my recent research shows, style sheet naming and integration. Web developers use inadvisable style sheet names and inadvisable ways to integrate style sheets that force themâŚ
#33 ¡ ¡ development, html, maintainability
Why CSS Needs No Variables
CSS variables and constants are one of the top features web developers are asking for in web development fora, magazines, blogs, and on W3Câs www-style. Following a concept written by Daniel Glazman and Appleâs Dave Hyatt, the WebKit rendering engineâŚ
#32 ¡ ¡ development
The Stupidest Style Sheet Name Ever
The last name you want to pick for your style sheet is âstyle.cssâ. Why is âstyle.cssâ such a poor CSS file name? The main reason is maintenanceâŚ
#31 ¡ ¡ development
CSS: Style the Non-Obvious
One of the qualities you have to acquire as a web developer is to see the non-obvious, and to use that skill to your codeâs advantage. Let me explain by two simple examples.
#30 ¡ ¡ development
Performance of CSS Selectors Is Irrelevant
âŚif you like to have a strict read of Steve Soudersâ recent research. Weâve still got few but now a few more numbers backing up what we always suspected, that merely optimizing selectors is micro-optimization.
#29 ¡ ¡ development, performance
When to Split Style Sheets
Three factors influence whether it makes sense to split style sheets: probability, meaning (aka semantics), and granularity.
#28 ¡ ¡ development
Arial, Helvetica
An extension of my post on Arial and Helvetica: For those who want or have to use Arial as their standard font, there is no point in mentioning Helvetica anywhere in the code, as in arial, helvetica, sans-serif
.
#27 ¡ ¡ development
5 Tips To Deal With Right-to-Left Projects
Know what goes into your markup and what goes into your style sheets. Itâs actually simple: When available, you should always use dedicated bidi markup to describe your content. CSS may not be available, and the specs actually say thatâŚ
#26 ¡ ¡ development
WDR #1: Versioned Style Sheets
Ladies and gents, all I presentâs⌠the Web Dev Report, issue #1.
#25 ¡ ¡ development
5 CSS Tips Every Web Developer Should Know About
Of all the tips this site shares, the following ones may be special. Letâs quickly run through what might be essential for every web developer to know about CSS. Main focus: maintainability, though differently.
#24 ¡ ¡ development, maintainability
An Exercise for Emerging CSS Experts: Avoid IDs and Classes
To gain more expertise with CSS, thereâs a great bonus level: Try to avoid IDs and classes altogether. Thatâs right: Write your markup without any IDs and classes.
#23 ¡ ¡ development, html
When Guidelines Should Be Descriptive or Prescriptive
Every time Iâm putting up guidelines or conventions one of the decisions I need to make is whether the guidelines, or which parts of them, should be descriptive or prescriptive. For coding guidelines this could mean the difference between, say, âthe markup should be validâ and âthe markup must be validââŚ
#22 ¡ ¡ development, html, quality
To Be Clear (on Conditional Comments and Resets)
My articles on Conditional Comments and âresetâ style sheets belong to the most popular articles on the respective topics not just on this site, but apparently on the Web. Now, it looks like I could still clarify my standpoint.
#21 ¡ ¡ development, html
Best Practices for ID and Class Names
Iâm working on another article for German Dr. Web mag, this time covering recommendations for IDs and classes, an issue likely as old as the Web itself. Taking a different approach than usual Iâm feeling free to publish a âguerrilla sneak previewâ in this place.
#20 ¡ ¡ development
A Few Words on HTML/CSS Frameworks
Public, or open, or external, HTML/CSS frameworks are rarely a good idea. Why? Because framework developers are outside of your organization and cannot know your needs. This simple fact, the inevitable ignorance of a third party, means thatâ
#19 ¡ ¡ development, html, frameworks, minimalism
When Validation Becomes Unimportant
Validation becomes unimportant only once youâre ahead of the game. Even then, truly mastering HTML and CSS, itâs best to stick with valid markup and styling. Improving latency might constitute the only exceptionâif at all.
#18 ¡ ¡ development, html, conformance
CSS: Simple Rules for Better Organization and More Efficiency
âOrganization is not everything, but without organization, everything is nothing,â one of my teachers used to say. Almost everything benefits from organization, and so does work with CSSâespecially when working with many people.
#17 ¡ ¡ development, maintainability, performance
Why âResetâ Style Sheets Are Bad
Jonathan set the pace, Eric countered, a few people chimed in, and I, having criticized reset and undo style sheet criticism back in January, feel obligated to repeat that reset style sheets are bad: A novice should not use them, an expert would not use themâŚ
#16 ¡ ¡ development
CSS Properties Index
A list of all properties in CSSÂ 1, CSSÂ 2, CSSÂ 2.1, and CSSÂ 3, including their initial values.
#15 ¡ ¡ development
Great CSS Techniques and the Simple Truth Behind Them
Thereâs a simple recipe to judge CSS techniques: Does the method in question require HTML additions and modifications (beyond introducing IDs or classes)? If yes, the technique likely isnât elegant and might be inadvisable.
#14 ¡ ¡ development, html, maintainability
CSS: Selector Variables
Complex projects suffer from higher cost of selector changes, and long sequences of simple selectors do impact the understandability and efficiency of style sheets. One solution could be selector variables or âsynonyms,â a concept I proposed to the CSS Working Group âŚ
#13 ¡ ¡ development
Choke Web Development Framework 1.0
After years of thorough research I may finally present the Choke Web Development Framework 1.0, âChokeâ or âCWDFâ in short. Choke is an easy-to-use, easy-to-maintain, and future-proof platform for web design and developmentâŚ
#12 ¡ ¡ development, frameworks
User Agent Style Sheets: Basics and Samples
CSS manages the default formatting of documents through user agent style sheets, a cornerstone of the cascade. This means that a web browser doesnât just present a line of text when itâs fed with an HTML document that has no styling information, butâŚ
#11 ¡ ¡ development
Microformats Would Benefit From a Namespace
Microformats become more and more popular, accelerated by the questionable success of the nofollow
microformat. However, those of them that mandate class names cause problems that could be avoided by using a âpseudo-namespace.â
#10 ¡ ¡ development, html, maintainability
WCAG, HTML, and CSS: Maybe the Standards Need a Break
The web development community worries about the development of WCAG, HTML, and CSS (about the latter since recently). These worries and the related criticism appear valid and legitimate, and there are things we could do.
#9 ¡ ¡ development, html, accessibility