For example in the following from sass. Is the = just a shorthand for @mixin? I can't seem to find any info for this on google
=multi-line-button($base-color)
+background-clip('padding-box')
border-width: 1px
+border-radius(6px)
border-style: solid
color: white
display: block
margin: 0.2em auto
padding: 12px 15px
text-align: center
text-decoration: none
yes, this is the way to define mixins in Sass
dunno if this article will help at all
EDIT:
The following are identical
@mixin red-text
color: #ff0000
=red-text
color: #ff0000
Just add +red-text
to your selectors
"@mixin foobar" is the newer SCSS syntax (more CSS-like) and "=foobar" is the older SASS syntax (more HAML-like). I'm fairly new to SASS and started with SCSS, but both are supported (probably not in the same stylesheet) and both will continue to be supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With