Kevin Powell - CommunityKP-C
Kevin Powell - Community3y ago
10 replies
elbi3

(CSS/SCSS) Syntax Question on Selector Declaration

Quick question for you all: Can you chain selectors when defining a CSS/SCSS ruleset? Or did I wake up with some JavaScript madness in my brain?
I wanted to do something like this:
header.hero {
    display: grid;
    grid-template-areas: "hero";
}


I was hoping this would remind my future self that the generic "header" selector should use the class component name "hero".
Note: I've labeled this as SCSS and CSS in case there are two answers
Was this page helpful?