From the course: Sass Essential Training
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Placeholder selectors - Sass Tutorial
From the course: Sass Essential Training
Placeholder selectors
- [Instructor] Sometimes you may want to create a class that is not something that you want to compile, but only something that you want to extend. In that case, you can use placeholder selectors. Now here's what they look like. They're like any other class definition, but they begin with a percentage sign instead. And then you add the name of the class that you would normally put there. When you want to extend the class, you simply use the extend at rule and then the name of the placeholder, like we do right here. What that will allow you to do is to create the button primary and the button secondary, but not have a BTN class by itself. So let's take a look at how that compiles. So here is the same sample that I've been using with button primary and button secondary. I don't have the one, that is just a BTN because that one is now not going to output 'cause I've used this placeholder selector right here. And if we takeâ¦
Contents
-
-
-
-
-
(Locked)
Interpolation2m 22s
-
(Locked)
Placeholder selectors1m 29s
-
(Locked)
Comments1m 52s
-
(Locked)
Using lists9m 21s
-
(Locked)
Each2m 47s
-
(Locked)
For2m 1s
-
(Locked)
Maps5m 1s
-
(Locked)
Operators and conditionals5m 57s
-
(Locked)
Color functions4m 27s
-
(Locked)
Challenge: Badges1m 36s
-
(Locked)
Solution: Badges8m 43s
-
(Locked)
-