Sass Placeholder Selectors

You are Here:

Sass Placeholder Selectors

Sass Placeholder Selectors is used to extend the CSS properties, whenever necessary.

Placeholder Selectors always starts with a % and it's not included in the CSS output.

The following example will have no effect as we are not extending the placeholder selectors.

Example

SASS TO CSS CONVERTER
%make-strong{ font-weight: bold; } .alert{ color: red; }

Syntax

%anyName{ // css code }

Extending Placeholder Selectors

In the following example we are extending placeholder selectors with @extend At-Rule.

Example

SASS TO CSS CONVERTER
%make-strong{ font-weight: bold; } .alert{ @extend %make-strong; color: red; }

Extending Placeholder Selectors in Multiple Selectors

In the following example, we are extending the placeholder selectors in multiple selectors.

Example

SASS TO CSS CONVERTER
%make-strong{ font-weight: bold; } .alert{ @extend %make-strong; color: red; } .warning{ @extend %make-strong; color: blue; }

Reminder

Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Sass.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author