Search

Nalezeno "specificity": 24

The Order of CSS Classes in HTML Doesn’t Matter


That’s right! And I can prove it, too. Let’s look at some CSS first: .a { color: red; } .b { color: blue; } And now let’s look at some markup: <div class="a b">Here’s some text</div> The text is going to be blue because .b is defined last in the CSS, right? But what if we...

Demonstrating Reusable React Components in a Form


Components are the building blocks of React applications. It’s almost impossible to build a React application and not make use of components. It’s widespread to the point that some third-party packages provide you with components you can use to integrate functionality into your application. These...

How much specificity do @rules have, like @keyframes and @media?


I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant? To prove that, we can use the same selector inside and outside of an at-rule and see if it seems to affect specificity. body { background:...

Combining the Powers of SEM and BIO for Improving CSS


CSS is easy, some might argue, but that "easiness" can cause messy code. This is especially true through power of preprocessors like Sass or Less where, if you aren’t careful, your CSS can become harder to deal with instead of easier. Sass? Harder? This Gist shows a great example of Sass nesting...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace