Damodar Bashyal
Damodar Bashyal

Reputation: 941

How to include empty classes and IDs in sass result

I have just started using sass and still learning. I am using this command to generate css from sass:

sass --watch custom.scss:custom.css

It seems to remove empty classes and IDs. Is it possible to include them on the resulted css?

Upvotes: 5

Views: 3172

Answers (1)

Waiting for Dev...
Waiting for Dev...

Reputation: 13029

SASS never compiles empty classes, as a workaround you can add a CSS comment inside the class with no rules, so it will be compiled.

.empty {
  /*I'm still empty*/
}

Upvotes: 17

Related Questions