Skip to main content
CSS-Tricks
  • Articles
  • Alamanac
  • Guides
  • Videos
  • Books
  • Newsletter
Search

Articles Tagged
selectors

15 Articles
{
,

}
Direct link to the article Use a Sass Variable for a Selector
Sass sass maps selectors

Use a Sass Variable for a Selector

Say you need to use a certain selector in multiple places in your code. It’s not tremendously common, to be sure, but stuff happens. Repeated code is typically an opportunity for abstraction. Abstracting values in Sass is easy, but selectors …

Avatar of Chris Coyier
Chris Coyier on Jan 2, 2017
Direct link to the article inStyle (Modifying the Current Selector `&` in Sass)
nesting Sass selectors

inStyle (Modifying the Current Selector `&` in Sass)

The following is a guest post by Filip Naumovic from Salsita Software. Filip has built a Sass tool to help with an issue I know I’ve experienced many times. You’re happily nesting in Sass. You’re maybe a level or …

Avatar of Filip Naumovic
Filip Naumovic on May 27, 2016 (Updated on Aug 3, 2021)
Direct link to the article Strategies for Keeping CSS Specificity Low
selectors specificity

Strategies for Keeping CSS Specificity Low

Keeping CSS specificity low across all the selectors in your project is a worthy goal. It’s generally a sign that things are in relative harmony. You aren’t fighting against yourself and you have plenty of room to override styles when …

Avatar of Chris Coyier
Chris Coyier on Jan 12, 2015 (Updated on Feb 3, 2020)
Direct link to the article Meet the Pseudo Class Selectors
pseudo classes selectors

Meet the Pseudo Class Selectors

Pseudo class selectors are CSS selectors with a colon preceding them. You are probably very familiar with a few of them. Like hover:

a:hover {
  /* Yep, hover is a pseudo class */
}

They are immensely useful in a …

Avatar of Chris Coyier
Chris Coyier on Mar 17, 2010 (Updated on Feb 4, 2022)
  • Newer
  • 1
  • 2

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways hosting
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Write for us!
  • Advertise with us
  • Contact us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • X
Back to Top