Walery Strauch
Walery Strauch

Reputation: 7072

css selector for selector

I have this HTML Element:

<button type="button" class="btn btn-xs btn-info">Feedback</div>

Class contains three elements:

This is 3th party library (bootstrap) that designs my button.

My question: Is it possible to make css selector where I summarize css selectors to one?

In my case it would look like:

<button type="button" class="feedback">Feedback</div>

And in my css:

.feedback {
  style: .btn; /* how to do that? */
  style: .btn-xs;
  style: .btn-info;
}

Upvotes: 0

Views: 162

Answers (1)

Quentin
Quentin

Reputation: 944442

No.

CSS has no way to define a rule-set that imports rules from other rule-sets.

You can change your original rule-sets so they have a group of selectors:

.feedback, .btn { /* rules */ }
.feedback, .btn-xs { /* rules */ }
.feedback, .btn-info { /* rules */ }

Upvotes: 5

Related Questions