Last active
July 19, 2017 12:17
-
-
Save davidkpiano/dd98f80f75b7f9eff1c1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
$__property-append-map__: () !global; | |
@mixin \+($property, $value: null) { | |
$selector: selector-parse(&); | |
@if not map-has-key($__property-append-map__, $selector) { | |
$__property-append-map__: map-merge($__property-append-map__, ($selector: ())) !global; | |
} | |
$selector-property: get(get($__property-append-map__, $selector), $property); | |
@if $property == null { | |
$__property-append-map__: map-merge($__property-append-map__, ($selector: ($property: ($value,)))) | |
} | |
$property-list: map-get($__property-append-map__, $selector); | |
$__property-append-map__: map-merge($__property-append-map__, ($selector: append($property-list, unquote($value), comma))) !global; | |
} | |
@function \+($property) { | |
$property-list: map-get($__property-append-map__, selector-parse(&)); | |
@return $property-list; | |
} | |
.foo { | |
@include \+(animation-name, foo-active-1); | |
@include \+(animation-name, foo-active-2); | |
animation-name: \+(animation-name); | |
} | |
.bar { | |
@include \+(transition-property, opacity); | |
@include \+(transition-property, transform); | |
transition-property: \+(transition-property); | |
} |
This file contains hidden or 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
(((.foo,)): ()) isn't a valid CSS value. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment