-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from okj579/maps
Maps
- Loading branch information
Showing
7 changed files
with
192 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$map: ( | ||
color: black, | ||
color2: red, | ||
color3: #00FF00 | ||
); | ||
$map2: ( | ||
color: rgb(255, 255, 255), | ||
length: 40em | ||
); | ||
|
||
// Map functions | ||
div { | ||
color: map_get($map, color); | ||
color: map_get($map, 'color#{2}'); | ||
foo: map_values($map); | ||
bar: map_keys($map2); | ||
baz: map_merge($map, $map2); | ||
foo: map_remove($map2, color); | ||
bar: if(map_has_key($map, color), true, false); | ||
} | ||
|
||
// List functions | ||
div { | ||
foo: nth($map, 1); | ||
bar: nth(nth($map, 1), 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
div { | ||
color: black; | ||
color: red; | ||
foo: black, red, #0f0; | ||
bar: color, length; | ||
baz: (color: #fff, color2: red, color3: #0f0, length: 40em); | ||
foo: (length: 40em); | ||
bar: true; } | ||
|
||
div { | ||
foo: color black; | ||
bar: color; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters