This is exactly what I'm trying to do. This is great to keep your styles DRY.
I've extended this further so that the fallback values would automatically be placed by the cssvar() mixin. Perhaps others may find this useful, here's my modification:
Add this at the top to hold all the styles:
$_cssvars:();
Add this at the start of the cssvars() mixin to gather all the styles:
This is exactly what I'm trying to do. This is great to keep your styles DRY.
I've extended this further so that the fallback values would automatically be placed by the
cssvar()
mixin. Perhaps others may find this useful, here's my modification:Add this at the top to hold all the styles:
Add this at the start of the
cssvars()
mixin to gather all the styles:Then finally, change the output of the
cssvar()
mixin:Afterwards the
cssvar()
mixin would automatically add the fallback value, you'll get this:holy shit thats awesome, thanks!
That's exactly what I thought. Great article as well as good comment. Thanks both!