LESS: Better to use inheritance or multiple classes

前端 未结 2 1291
遥遥无期
遥遥无期 2021-01-31 08:27

I have a LESS file with an inputbase(){} class. I use it on a lot but not every input type. When I compile I have a lot of repeated styles in the outputted CSS file

2条回答
  •  無奈伤痛
    2021-01-31 08:42

    In the first place it seems to depend on the version of Less you use. Take a look at https://github.com/twbs/bootstrap/issues/8947. First it has been identified as a bug. In that case you could choose wait for the bug fix or change your code.

    Later on it will discussed if it is a bug or not. Different use of parenthesis will give different results. Also their will be an issue about mixins with the same name as classes, see also: https://github.com/less/less.js/issues/1437

提交回复
热议问题