Search

Nalezeno "specificity": 24

:has is an unforgiving selector


A little thing happened on the way to publishing the CSS :has() selector to the ol’ Almanac. I had originally described :has() as a “forgiving” selector, the idea being that anything in its argument is evaluated, even if one or … :has is an unforgiving selector originally...

Taming the Cascade With BEM and Modern CSS Selectors


BEM. Like seemingly all techniques in the world of front-end development, writing CSS in a BEM format can be polarizing. But it is – at least in my Twitter bubble – one of the better-liked CSS methodologies. Personally, I think … Taming the Cascade With BEM and Modern CSS Selectors...

Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project


If a utility class only does one thing, chances are you don’t want it to be overridden by any styles coming from elsewhere. One approach is to use !important to be 100% certain the style will be applied, regardless of … Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project...

Manuel Matuzovic’s CSS Specificity Demo


If you’re looking for a primer on CSS specificity, we’ve got that. And if you’re trying to get ahead of the game, you should be aware of CSS Cascade Layers as well. One of the ways to help get … Manuel Matuzovic’s CSS Specificity Demo originally published...

A Complete Guide to CSS Cascade Layers


This is your complete guide to CSS cascade layers, a CSS feature that allows us to define explicit contained layers of specificity, so that we have full control over which styles take priority in a project without relying on specificity … A Complete Guide to CSS Cascade Layers originally...

Don’t Fight the Cascade, Control It!


If you’re disciplined and make use of the inheritance that the CSS cascade provides, you’ll end up writing less CSS. But because our styles often comes from all kinds of sources — and can be a pain to structure and … Don’t Fight the Cascade, Control It! originally published...

An Interview With Elad Shechter on “The New CSS Reset”


Hey folks! Elad reached out to me to show me his new CSS reset project called the-new-css-reset. It’s quite interesting! I thought a neat way to share it with you is not only to point you toward it, but … The post An Interview With Elad Shechter on “The New CSS Reset” appeared...

Cascade Layers?


There is a new thing coming in CSS: @layer. As with all new things, it takes time to really wrap your head around it. And despite me tapping at my keyboard about it, full disclosure, I’m not sure my … The post Cascade Layers? appeared first on CSS-Tricks. You can support CSS-Tricks...

CSS Nesting, specificity, and you


Here’s Kilian Valkhof on CSS nesting which isn’t available in browsers yet, but will be soon. There are a few differences he notes between CSS nesting and nesting in Sass or Less though. Take, for example, the following code: div … The post CSS Nesting, specificity, and you appeared...

Using the Specificity of :where() as a CSS Reset


I don’t know about you, but I write these three declarations many times in my CSS: ul { padding: 0; margin: 0; list-style-type: none; } You might yell at me and say I can just put those in my CSS … The post Using the Specificity of :where() as a CSS Reset appeared first on CSS-Tricks....

Should DevTools teach the CSS cascade?


Stefan Judis, two days before I mouthed off about using (X, X, X, X) for talking about specificity, has a great blog post not only using that format, but advocating that browser DevTools should show us that value by … The post Should DevTools teach the CSS cascade? appeared first...

Let’s use (X, X, X, X) for talking about specificity


I was just chatting with Eric Meyer the other day and I remembered an Eric Meyer story from my formative years. I wrote a blog post about CSS specificity, and Eric took the time to point out the misleading nature … The post Let’s use (X, X, X, X) for talking about specificity appeared first...

:where() has a cool specificity trick, too.


There is a lot of hype on the :is() pseudo-selector lately, probably because now that Safari 14 has it, it’s supported across all the major browsers. You’ve got Miriam tweeting about it, Kevin Powell doing a video, Šime … The post :where() has a cool specificity trick, too....

Collective #614


The WET Codebase * zerodivs.com * Super Expressive * Webwaste * What is CSS Specificity? * 3D Radio The post Collective #614 appeared first on Codrops

Hide Scrollbars During an Animation


CSS still can’t animate to auto dimensions. .dropdown { transition: 0.2s; height: 0; } .dropdown.open { /* the height will change, but it won't animate. */ height: auto; } There is JavaScript trickery you can try. Brandon Smith outlined several techniques here a little while back....

Using Custom Property “Stacks” to Tame the Cascade


Since the inception of CSS in 1994, the cascade and inheritance have defined how we design on the web. Both are powerful features but, as authors, we’ve had very little control over how they interact. Selector specificity and source order provide some minimal “layering” control...

CSS :is() and :where() are coming to browsers


Šime Vidas with the lowdown on what these pseudo-selectors are and why they will be useful: :is() is to reduce repetition¹ of parts of comma-separated selectors. :where() is the same, but nothing inside it affects specificity. The example of wrapping :where(:not()) is really great, as now there...

“weeds of specificity”


Lara Schenck: [...] with WordPress child themes, you are all but guaranteed to get into the weeds of specificity, hunting around theme stylesheets that you didn’t author, trying to figure out what existing declaration is preventing you from applying a new style, and then figuring out the least...

Amelia Wattenberger’s The CSS Cascade


If you're on a small screen, remind yourself to check it out on a big screen when you have the chance. Did you know that styles from an active transition beat !important rules, but styles from an active animation do not? I definitely did not. Or that there are "origins" that are almost like...

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