Home > Net >  SCSS - Is there a 'self' indentifier?
SCSS - Is there a 'self' indentifier?

Time:05-10

I want to add SCSS on the body, for default, and respecify them on the P and LI tags (not in total control of the site, and wanna stop plugins from hijacking my p's and li's).

So I have to do something like this

body{
  color:#000;
  p,li{
    color:#000;
  }
}

But that makes some ugly repetition. So is there a thing in SCSS that refers to self or something like that? So at the end I could have the same styles on body, body p, and body li?

Something like

body{
  [self],p,li{color:#000;}
}

CodePudding user response:

body{
  &,p,li{color:#000;}
}
  • Related