Is there a way to redefine SASS mixins. I want to override SASS mixins for site specific styling needs. Is there a way to do it ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
My quick bit of testing seems to show that you can override mixins without a second thought. You can't reopen them to the extent that would allow you to override only certain attributes, but you can easily replace them entirely.
sample.sass:
=test
color: red
font-weight: bold
=test
color: blue
p
+test
sample.css:
p {
color: blue; }
Note that this test was performed using Haml/Sass 3.0.2 (Classy Cassidy), so this may not hold true for earlier versions, if you were getting an error before.