Can I make this CSS simpler to avoid repeating the parent selector?

前端 未结 2 2083
无人及你
无人及你 2020-12-22 06:58

A common pattern I come across is the following:

form.request input {
    /* ... */
}

form.request input[type=\"text\"] {
    /* ... */
}

form.request sele         


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 07:46

    No, you cannot. But if you want to do less typing and make the stylesheets more readable, consider using SCSS.

提交回复
热议问题