Last active
April 18, 2016 10:11
-
-
Save elrumordelaluz/5ae285dc46da7af1ab88f3fed53118bd to your computer and use it in GitHub Desktop.
Alternatives for @apply proposal
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
@define --my-theme { | |
color: var(--main-color, #bada55); | |
font-size: 1em; | |
/* ... */ | |
}; | |
.hero { | |
apply: var(--my-theme); | |
width: 100vw; | |
/* ... */ | |
} |
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
@charset <string>; | |
@import [ <string> | <url> ] [<media-query-list>]?; | |
@namespace <namespace-prefix>? [ <string> | <uri> ]; /* where <namespace-prefix> = IDENT */ | |
@media <media-query-list> { | |
<group-rule-body> | |
} | |
@supports <supports-condition> { | |
<group-rule-body> | |
} | |
@keyframes <identifier> { | |
[ [ from | to | <percentage> ] [, from | to | <percentage> ]* block ]* | |
} | |
@font-face { | |
[ font-family: <family-name>; ] || | |
[ src: [ <uri> [format(<string>#)]? | <font-face-name> ]#; ] || | |
[ unicode-range: <urange>#; ] || | |
[ font-variant: <font-variant>; ] || | |
[ font-feature-settings: normal | <feature-tag-value>#; ] || | |
[ font-stretch: <font-stretch>; ] || | |
[ font-weight: <weight>; ] || | |
[ font-style: <style>; ] | |
} /* where <family-name> = <string> | <IDENT>+ | |
<feature-tag-value> = <string> [ <integer> | on | off ]? */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don´t like your "apply"
Tha´s as if you´ld be using a "custom property", not a "custom at rule.
Maybe better use the @ inside var();