background preloader

CSS

Facebook Twitter

CSS Stats. Postcss/postcss.

Shadows

Centering. Blur. Sprites. Processors. GitHub's CSS Performance. Font Awesome, the iconic font designed for Bootstrap. How Our CSS Framework Helps Enforce Accessibility. Spot the difference….You can’t!

How Our CSS Framework Helps Enforce Accessibility

To a sighted user it appears we have two identical button elements. A user interface control not only needs to look like a certain control, it must be described as that control too. Take for example a button, one of the simplest of controls. There are many ways you can create something that looks like a button, but unless you use the actual button tag (or button role – more on roles later), it will not be described as a button. Why does it need to be described as a button? Semantics In the table below, compare and contrast the accessibility tree attributes for each element (hint: click each image to view at full size). Accessibility tree screenshots taken from Mac OSX Accessibility Inspector What’s also interesting is that if you look at the ‘Actions’ section of the tree, the real button has an ‘accessibilityPerformPress’ action, while the fake button does not.

Swiss cheese You might be wondering, “Who on earth would use a span or div tag for a button?” Tabs. Magic of CSS — Adam Schwartz. Home - Scalable and Modular Architecture for CSS. CSS Specificity And Inheritance. Advertisement CSS’ barrier to entry is extremely low, mainly due to the nature of its syntax.

CSS Specificity And Inheritance

Being clear and easy to understand, the syntax makes sense even to the inexperienced Web designer. It’s so simple, in fact, that you could style a simple CSS-based website within a few hours of learning it. But this apparent simplicity is deceitful. If after a few hours of work, your perfectly crafted website looks great in Safari, all hell might break loose if you haven’t taken the necessary measures to make it work in Internet Explorer. Understanding a few often overlooked concepts is also important. Two of these concepts are specificity and inheritance. The notion of a “cascade” is at the heart of CSS (just look at its name). Please consider reading our previous related article: CSS Specificity: Things You Should Know 1. Style sheets can have a few different sources: There is also the ! Knowing this, let’s look at the final order, in ascending order of importance: 2.

Getting back to the ! 3. 4. !important CSS Declarations: How and When to Use Them. Advertisement When the CSS1 specification was drafted in the mid to late 90s, it introduced ! Important declarations that would help developers and users easily override normal specificity when making changes to their stylesheets. For the most part, ! Important declarations have remained the same, with only one change in CSS2.1 and nothing new added or altered in the CSS3 spec in connection with this unique declaration. Let’s take a look at what exactly these kinds of declarations are all about, and when, if ever, you should use them. A Brief Primer on the Cascade Before we get into ! CSS outline property - outline: none and outline: 0. Should You Reset Your CSS? By Michael Tuck This article explores the ongoing debate on whether or not web designers and web developers should reset their CSS, sharing the thoughts and opinions of several web professionals.

Should You Reset Your CSS?

This is a three-part series of articles on the topic of CSS resets. After discussing the rich and interesting history of CSS resets (Part 1) and going over CSS reset stylesheet options (Part 2), we will now discuss the pros and cons of using reset stylesheets here in Part 3. The Benefits of Resetting Your CSS Web designer/developer and book author Morten Rand-Hendriksen is a huge fan of CSS resets; he has advised everyone to use them as the foundation of their stylesheets. Defending the "hard reset" method, Coyier outlined two main concerns that web designers typically have against using the universal selector. The first is that it can break web browser default styles for things such as form elements, which he said was "untrue" unless you use a border:0 property in the style rule.

Acknowledgements. Refining The Way We Structure Our CSS At Trello. Have you been reading all the blog posts about the CSS architecture at various companies out there?

Refining The Way We Structure Our CSS At Trello

No? Check out the ones for GitHub, CodePen, Lonely Planet, Medium, and Buffer. I can’t get enough of them. We’ve slowly been refining the way we structure our CSS at Trello. I can firmly say it’s pretty okay now, nearing on good. The ToolsFile StructureModulesWhat about JavaScript? Warning: this post assumes you make websites and know some things about CSS. 1. We use LESS for trello.com. We don’t use Grunt or Gulp. For a new release, we import all the CSS files into a single core.css file using LESS, then CSSshrink and gzip it, and ship it to our CDN. 2. Home · stubbornella/oocss Wiki. Html - Single huge .css file vs. multiple smaller specific .css files. CSS Zen Garden: The Beauty of CSS Design.