How do you define attribute selectors in SASS?

Craig Walker picture Craig Walker · Jan 25, 2011 · Viewed 70.9k times · Source

In CSS, you can do this:

input[type=submit] {
  // properties
}

It's a very useful for styling form buttons.

How do you do the same thing in SASS?

Answer

Rajeesh picture Rajeesh · Sep 1, 2011

You can also nest it like this

input
  &[type="submit"]
    .... 
  &[type="search"]
    ....