Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In sass what does the = mean

Tags:

css

sass

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
like image 231
Fendo Avatar asked May 10 '11 10:05

Fendo


2 Answers

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

like image 103
stephenmurdoch Avatar answered Oct 06 '22 00:10

stephenmurdoch


"@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.

like image 42
Rocketpilot Avatar answered Oct 05 '22 23:10

Rocketpilot