-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
See sass/sass#3886. The proposal as currently written involves removing Sass's if() function and syntax and adding a sass() condition to the plain-CSS if() syntax instead. A migrator for this would encompass two changes:
-
Converting direct calls to the Sass
if()function into calls to the plain-CSSif(). For example,if( map.has-key($tokens, $token), map.get($tokens, $token), $fallback )
would become
if( sass(map.has-key($tokens, $token)): map.get($tokens, $token); else: $fallback; )
For the special case where the
elsebranch returnsnull, it can be omitted entirely. -
Converting references to
ifas a first-class function to references to a new custom function. For example,$if: meta.get-function("if");
would become:
@function -if($condition, $if-true, $if-false) { @return if(sass($condition): $if-true; else: $if-false); }
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request