Home > front end >  How to apply previous substyle into other style?
How to apply previous substyle into other style?

Time:04-23

How can add input properties to select also? Something wrong with this syntax.

.nestedContainerForContactForm {
    div {
        input {
            width: 100%;
        }
        &select {
            outline: none;
            -webkit-appearance: menulist-button;
        }
    }
}

CodePudding user response:

The most efficient way to write it would be like this:

.nestedContainerForContactForm {
  div {
    input,
    select {
      width: 100%;
    }
    select {
      outline: none;
      -webkit-appearance: menulist-button;
    }
  }
}
  • Related