Update sass.md (#710)

* Update sass.md

Make `Mixin Properties` a subpart of `Mixins`, so that they are displayed next to each other, since they are a logical unit.
Add section about default values and default variables for mixins.

* Update sass.md according to comments in #710
This commit is contained in:
Hannes Leutloff 2018-11-16 20:28:11 +01:00 committed by chad d
parent ea1fff2e40
commit 41c619d50d
1 changed files with 34 additions and 1 deletions

35
sass.md
View File

@ -66,7 +66,7 @@ h1 {
} }
``` ```
### Mixin properties #### with parameters
```scss ```scss
@mixin font-size($n) { @mixin font-size($n) {
@ -80,6 +80,39 @@ body {
} }
``` ```
#### with default values
```scss
@mixin pad($n: 10px) {
padding: $n;
}
```
```scss
body {
@include pad(15px);
}
```
#### with a default variable
```scss
// Set a default value
$default-padding: 10px;
```
```scss
@mixin pad($n: $default-padding) {
padding: $n;
}
```
```scss
body {
@include pad(15px);
}
```
### Extend ### Extend
```scss ```scss