@@ -166,17 +166,6 @@ namespace Sass {
166166 return nullptr ;
167167 }
168168
169- void hsla_alpha_percent_deprecation (const ParserState& pstate, const std::string val)
170- {
171-
172- std::string msg (" Passing a percentage as the alpha value to hsla() will be interpreted" );
173- std::string tail (" differently in future versions of Sass. For now, use " + val + " instead." );
174-
175- deprecated (msg, tail, false , pstate);
176-
177- }
178-
179-
180169 double fuzzyRound (double value) {
181170 return value;
182171 }
@@ -687,76 +676,6 @@ namespace Sass {
687676
688677 }
689678
690- // //////////////
691- // HSL FUNCTIONS
692- // //////////////
693-
694- Signature hsl_sig = " hsl($hue, $saturation, $lightness)" ;
695- BUILT_IN (hsl)
696- {
697- if (
698- isSpecialNumber (env[" $hue" ]) ||
699- isSpecialNumber (env[" $saturation" ]) ||
700- isSpecialNumber (env[" $lightness" ])
701- ) {
702- return SASS_MEMORY_NEW (String_Constant, pstate, " hsl("
703- + env[" $hue" ]->to_string ()
704- + " , "
705- + env[" $saturation" ]->to_string ()
706- + " , "
707- + env[" $lightness" ]->to_string ()
708- + " )"
709- );
710- }
711-
712- return SASS_MEMORY_NEW (Color_HSLA,
713- pstate,
714- ARGVAL (" $hue" ),
715- ARGVAL (" $saturation" ),
716- ARGVAL (" $lightness" ),
717- 1.0 );
718-
719- }
720-
721- Signature hsla_sig = " hsla($hue, $saturation, $lightness, $alpha)" ;
722- BUILT_IN (hsla)
723- {
724- if (
725- isSpecialNumber (env[" $hue" ]) ||
726- isSpecialNumber (env[" $saturation" ]) ||
727- isSpecialNumber (env[" $lightness" ]) ||
728- isSpecialNumber (env[" $alpha" ])
729- ) {
730- return SASS_MEMORY_NEW (String_Constant, pstate, " hsla("
731- + env[" $hue" ]->to_string ()
732- + " , "
733- + env[" $saturation" ]->to_string ()
734- + " , "
735- + env[" $lightness" ]->to_string ()
736- + " , "
737- + env[" $alpha" ]->to_string ()
738- + " )"
739- );
740- }
741-
742- Number* alpha = ARGNUM (" $alpha" );
743- if (alpha && alpha->unit () == " %" ) {
744- Number_Obj val = SASS_MEMORY_COPY (alpha);
745- val->numerators .clear (); // convert
746- val->value (val->value () / 100.0 );
747- std::string nr (val->to_string (ctx.c_options ));
748- hsla_alpha_percent_deprecation (pstate, nr);
749- }
750-
751- return SASS_MEMORY_NEW (Color_HSLA,
752- pstate,
753- ARGVAL (" $hue" ),
754- ARGVAL (" $saturation" ),
755- ARGVAL (" $lightness" ),
756- ARGVAL (" $alpha" ));
757-
758- }
759-
760679 // ///////////////////////////////////////////////////////////////////////
761680 // Query functions
762681 // ///////////////////////////////////////////////////////////////////////
@@ -908,28 +827,6 @@ namespace Sass {
908827 // Opacity functions
909828 // ///////////////////////////////////////////////////////////////////////
910829
911- Signature alpha_ie_sig = " alpha($args...)" ;
912- Signature opacity_ie_sig = " opacity($args...)" ;
913- BUILT_IN (alpha_ie)
914- {
915-
916- List* args = ARGLIST (" $args" );
917-
918- return SASS_MEMORY_NEW (String_Quoted, pstate, " alpha(" + args->to_string (ctx.c_options ) + " )" );
919-
920- String_Constant* ie_kwd = Cast<String_Constant>(env[" $color" ]);
921- if (ie_kwd) {
922- }
923-
924- // CSS3 filter function overload: pass literal through directly
925- Number* amount = Cast<Number>(env[" $color" ]);
926- if (amount) {
927- return SASS_MEMORY_NEW (String_Quoted, pstate, " opacity(" + amount->to_string (ctx.c_options ) + " )" );
928- }
929-
930- return SASS_MEMORY_NEW (Number, pstate, ARGCOL (" $color" )->a ());
931- }
932-
933830 Signature alpha_sig = " alpha($color)" ;
934831 Signature opacity_sig = " opacity($color)" ;
935832 BUILT_IN (alpha)
0 commit comments