Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties #45

Merged
merged 6 commits into from
May 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
document
  • Loading branch information
Kevin Garcia committed Apr 24, 2017
commit d16c21660b0564697235289d8fd6dab1b7e567b8
7 changes: 7 additions & 0 deletions core/utilities/mixins/__nested-properties.scss
Original file line number Diff line number Diff line change
@@ -16,17 +16,24 @@
/// @access private

@mixin _nested-properties($_property, $_value) {
// Checks for nested maps
@if type-of($_value) == map {
// Uses map key as element selector
#{$_property} {
// Iterates over property:value pairs
@each $_nested-property, $_nested-value in $_value {
// Recursive check for nested maps
@if type-of($_nested-value) == map {
// If nested map, call self and restart loop
@include _nested-properties($_nested-property, $_nested-value);
} @else {
// Outputs property:value CSS
#{$_nested-property}: #{$_nested-value};
}
}
}
} @else {
// Outputs property:value CSS
#{$_property}: #{$_value};
}
}