From 374829012207bce1cbe6241f5f72420b5ad5eee7 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 12 Nov 2018 14:22:35 -0800 Subject: [PATCH] Add full specs for rgb(), hsl(), rgba(), and hsla() (#1300) Partially addresses #1001 --- Gemfile.lock | 4 +- .../hsl/basic/expected_output-libsass.css | 220 ++++++++++++++++++ .../hsl/basic/expected_output-ruby-sass.css | 205 ++++++++++++++++ .../color/hsl/basic/expected_output.css | 205 ++++++++++++++++ .../core_functions/color/hsl/basic/input.scss | 205 ++++++++++++++++ .../color/hsl/error/five_args/error | 4 + .../color/hsl/error/five_args/error-libsass | 5 + .../color/hsl/error/five_args/error-ruby-sass | 3 + .../error/five_args}/expected_output.css | 0 .../color/hsl/error/five_args/input.scss | 3 + .../alpha_unit => hsl/error/five_args}/status | 0 .../color/hsl/error/hue_type/error | 4 + .../color/hsl/error/hue_type/error-libsass | 6 + .../color/hsl/error/hue_type/error-ruby-sass | 3 + .../error/hue_type}/expected_output.css | 0 .../color/hsl/error/hue_type/input.scss | 3 + .../alpha_unit => hsl/error/hue_type}/status | 0 .../color/hsl/error/lightness_type/error | 4 + .../hsl/error/lightness_type/error-libsass | 6 + .../hsl/error/lightness_type/error-ruby-sass | 3 + .../error/lightness_type/expected_output.css | 0 .../color/hsl/error/lightness_type/input.scss | 3 + .../color/hsl/error/lightness_type/status | 1 + .../color/hsl/error/one_arg/error | 4 + .../color/hsl/error/one_arg/error-libsass | 5 + .../color/hsl/error/one_arg/error-ruby-sass | 3 + .../hsl/error/one_arg/expected_output.css | 0 .../color/hsl/error/one_arg/input.scss | 3 + .../color/hsl/error/one_arg/status | 1 + .../color/hsl/error/saturation_type/error | 4 + .../hsl/error/saturation_type/error-libsass | 6 + .../hsl/error/saturation_type/error-ruby-sass | 3 + .../error/saturation_type/expected_output.css | 0 .../hsl/error/saturation_type/input.scss | 3 + .../color/hsl/error/saturation_type/status | 1 + .../expected_output.css | 0 .../{success => special_functions}/input.scss | 0 .../color/hsla/basic/expected_output.css | 13 ++ .../color/hsla/basic/input.scss | 14 ++ .../color/hsla/error/five_args/error | 4 + .../color/hsla/error/five_args/error-libsass | 5 + .../hsla/error/five_args/error-ruby-sass | 3 + .../hsla/error/five_args/expected_output.css | 0 .../color/hsla/error/five_args/input.scss | 3 + .../color/hsla/error/five_args/status | 1 + .../error/{ => four_args}/alpha_unit/error | 2 +- .../alpha_unit/error-ruby-sass | 0 .../four_args/alpha_unit/expected_output.css | 0 .../{ => four_args}/alpha_unit/input.scss | 0 .../{ => four_args}/alpha_unit/options.yml | 2 +- .../hsla/error/four_args/alpha_unit/status | 1 + .../color/hsla/error/four_args/hue_type/error | 4 + .../error/four_args/hue_type/error-libsass | 6 + .../error/four_args/hue_type/error-ruby-sass | 3 + .../four_args/hue_type/expected_output.css | 0 .../hsla/error/four_args/hue_type/input.scss | 3 + .../hsla/error/four_args/hue_type/status | 1 + .../hsla/error/four_args/lightness_type/error | 4 + .../four_args/lightness_type/error-libsass | 6 + .../four_args/lightness_type/error-ruby-sass | 3 + .../lightness_type/expected_output.css | 0 .../error/four_args/lightness_type/input.scss | 3 + .../error/four_args/lightness_type/status | 1 + .../error/four_args/saturation_type/error | 4 + .../four_args/saturation_type/error-libsass | 6 + .../four_args/saturation_type/error-ruby-sass | 3 + .../saturation_type/expected_output.css | 0 .../four_args/saturation_type/input.scss | 3 + .../error/four_args/saturation_type/status | 1 + .../color/hsla/error/one_arg/error | 4 + .../color/hsla/error/one_arg/error-libsass | 5 + .../color/hsla/error/one_arg/error-ruby-sass | 3 + .../hsla/error/one_arg/expected_output.css | 0 .../color/hsla/error/one_arg/input.scss | 3 + .../color/hsla/error/one_arg/status | 1 + .../color/hsla/error/two_args/error | 4 + .../color/hsla/error/two_args/error-libsass | 4 + .../color/hsla/error/two_args/error-ruby-sass | 3 + .../hsla/error/two_args/expected_output.css | 0 .../color/hsla/error/two_args/input.scss | 3 + .../color/hsla/error/two_args/status | 1 + .../expected_output.css | 0 .../{success => special_functions}/input.scss | 0 .../color/hsla/with_color/error | 4 + .../color/hsla/with_color/error-libsass | 5 + .../color/hsla/with_color/error-ruby-sass | 3 + .../color/hsla/with_color/expected_output.css | 0 .../color/hsla/with_color/input.scss | 27 +++ .../color/hsla/with_color/status | 1 + .../color/rgb/basic/expected_output.css | 23 ++ .../core_functions/color/rgb/basic/input.scss | 30 +++ .../color/rgb/error/blue_type/error | 4 + .../color/rgb/error/blue_type/error-libsass | 6 + .../color/rgb/error/blue_type/error-ruby-sass | 3 + .../rgb/error/blue_type/expected_output.css | 0 .../color/rgb/error/blue_type/input.scss | 3 + .../color/rgb/error/blue_type/status | 1 + .../color/rgb/error/five_args/error | 4 + .../color/rgb/error/five_args/error-libsass | 5 + .../color/rgb/error/five_args/error-ruby-sass | 3 + .../rgb/error/five_args/expected_output.css | 0 .../color/rgb/error/five_args/input.scss | 3 + .../color/rgb/error/five_args/status | 1 + .../color/rgb/error/green_type/error | 4 + .../color/rgb/error/green_type/error-libsass | 6 + .../rgb/error/green_type/error-ruby-sass | 3 + .../rgb/error/green_type/expected_output.css | 0 .../color/rgb/error/green_type/input.scss | 3 + .../color/rgb/error/green_type/status | 1 + .../color/rgb/error/one_arg/error | 4 + .../color/rgb/error/one_arg/error-libsass | 5 + .../color/rgb/error/one_arg/error-ruby-sass | 3 + .../rgb/error/one_arg/expected_output.css | 0 .../color/rgb/error/one_arg/input.scss | 3 + .../color/rgb/error/one_arg/status | 1 + .../color/rgb/error/red_type/error | 4 + .../color/rgb/error/red_type/error-libsass | 6 + .../color/rgb/error/red_type/error-ruby-sass | 3 + .../rgb/error/red_type/expected_output.css | 0 .../color/rgb/error/red_type/input.scss | 3 + .../color/rgb/error/red_type/status | 1 + .../expected_output.css | 0 .../{success => special_functions}/input.scss | 0 .../color/rgba/basic/expected_output.css | 14 ++ .../color/rgba/basic/input.scss | 15 ++ .../color/rgba/error/five_args/error | 4 + .../color/rgba/error/five_args/error-libsass | 5 + .../rgba/error/five_args/error-ruby-sass | 3 + .../rgba/error/five_args/expected_output.css | 0 .../color/rgba/error/five_args/input.scss | 3 + .../color/rgba/error/five_args/status | 1 + .../error/{ => four_args}/alpha_unit/error | 2 +- .../alpha_unit/error-ruby-sass | 0 .../four_args/alpha_unit/expected_output.css | 0 .../{ => four_args}/alpha_unit/input.scss | 0 .../{ => four_args}/alpha_unit/options.yml | 2 +- .../rgba/error/four_args/alpha_unit/status | 1 + .../rgba/error/four_args/blue_type/error | 4 + .../error/four_args/blue_type/error-libsass | 6 + .../error/four_args/blue_type/error-ruby-sass | 3 + .../four_args/blue_type/expected_output.css | 0 .../rgba/error/four_args/blue_type/input.scss | 3 + .../rgba/error/four_args/blue_type/status | 1 + .../rgba/error/four_args/green_type/error | 4 + .../error/four_args/green_type/error-libsass | 6 + .../four_args/green_type/error-ruby-sass | 3 + .../four_args/green_type/expected_output.css | 0 .../error/four_args/green_type/input.scss | 3 + .../rgba/error/four_args/green_type/status | 1 + .../color/rgba/error/four_args/red_type/error | 4 + .../error/four_args/red_type/error-libsass | 6 + .../error/four_args/red_type/error-ruby-sass | 3 + .../four_args/red_type/expected_output.css | 0 .../rgba/error/four_args/red_type/input.scss | 3 + .../rgba/error/four_args/red_type/status | 1 + .../color/rgba/error/one_arg/error | 4 + .../color/rgba/error/one_arg/error-libsass | 5 + .../color/rgba/error/one_arg/error-ruby-sass | 3 + .../rgba/error/one_arg/expected_output.css | 0 .../color/rgba/error/one_arg/input.scss | 3 + .../color/rgba/error/one_arg/status | 1 + .../rgba/error/two_args/alpha_type/error | 4 + .../error/two_args/alpha_type/error-libsass | 6 + .../error/two_args/alpha_type/error-ruby-sass | 3 + .../two_args/alpha_type/expected_output.css | 0 .../rgba/error/two_args/alpha_type/input.scss | 3 + .../rgba/error/two_args/alpha_type/status | 1 + .../rgba/error/two_args/alpha_unit/error | 4 + .../error/two_args/alpha_unit/error-ruby-sass | 3 + .../two_args/alpha_unit/expected_output.css | 0 .../rgba/error/two_args/alpha_unit/input.scss | 3 + .../error/two_args/alpha_unit/options.yml | 4 + .../rgba/error/two_args/alpha_unit/status | 1 + .../rgba/error/two_args/color_type/error | 4 + .../error/two_args/color_type/error-libsass | 6 + .../error/two_args/color_type/error-ruby-sass | 3 + .../two_args/color_type/expected_output.css | 0 .../rgba/error/two_args/color_type/input.scss | 3 + .../rgba/error/two_args/color_type/status | 1 + .../expected_output.css | 0 .../{success => special_functions}/input.scss | 0 .../color/rgba/with_color/expected_output.css | 26 +++ .../color/rgba/with_color/input.scss | 27 +++ 183 files changed, 1439 insertions(+), 6 deletions(-) create mode 100644 spec/core_functions/color/hsl/basic/expected_output-libsass.css create mode 100644 spec/core_functions/color/hsl/basic/expected_output-ruby-sass.css create mode 100644 spec/core_functions/color/hsl/basic/expected_output.css create mode 100644 spec/core_functions/color/hsl/basic/input.scss create mode 100644 spec/core_functions/color/hsl/error/five_args/error create mode 100644 spec/core_functions/color/hsl/error/five_args/error-libsass create mode 100644 spec/core_functions/color/hsl/error/five_args/error-ruby-sass rename spec/core_functions/color/{hsla/error/alpha_unit => hsl/error/five_args}/expected_output.css (100%) create mode 100644 spec/core_functions/color/hsl/error/five_args/input.scss rename spec/core_functions/color/{hsla/error/alpha_unit => hsl/error/five_args}/status (100%) create mode 100644 spec/core_functions/color/hsl/error/hue_type/error create mode 100644 spec/core_functions/color/hsl/error/hue_type/error-libsass create mode 100644 spec/core_functions/color/hsl/error/hue_type/error-ruby-sass rename spec/core_functions/color/{rgba/error/alpha_unit => hsl/error/hue_type}/expected_output.css (100%) create mode 100644 spec/core_functions/color/hsl/error/hue_type/input.scss rename spec/core_functions/color/{rgba/error/alpha_unit => hsl/error/hue_type}/status (100%) create mode 100644 spec/core_functions/color/hsl/error/lightness_type/error create mode 100644 spec/core_functions/color/hsl/error/lightness_type/error-libsass create mode 100644 spec/core_functions/color/hsl/error/lightness_type/error-ruby-sass create mode 100644 spec/core_functions/color/hsl/error/lightness_type/expected_output.css create mode 100644 spec/core_functions/color/hsl/error/lightness_type/input.scss create mode 100644 spec/core_functions/color/hsl/error/lightness_type/status create mode 100644 spec/core_functions/color/hsl/error/one_arg/error create mode 100644 spec/core_functions/color/hsl/error/one_arg/error-libsass create mode 100644 spec/core_functions/color/hsl/error/one_arg/error-ruby-sass create mode 100644 spec/core_functions/color/hsl/error/one_arg/expected_output.css create mode 100644 spec/core_functions/color/hsl/error/one_arg/input.scss create mode 100644 spec/core_functions/color/hsl/error/one_arg/status create mode 100644 spec/core_functions/color/hsl/error/saturation_type/error create mode 100644 spec/core_functions/color/hsl/error/saturation_type/error-libsass create mode 100644 spec/core_functions/color/hsl/error/saturation_type/error-ruby-sass create mode 100644 spec/core_functions/color/hsl/error/saturation_type/expected_output.css create mode 100644 spec/core_functions/color/hsl/error/saturation_type/input.scss create mode 100644 spec/core_functions/color/hsl/error/saturation_type/status rename spec/core_functions/color/hsl/{success => special_functions}/expected_output.css (100%) rename spec/core_functions/color/hsl/{success => special_functions}/input.scss (100%) create mode 100644 spec/core_functions/color/hsla/basic/expected_output.css create mode 100644 spec/core_functions/color/hsla/basic/input.scss create mode 100644 spec/core_functions/color/hsla/error/five_args/error create mode 100644 spec/core_functions/color/hsla/error/five_args/error-libsass create mode 100644 spec/core_functions/color/hsla/error/five_args/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/five_args/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/five_args/input.scss create mode 100644 spec/core_functions/color/hsla/error/five_args/status rename spec/core_functions/color/hsla/error/{ => four_args}/alpha_unit/error (52%) rename spec/core_functions/color/hsla/error/{ => four_args}/alpha_unit/error-ruby-sass (100%) create mode 100644 spec/core_functions/color/hsla/error/four_args/alpha_unit/expected_output.css rename spec/core_functions/color/hsla/error/{ => four_args}/alpha_unit/input.scss (100%) rename spec/core_functions/color/hsla/error/{ => four_args}/alpha_unit/options.yml (52%) create mode 100644 spec/core_functions/color/hsla/error/four_args/alpha_unit/status create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/error create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/error-libsass create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/input.scss create mode 100644 spec/core_functions/color/hsla/error/four_args/hue_type/status create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/error create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/error-libsass create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss create mode 100644 spec/core_functions/color/hsla/error/four_args/lightness_type/status create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/error create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/error-libsass create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss create mode 100644 spec/core_functions/color/hsla/error/four_args/saturation_type/status create mode 100644 spec/core_functions/color/hsla/error/one_arg/error create mode 100644 spec/core_functions/color/hsla/error/one_arg/error-libsass create mode 100644 spec/core_functions/color/hsla/error/one_arg/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/one_arg/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/one_arg/input.scss create mode 100644 spec/core_functions/color/hsla/error/one_arg/status create mode 100644 spec/core_functions/color/hsla/error/two_args/error create mode 100644 spec/core_functions/color/hsla/error/two_args/error-libsass create mode 100644 spec/core_functions/color/hsla/error/two_args/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/error/two_args/expected_output.css create mode 100644 spec/core_functions/color/hsla/error/two_args/input.scss create mode 100644 spec/core_functions/color/hsla/error/two_args/status rename spec/core_functions/color/hsla/{success => special_functions}/expected_output.css (100%) rename spec/core_functions/color/hsla/{success => special_functions}/input.scss (100%) create mode 100644 spec/core_functions/color/hsla/with_color/error create mode 100644 spec/core_functions/color/hsla/with_color/error-libsass create mode 100644 spec/core_functions/color/hsla/with_color/error-ruby-sass create mode 100644 spec/core_functions/color/hsla/with_color/expected_output.css create mode 100644 spec/core_functions/color/hsla/with_color/input.scss create mode 100644 spec/core_functions/color/hsla/with_color/status create mode 100644 spec/core_functions/color/rgb/basic/expected_output.css create mode 100644 spec/core_functions/color/rgb/basic/input.scss create mode 100644 spec/core_functions/color/rgb/error/blue_type/error create mode 100644 spec/core_functions/color/rgb/error/blue_type/error-libsass create mode 100644 spec/core_functions/color/rgb/error/blue_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgb/error/blue_type/expected_output.css create mode 100644 spec/core_functions/color/rgb/error/blue_type/input.scss create mode 100644 spec/core_functions/color/rgb/error/blue_type/status create mode 100644 spec/core_functions/color/rgb/error/five_args/error create mode 100644 spec/core_functions/color/rgb/error/five_args/error-libsass create mode 100644 spec/core_functions/color/rgb/error/five_args/error-ruby-sass create mode 100644 spec/core_functions/color/rgb/error/five_args/expected_output.css create mode 100644 spec/core_functions/color/rgb/error/five_args/input.scss create mode 100644 spec/core_functions/color/rgb/error/five_args/status create mode 100644 spec/core_functions/color/rgb/error/green_type/error create mode 100644 spec/core_functions/color/rgb/error/green_type/error-libsass create mode 100644 spec/core_functions/color/rgb/error/green_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgb/error/green_type/expected_output.css create mode 100644 spec/core_functions/color/rgb/error/green_type/input.scss create mode 100644 spec/core_functions/color/rgb/error/green_type/status create mode 100644 spec/core_functions/color/rgb/error/one_arg/error create mode 100644 spec/core_functions/color/rgb/error/one_arg/error-libsass create mode 100644 spec/core_functions/color/rgb/error/one_arg/error-ruby-sass create mode 100644 spec/core_functions/color/rgb/error/one_arg/expected_output.css create mode 100644 spec/core_functions/color/rgb/error/one_arg/input.scss create mode 100644 spec/core_functions/color/rgb/error/one_arg/status create mode 100644 spec/core_functions/color/rgb/error/red_type/error create mode 100644 spec/core_functions/color/rgb/error/red_type/error-libsass create mode 100644 spec/core_functions/color/rgb/error/red_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgb/error/red_type/expected_output.css create mode 100644 spec/core_functions/color/rgb/error/red_type/input.scss create mode 100644 spec/core_functions/color/rgb/error/red_type/status rename spec/core_functions/color/rgb/{success => special_functions}/expected_output.css (100%) rename spec/core_functions/color/rgb/{success => special_functions}/input.scss (100%) create mode 100644 spec/core_functions/color/rgba/basic/expected_output.css create mode 100644 spec/core_functions/color/rgba/basic/input.scss create mode 100644 spec/core_functions/color/rgba/error/five_args/error create mode 100644 spec/core_functions/color/rgba/error/five_args/error-libsass create mode 100644 spec/core_functions/color/rgba/error/five_args/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/five_args/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/five_args/input.scss create mode 100644 spec/core_functions/color/rgba/error/five_args/status rename spec/core_functions/color/rgba/error/{ => four_args}/alpha_unit/error (52%) rename spec/core_functions/color/rgba/error/{ => four_args}/alpha_unit/error-ruby-sass (100%) create mode 100644 spec/core_functions/color/rgba/error/four_args/alpha_unit/expected_output.css rename spec/core_functions/color/rgba/error/{ => four_args}/alpha_unit/input.scss (100%) rename spec/core_functions/color/rgba/error/{ => four_args}/alpha_unit/options.yml (52%) create mode 100644 spec/core_functions/color/rgba/error/four_args/alpha_unit/status create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/error create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/error-libsass create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/input.scss create mode 100644 spec/core_functions/color/rgba/error/four_args/blue_type/status create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/error create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/error-libsass create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/input.scss create mode 100644 spec/core_functions/color/rgba/error/four_args/green_type/status create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/error create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/error-libsass create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/input.scss create mode 100644 spec/core_functions/color/rgba/error/four_args/red_type/status create mode 100644 spec/core_functions/color/rgba/error/one_arg/error create mode 100644 spec/core_functions/color/rgba/error/one_arg/error-libsass create mode 100644 spec/core_functions/color/rgba/error/one_arg/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/one_arg/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/one_arg/input.scss create mode 100644 spec/core_functions/color/rgba/error/one_arg/status create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/error create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/error-libsass create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_type/status create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/error create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/input.scss create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/options.yml create mode 100644 spec/core_functions/color/rgba/error/two_args/alpha_unit/status create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/error create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/error-libsass create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/error-ruby-sass create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/expected_output.css create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/input.scss create mode 100644 spec/core_functions/color/rgba/error/two_args/color_type/status rename spec/core_functions/color/rgba/{success => special_functions}/expected_output.css (100%) rename spec/core_functions/color/rgba/{success => special_functions}/input.scss (100%) create mode 100644 spec/core_functions/color/rgba/with_color/expected_output.css create mode 100644 spec/core_functions/color/rgba/with_color/input.scss diff --git a/Gemfile.lock b/Gemfile.lock index 067c2a70ae..3dc7ded2e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/sass/ruby-sass.git - revision: 8b77fc88f8bdbc21b44d0a5be7833d91a5edb04c + revision: 4c5c5758cb399abe91490826292fef26a81ffa37 branch: stable specs: - sass (3.5.7) + sass (3.7.1) sass-listen (~> 4.0.0) PATH diff --git a/spec/core_functions/color/hsl/basic/expected_output-libsass.css b/spec/core_functions/color/hsl/basic/expected_output-libsass.css new file mode 100644 index 0000000000..d95475d953 --- /dev/null +++ b/spec/core_functions/color/hsl/basic/expected_output-libsass.css @@ -0,0 +1,220 @@ +hue red { + hue-0: red; + hue--360: red; + hue-260: #5500ff; + hue-6120: red; +} + +hue yellow { + hue-60: yellow; + hue--300: yellow; + hue-420: yellow; + hue--9660: yellow; +} + +hue green { + hue-120: lime; + hue--240: lime; + hue-480: lime; + hue-99840: lime; +} + +hue cyan { + hue-180: cyan; + hue--180: cyan; + hue-540: cyan; + hue--900: cyan; +} + +hue blue { + hue-240: blue; + hue--120: blue; + hue-600: blue; + hue--104880: blue; +} + +hue purple { + hue-300: magenta; + hue--60: magenta; + hue-660: magenta; + hue-2820: magenta; +} + +red-to-green { + step-1: red; + step-2: #ff3300; + step-3: #ff6600; + step-4: #ff9900; + step-5: #ffcc00; + step-6: yellow; + step-7: #ccff00; + step-8: #99ff00; + step-9: #66ff00; + step-10: #33ff00; + step-11: lime; +} + +green-to-blue { + step-1: lime; + step-2: #00ff33; + step-3: #00ff66; + step-4: #00ff99; + step-5: #00ffcc; + step-6: cyan; + step-7: #00ccff; + step-8: #0099ff; + step-9: #0066ff; + step-10: #0033ff; + step-11: blue; +} + +blue-to-red { + step-1: blue; + step-2: #3300ff; + step-3: #6600ff; + step-4: #9900ff; + step-5: #cc00ff; + step-6: magenta; + step-7: #ff00cc; + step-8: #ff0099; + step-9: #ff0066; + step-10: #ff0033; + step-11: red; +} + +gray-to red { + step-1: #996666; + step-2: #cc3333; + step-3: red; +} + +gray-to yellow { + step-1: #999966; + step-2: #cccc33; + step-3: yellow; +} + +gray-to green { + step-1: #669966; + step-2: #33cc33; + step-3: lime; +} + +gray-to cyan { + step-1: #669999; + step-2: #33cccc; + step-3: cyan; +} + +gray-to blue { + step-1: #666699; + step-2: #3333cc; + step-3: blue; +} + +gray-to purple { + step-1: #996699; + step-2: #cc33cc; + step-3: magenta; +} + +black-to-white-through red { + step-1: black; + step-2: #330000; + step-3: #660000; + step-4: #990000; + step-5: #cc0000; + step-6: red; + step-7: #ff3333; + step-8: #ff6666; + step-9: #ff9999; + step-10: #ffcccc; + step-11: white; +} + +black-to-white-through yellow { + step-1: black; + step-2: #333300; + step-3: #666600; + step-4: #999900; + step-5: #cccc00; + step-6: yellow; + step-7: #ffff33; + step-8: #ffff66; + step-9: #ffff99; + step-10: #ffffcc; + step-11: white; +} + +black-to-white-through green { + step-1: black; + step-2: #003300; + step-3: #006600; + step-4: #009900; + step-5: #00cc00; + step-6: lime; + step-7: #33ff33; + step-8: #66ff66; + step-9: #99ff99; + step-10: #ccffcc; + step-11: white; +} + +black-to-white-through cyan { + step-1: black; + step-2: #003333; + step-3: #006666; + step-4: #009999; + step-5: #00cccc; + step-6: cyan; + step-7: #33ffff; + step-8: #66ffff; + step-9: #99ffff; + step-10: #ccffff; + step-11: white; +} + +black-to-white-through blue { + step-1: black; + step-2: #000033; + step-3: #000066; + step-4: #000099; + step-5: #0000cc; + step-6: blue; + step-7: #3333ff; + step-8: #6666ff; + step-9: #9999ff; + step-10: #ccccff; + step-11: white; +} + +black-to-white-through purple { + step-1: black; + step-2: #330033; + step-3: #660066; + step-4: #990099; + step-5: #cc00cc; + step-6: magenta; + step-7: #ff33ff; + step-8: #ff66ff; + step-9: #ff99ff; + step-10: #ffccff; + step-11: white; +} + +clamped { + saturation-above: red; + saturation-below: gray; + lightness-above: white; + lightness-below: black; +} + +units { + hue-deg: red; + saturation-unitless: #bf4040; + lightness-unitless: red; +} + +named { + x: red; +} diff --git a/spec/core_functions/color/hsl/basic/expected_output-ruby-sass.css b/spec/core_functions/color/hsl/basic/expected_output-ruby-sass.css new file mode 100644 index 0000000000..8f121440cd --- /dev/null +++ b/spec/core_functions/color/hsl/basic/expected_output-ruby-sass.css @@ -0,0 +1,205 @@ +hue red { + hue-0: red; + hue--360: red; + hue-260: #5500ff; + hue-6120: red; +} +hue yellow { + hue-60: yellow; + hue--300: yellow; + hue-420: yellow; + hue--9660: yellow; +} +hue green { + hue-120: lime; + hue--240: lime; + hue-480: lime; + hue-99840: lime; +} +hue cyan { + hue-180: cyan; + hue--180: cyan; + hue-540: cyan; + hue--900: cyan; +} +hue blue { + hue-240: blue; + hue--120: blue; + hue-600: blue; + hue--104880: blue; +} +hue purple { + hue-300: magenta; + hue--60: magenta; + hue-660: magenta; + hue-2820: magenta; +} + +red-to-green { + step-1: red; + step-2: #ff3300; + step-3: #ff6600; + step-4: #ff9900; + step-5: #ffcc00; + step-6: yellow; + step-7: #ccff00; + step-8: #99ff00; + step-9: #66ff00; + step-10: #33ff00; + step-11: lime; +} + +green-to-blue { + step-1: lime; + step-2: #00ff33; + step-3: #00ff66; + step-4: #00ff99; + step-5: #00ffcc; + step-6: cyan; + step-7: #00ccff; + step-8: #0099ff; + step-9: #0066ff; + step-10: #0033ff; + step-11: blue; +} + +blue-to-red { + step-1: blue; + step-2: #3300ff; + step-3: #6600ff; + step-4: #9900ff; + step-5: #cc00ff; + step-6: magenta; + step-7: #ff00cc; + step-8: #ff0099; + step-9: #ff0066; + step-10: #ff0033; + step-11: red; +} + +gray-to red { + step-1: #996666; + step-2: #cc3333; + step-3: red; +} +gray-to yellow { + step-1: #999966; + step-2: #cccc33; + step-3: yellow; +} +gray-to green { + step-1: #669966; + step-2: #33cc33; + step-3: lime; +} +gray-to cyan { + step-1: #669999; + step-2: #33cccc; + step-3: cyan; +} +gray-to blue { + step-1: #666699; + step-2: #3333cc; + step-3: blue; +} +gray-to purple { + step-1: #996699; + step-2: #cc33cc; + step-3: magenta; +} + +black-to-white-through red { + step-1: black; + step-2: #330000; + step-3: #660000; + step-4: #990000; + step-5: #cc0000; + step-6: red; + step-7: #ff3333; + step-8: #ff6666; + step-9: #ff9999; + step-10: #ffcccc; + step-11: white; +} +black-to-white-through yellow { + step-1: black; + step-2: #333300; + step-3: #666600; + step-4: #999900; + step-5: #cccc00; + step-6: yellow; + step-7: #ffff33; + step-8: #ffff66; + step-9: #ffff99; + step-10: #ffffcc; + step-11: white; +} +black-to-white-through green { + step-1: black; + step-2: #003300; + step-3: #006600; + step-4: #009900; + step-5: #00cc00; + step-6: lime; + step-7: #33ff33; + step-8: #66ff66; + step-9: #99ff99; + step-10: #ccffcc; + step-11: white; +} +black-to-white-through cyan { + step-1: black; + step-2: #003333; + step-3: #006666; + step-4: #009999; + step-5: #00cccc; + step-6: cyan; + step-7: #33ffff; + step-8: #66ffff; + step-9: #99ffff; + step-10: #ccffff; + step-11: white; +} +black-to-white-through blue { + step-1: black; + step-2: #000033; + step-3: #000066; + step-4: #000099; + step-5: #0000cc; + step-6: blue; + step-7: #3333ff; + step-8: #6666ff; + step-9: #9999ff; + step-10: #ccccff; + step-11: white; +} +black-to-white-through purple { + step-1: black; + step-2: #330033; + step-3: #660066; + step-4: #990099; + step-5: #cc00cc; + step-6: magenta; + step-7: #ff33ff; + step-8: #ff66ff; + step-9: #ff99ff; + step-10: #ffccff; + step-11: white; +} + +clamped { + saturation-above: red; + saturation-below: gray; + lightness-above: white; + lightness-below: black; +} + +units { + hue-deg: red; + saturation-unitless: #bf4040; + lightness-unitless: red; +} + +named { + x: red; +} diff --git a/spec/core_functions/color/hsl/basic/expected_output.css b/spec/core_functions/color/hsl/basic/expected_output.css new file mode 100644 index 0000000000..8337a9ae14 --- /dev/null +++ b/spec/core_functions/color/hsl/basic/expected_output.css @@ -0,0 +1,205 @@ +hue red { + hue-0: red; + hue--360: red; + hue-260: #5500ff; + hue-6120: red; +} +hue yellow { + hue-60: yellow; + hue--300: yellow; + hue-420: yellow; + hue--9660: yellow; +} +hue green { + hue-120: lime; + hue--240: lime; + hue-480: lime; + hue-99840: lime; +} +hue cyan { + hue-180: aqua; + hue--180: aqua; + hue-540: aqua; + hue--900: aqua; +} +hue blue { + hue-240: blue; + hue--120: blue; + hue-600: blue; + hue--104880: blue; +} +hue purple { + hue-300: fuchsia; + hue--60: fuchsia; + hue-660: fuchsia; + hue-2820: fuchsia; +} + +red-to-green { + step-1: red; + step-2: #ff3300; + step-3: #ff6600; + step-4: #ff9900; + step-5: #ffcc00; + step-6: yellow; + step-7: #ccff00; + step-8: #99ff00; + step-9: #66ff00; + step-10: #33ff00; + step-11: lime; +} + +green-to-blue { + step-1: lime; + step-2: #00ff33; + step-3: #00ff66; + step-4: #00ff99; + step-5: #00ffcc; + step-6: aqua; + step-7: #00ccff; + step-8: #0099ff; + step-9: #0066ff; + step-10: #0033ff; + step-11: blue; +} + +blue-to-red { + step-1: blue; + step-2: #3300ff; + step-3: #6600ff; + step-4: #9900ff; + step-5: #cc00ff; + step-6: fuchsia; + step-7: #ff00cc; + step-8: #ff0099; + step-9: #ff0066; + step-10: #ff0033; + step-11: red; +} + +gray-to red { + step-1: #996666; + step-2: #cc3333; + step-3: red; +} +gray-to yellow { + step-1: #999966; + step-2: #cccc33; + step-3: yellow; +} +gray-to green { + step-1: #669966; + step-2: #33cc33; + step-3: lime; +} +gray-to cyan { + step-1: #669999; + step-2: #33cccc; + step-3: aqua; +} +gray-to blue { + step-1: #666699; + step-2: #3333cc; + step-3: blue; +} +gray-to purple { + step-1: #996699; + step-2: #cc33cc; + step-3: fuchsia; +} + +black-to-white-through red { + step-1: black; + step-2: #330000; + step-3: #660000; + step-4: #990000; + step-5: #cc0000; + step-6: red; + step-7: #ff3333; + step-8: #ff6666; + step-9: #ff9999; + step-10: #ffcccc; + step-11: white; +} +black-to-white-through yellow { + step-1: black; + step-2: #333300; + step-3: #666600; + step-4: #999900; + step-5: #cccc00; + step-6: yellow; + step-7: #ffff33; + step-8: #ffff66; + step-9: #ffff99; + step-10: #ffffcc; + step-11: white; +} +black-to-white-through green { + step-1: black; + step-2: #003300; + step-3: #006600; + step-4: #009900; + step-5: #00cc00; + step-6: lime; + step-7: #33ff33; + step-8: #66ff66; + step-9: #99ff99; + step-10: #ccffcc; + step-11: white; +} +black-to-white-through cyan { + step-1: black; + step-2: #003333; + step-3: #006666; + step-4: #009999; + step-5: #00cccc; + step-6: aqua; + step-7: #33ffff; + step-8: #66ffff; + step-9: #99ffff; + step-10: #ccffff; + step-11: white; +} +black-to-white-through blue { + step-1: black; + step-2: #000033; + step-3: #000066; + step-4: #000099; + step-5: #0000cc; + step-6: blue; + step-7: #3333ff; + step-8: #6666ff; + step-9: #9999ff; + step-10: #ccccff; + step-11: white; +} +black-to-white-through purple { + step-1: black; + step-2: #330033; + step-3: #660066; + step-4: #990099; + step-5: #cc00cc; + step-6: fuchsia; + step-7: #ff33ff; + step-8: #ff66ff; + step-9: #ff99ff; + step-10: #ffccff; + step-11: white; +} + +clamped { + saturation-above: red; + saturation-below: gray; + lightness-above: white; + lightness-below: black; +} + +units { + hue-deg: red; + saturation-unitless: #bf4040; + lightness-unitless: red; +} + +named { + x: red; +} diff --git a/spec/core_functions/color/hsl/basic/input.scss b/spec/core_functions/color/hsl/basic/input.scss new file mode 100644 index 0000000000..632642e6ab --- /dev/null +++ b/spec/core_functions/color/hsl/basic/input.scss @@ -0,0 +1,205 @@ +// These test cases come from two official W3C test suites: +// +// * https://www.w3.org/Style/CSS/Test/CSS3/Color/20070927/html4/t040204-hsl-h-rotating-b.htm +// * https://www.w3.org/Style/CSS/Test/CSS3/Color/current/html4/t040204-hsl-values-b.htm + +hue { + @mixin test-hues($name, $hues...) { + #{$name} { + @each $hue in $hues { + hue-#{$hue}: hsl($hue, 100%, 50%); + } + } + } + + @include test-hues("red", 0, -360, 260, 6120); + @include test-hues("yellow", 60, -300, 420, -9660); + @include test-hues("green", 120, -240, 480, 99840); + @include test-hues("cyan", 180, -180, 540, -900); + @include test-hues("blue", 240, -120, 600, -104880); + @include test-hues("purple", 300, -60, 660, 2820); +} + +red-to-green { + step-1: hsl(0, 100%, 50%); + step-2: hsl(12, 100%, 50%); + step-3: hsl(24, 100%, 50%); + step-4: hsl(36, 100%, 50%); + step-5: hsl(48, 100%, 50%); + step-6: hsl(60, 100%, 50%); + step-7: hsl(72, 100%, 50%); + step-8: hsl(84, 100%, 50%); + step-9: hsl(96, 100%, 50%); + step-10: hsl(108, 100%, 50%); + step-11: hsl(120, 100%, 50%); +} + +green-to-blue { + step-1: hsl(120, 100%, 50%); + step-2: hsl(132, 100%, 50%); + step-3: hsl(144, 100%, 50%); + step-4: hsl(156, 100%, 50%); + step-5: hsl(168, 100%, 50%); + step-6: hsl(180, 100%, 50%); + step-7: hsl(192, 100%, 50%); + step-8: hsl(204, 100%, 50%); + step-9: hsl(216, 100%, 50%); + step-10: hsl(228, 100%, 50%); + step-11: hsl(240, 100%, 50%); +} + +blue-to-red { + step-1: hsl(240, 100%, 50%); + step-2: hsl(252, 100%, 50%); + step-3: hsl(264, 100%, 50%); + step-4: hsl(276, 100%, 50%); + step-5: hsl(288, 100%, 50%); + step-6: hsl(300, 100%, 50%); + step-7: hsl(312, 100%, 50%); + step-8: hsl(324, 100%, 50%); + step-9: hsl(336, 100%, 50%); + step-10: hsl(348, 100%, 50%); + step-11: hsl(360, 100%, 50%); +} + +gray-to { + red { + step-1: hsl(0, 20%, 50%); + step-2: hsl(0, 60%, 50%); + step-3: hsl(0, 100%, 50%); + } + + yellow { + step-1: hsl(60, 20%, 50%); + step-2: hsl(60, 60%, 50%); + step-3: hsl(60, 100%, 50%); + } + + green { + step-1: hsl(120, 20%, 50%); + step-2: hsl(120, 60%, 50%); + step-3: hsl(120, 100%, 50%); + } + + cyan { + step-1: hsl(180, 20%, 50%); + step-2: hsl(180, 60%, 50%); + step-3: hsl(180, 100%, 50%); + } + + blue { + step-1: hsl(240, 20%, 50%); + step-2: hsl(240, 60%, 50%); + step-3: hsl(240, 100%, 50%); + } + + purple { + step-1: hsl(300, 20%, 50%); + step-2: hsl(300, 60%, 50%); + step-3: hsl(300, 100%, 50%); + } +} + +black-to-white-through { + red { + step-1: hsl(0, 100%, 0%); + step-2: hsl(0, 100%, 10%); + step-3: hsl(0, 100%, 20%); + step-4: hsl(0, 100%, 30%); + step-5: hsl(0, 100%, 40%); + step-6: hsl(0, 100%, 50%); + step-7: hsl(0, 100%, 60%); + step-8: hsl(0, 100%, 70%); + step-9: hsl(0, 100%, 80%); + step-10: hsl(0, 100%, 90%); + step-11: hsl(0, 100%, 100%); + } + + yellow { + step-1: hsl(60, 100%, 0%); + step-2: hsl(60, 100%, 10%); + step-3: hsl(60, 100%, 20%); + step-4: hsl(60, 100%, 30%); + step-5: hsl(60, 100%, 40%); + step-6: hsl(60, 100%, 50%); + step-7: hsl(60, 100%, 60%); + step-8: hsl(60, 100%, 70%); + step-9: hsl(60, 100%, 80%); + step-10: hsl(60, 100%, 90%); + step-11: hsl(60, 100%, 100%); + } + + green { + step-1: hsl(120, 100%, 0%); + step-2: hsl(120, 100%, 10%); + step-3: hsl(120, 100%, 20%); + step-4: hsl(120, 100%, 30%); + step-5: hsl(120, 100%, 40%); + step-6: hsl(120, 100%, 50%); + step-7: hsl(120, 100%, 60%); + step-8: hsl(120, 100%, 70%); + step-9: hsl(120, 100%, 80%); + step-10: hsl(120, 100%, 90%); + step-11: hsl(120, 100%, 100%); + } + + cyan { + step-1: hsl(180, 100%, 0%); + step-2: hsl(180, 100%, 10%); + step-3: hsl(180, 100%, 20%); + step-4: hsl(180, 100%, 30%); + step-5: hsl(180, 100%, 40%); + step-6: hsl(180, 100%, 50%); + step-7: hsl(180, 100%, 60%); + step-8: hsl(180, 100%, 70%); + step-9: hsl(180, 100%, 80%); + step-10: hsl(180, 100%, 90%); + step-11: hsl(180, 100%, 100%); + } + + blue { + step-1: hsl(240, 100%, 0%); + step-2: hsl(240, 100%, 10%); + step-3: hsl(240, 100%, 20%); + step-4: hsl(240, 100%, 30%); + step-5: hsl(240, 100%, 40%); + step-6: hsl(240, 100%, 50%); + step-7: hsl(240, 100%, 60%); + step-8: hsl(240, 100%, 70%); + step-9: hsl(240, 100%, 80%); + step-10: hsl(240, 100%, 90%); + step-11: hsl(240, 100%, 100%); + } + + purple { + step-1: hsl(300, 100%, 0%); + step-2: hsl(300, 100%, 10%); + step-3: hsl(300, 100%, 20%); + step-4: hsl(300, 100%, 30%); + step-5: hsl(300, 100%, 40%); + step-6: hsl(300, 100%, 50%); + step-7: hsl(300, 100%, 60%); + step-8: hsl(300, 100%, 70%); + step-9: hsl(300, 100%, 80%); + step-10: hsl(300, 100%, 90%); + step-11: hsl(300, 100%, 100%); + } +} + +// The W3C tests cover clamped hue, but not clamped saturation or lightness. +clamped { + saturation-above: hsl(0, 500%, 50%); + saturation-below: hsl(0, -100%, 50%); + lightness-above: hsl(0, 100%, 500%); + lightness-below: hsl(0, 100%, -100%); +} + +units { + hue-deg: hsl(0deg, 100%, 50%); + saturation-unitless: hsl(0, 50, 50%); + lightness-unitless: hsl(0, 100%, 50); +} + +named { + x: hsl($hue: 0, $saturation: 100%, $lightness: 50%); +} diff --git a/spec/core_functions/color/hsl/error/five_args/error b/spec/core_functions/color/hsl/error/five_args/error new file mode 100644 index 0000000000..601261dc40 --- /dev/null +++ b/spec/core_functions/color/hsl/error/five_args/error @@ -0,0 +1,4 @@ +Error: Only 1 argument allowed, but 5 were passed. + x: hsl(0, 100%, 50%, 0.5, 0); + ^^^^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsl/error/five_args/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsl/error/five_args/error-libsass b/spec/core_functions/color/hsl/error/five_args/error-libsass new file mode 100644 index 0000000000..b8c2516c85 --- /dev/null +++ b/spec/core_functions/color/hsl/error/five_args/error-libsass @@ -0,0 +1,5 @@ +Error: wrong number of arguments (5 for 3) for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/five_args/input.scss +>> x: hsl(0, 100%, 50%, 0.5, 0); + + -----^ diff --git a/spec/core_functions/color/hsl/error/five_args/error-ruby-sass b/spec/core_functions/color/hsl/error/five_args/error-ruby-sass new file mode 100644 index 0000000000..74465c3bfb --- /dev/null +++ b/spec/core_functions/color/hsl/error/five_args/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (given 5, expected 1..3) for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/five_args/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/alpha_unit/expected_output.css b/spec/core_functions/color/hsl/error/five_args/expected_output.css similarity index 100% rename from spec/core_functions/color/hsla/error/alpha_unit/expected_output.css rename to spec/core_functions/color/hsl/error/five_args/expected_output.css diff --git a/spec/core_functions/color/hsl/error/five_args/input.scss b/spec/core_functions/color/hsl/error/five_args/input.scss new file mode 100644 index 0000000000..51995c94ae --- /dev/null +++ b/spec/core_functions/color/hsl/error/five_args/input.scss @@ -0,0 +1,3 @@ +five-arg { + x: hsl(0, 100%, 50%, 0.5, 0); +} diff --git a/spec/core_functions/color/hsla/error/alpha_unit/status b/spec/core_functions/color/hsl/error/five_args/status similarity index 100% rename from spec/core_functions/color/hsla/error/alpha_unit/status rename to spec/core_functions/color/hsl/error/five_args/status diff --git a/spec/core_functions/color/hsl/error/hue_type/error b/spec/core_functions/color/hsl/error/hue_type/error new file mode 100644 index 0000000000..6cb6ef60e0 --- /dev/null +++ b/spec/core_functions/color/hsl/error/hue_type/error @@ -0,0 +1,4 @@ +Error: $hue: "foo" is not a number. + x: hsl("foo", 100%, 50%); + ^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsl/error/hue_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsl/error/hue_type/error-libsass b/spec/core_functions/color/hsl/error/hue_type/error-libsass new file mode 100644 index 0000000000..0082816d6e --- /dev/null +++ b/spec/core_functions/color/hsl/error/hue_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$hue` of `hsl($hue, $saturation, $lightness)` must be a number + on line 2 of /sass/spec/core_functions/color/hsl/error/hue_type/input.scss, in function `hsl` + from line 2 of /sass/spec/core_functions/color/hsl/error/hue_type/input.scss +>> x: hsl("foo", 100%, 50%); + + -----^ diff --git a/spec/core_functions/color/hsl/error/hue_type/error-ruby-sass b/spec/core_functions/color/hsl/error/hue_type/error-ruby-sass new file mode 100644 index 0000000000..5406f350b5 --- /dev/null +++ b/spec/core_functions/color/hsl/error/hue_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $hue: "foo" is not a number for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/hue_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/alpha_unit/expected_output.css b/spec/core_functions/color/hsl/error/hue_type/expected_output.css similarity index 100% rename from spec/core_functions/color/rgba/error/alpha_unit/expected_output.css rename to spec/core_functions/color/hsl/error/hue_type/expected_output.css diff --git a/spec/core_functions/color/hsl/error/hue_type/input.scss b/spec/core_functions/color/hsl/error/hue_type/input.scss new file mode 100644 index 0000000000..ff51424825 --- /dev/null +++ b/spec/core_functions/color/hsl/error/hue_type/input.scss @@ -0,0 +1,3 @@ +hue-type { + x: hsl("foo", 100%, 50%); +} diff --git a/spec/core_functions/color/rgba/error/alpha_unit/status b/spec/core_functions/color/hsl/error/hue_type/status similarity index 100% rename from spec/core_functions/color/rgba/error/alpha_unit/status rename to spec/core_functions/color/hsl/error/hue_type/status diff --git a/spec/core_functions/color/hsl/error/lightness_type/error b/spec/core_functions/color/hsl/error/lightness_type/error new file mode 100644 index 0000000000..5cd41c0320 --- /dev/null +++ b/spec/core_functions/color/hsl/error/lightness_type/error @@ -0,0 +1,4 @@ +Error: $lightness: "foo" is not a number. + x: hsl(0, 100%, "foo"); + ^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsl/error/lightness_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsl/error/lightness_type/error-libsass b/spec/core_functions/color/hsl/error/lightness_type/error-libsass new file mode 100644 index 0000000000..788c1b44d7 --- /dev/null +++ b/spec/core_functions/color/hsl/error/lightness_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$lightness` of `hsl($hue, $saturation, $lightness)` must be a number + on line 2 of /sass/spec/core_functions/color/hsl/error/lightness_type/input.scss, in function `hsl` + from line 2 of /sass/spec/core_functions/color/hsl/error/lightness_type/input.scss +>> x: hsl(0, 100%, "foo"); + + -----^ diff --git a/spec/core_functions/color/hsl/error/lightness_type/error-ruby-sass b/spec/core_functions/color/hsl/error/lightness_type/error-ruby-sass new file mode 100644 index 0000000000..139ba6a091 --- /dev/null +++ b/spec/core_functions/color/hsl/error/lightness_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $lightness: "foo" is not a number for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/lightness_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsl/error/lightness_type/expected_output.css b/spec/core_functions/color/hsl/error/lightness_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsl/error/lightness_type/input.scss b/spec/core_functions/color/hsl/error/lightness_type/input.scss new file mode 100644 index 0000000000..bb04eaa91c --- /dev/null +++ b/spec/core_functions/color/hsl/error/lightness_type/input.scss @@ -0,0 +1,3 @@ +lightness-type { + x: hsl(0, 100%, "foo"); +} diff --git a/spec/core_functions/color/hsl/error/lightness_type/status b/spec/core_functions/color/hsl/error/lightness_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsl/error/lightness_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsl/error/one_arg/error b/spec/core_functions/color/hsl/error/one_arg/error new file mode 100644 index 0000000000..2f9bc2236a --- /dev/null +++ b/spec/core_functions/color/hsl/error/one_arg/error @@ -0,0 +1,4 @@ +Error: Missing argument $saturation. + x: hsl(0); + ^^^^^^ + /sass/spec/core_functions/color/hsl/error/one_arg/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsl/error/one_arg/error-libsass b/spec/core_functions/color/hsl/error/one_arg/error-libsass new file mode 100644 index 0000000000..5254f80d16 --- /dev/null +++ b/spec/core_functions/color/hsl/error/one_arg/error-libsass @@ -0,0 +1,5 @@ +Error: Function hsl is missing argument $saturation. + on line 2 of /sass/spec/core_functions/color/hsl/error/one_arg/input.scss +>> x: hsl(0); + + -----^ diff --git a/spec/core_functions/color/hsl/error/one_arg/error-ruby-sass b/spec/core_functions/color/hsl/error/one_arg/error-ruby-sass new file mode 100644 index 0000000000..e4626239aa --- /dev/null +++ b/spec/core_functions/color/hsl/error/one_arg/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (1 for 3) for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/one_arg/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsl/error/one_arg/expected_output.css b/spec/core_functions/color/hsl/error/one_arg/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsl/error/one_arg/input.scss b/spec/core_functions/color/hsl/error/one_arg/input.scss new file mode 100644 index 0000000000..70d7b06954 --- /dev/null +++ b/spec/core_functions/color/hsl/error/one_arg/input.scss @@ -0,0 +1,3 @@ +one-arg { + x: hsl(0); +} diff --git a/spec/core_functions/color/hsl/error/one_arg/status b/spec/core_functions/color/hsl/error/one_arg/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsl/error/one_arg/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsl/error/saturation_type/error b/spec/core_functions/color/hsl/error/saturation_type/error new file mode 100644 index 0000000000..2ace39477f --- /dev/null +++ b/spec/core_functions/color/hsl/error/saturation_type/error @@ -0,0 +1,4 @@ +Error: $saturation: "foo" is not a number. + x: hsl(0, "foo", 50%); + ^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsl/error/saturation_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsl/error/saturation_type/error-libsass b/spec/core_functions/color/hsl/error/saturation_type/error-libsass new file mode 100644 index 0000000000..db90fa5ae2 --- /dev/null +++ b/spec/core_functions/color/hsl/error/saturation_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$saturation` of `hsl($hue, $saturation, $lightness)` must be a number + on line 2 of /sass/spec/core_functions/color/hsl/error/saturation_type/input.scss, in function `hsl` + from line 2 of /sass/spec/core_functions/color/hsl/error/saturation_type/input.scss +>> x: hsl(0, "foo", 50%); + + -----^ diff --git a/spec/core_functions/color/hsl/error/saturation_type/error-ruby-sass b/spec/core_functions/color/hsl/error/saturation_type/error-ruby-sass new file mode 100644 index 0000000000..a6722d3749 --- /dev/null +++ b/spec/core_functions/color/hsl/error/saturation_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $saturation: "foo" is not a number for `hsl' + on line 2 of /sass/spec/core_functions/color/hsl/error/saturation_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsl/error/saturation_type/expected_output.css b/spec/core_functions/color/hsl/error/saturation_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsl/error/saturation_type/input.scss b/spec/core_functions/color/hsl/error/saturation_type/input.scss new file mode 100644 index 0000000000..6e6f191d74 --- /dev/null +++ b/spec/core_functions/color/hsl/error/saturation_type/input.scss @@ -0,0 +1,3 @@ +saturation-type { + x: hsl(0, "foo", 50%); +} diff --git a/spec/core_functions/color/hsl/error/saturation_type/status b/spec/core_functions/color/hsl/error/saturation_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsl/error/saturation_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsl/success/expected_output.css b/spec/core_functions/color/hsl/special_functions/expected_output.css similarity index 100% rename from spec/core_functions/color/hsl/success/expected_output.css rename to spec/core_functions/color/hsl/special_functions/expected_output.css diff --git a/spec/core_functions/color/hsl/success/input.scss b/spec/core_functions/color/hsl/special_functions/input.scss similarity index 100% rename from spec/core_functions/color/hsl/success/input.scss rename to spec/core_functions/color/hsl/special_functions/input.scss diff --git a/spec/core_functions/color/hsla/basic/expected_output.css b/spec/core_functions/color/hsla/basic/expected_output.css new file mode 100644 index 0000000000..46d04b79dd --- /dev/null +++ b/spec/core_functions/color/hsla/basic/expected_output.css @@ -0,0 +1,13 @@ +basic { + transparent: rgba(51, 204, 204, 0); + opaque: #33cccc; + partial: rgba(51, 204, 204, 0.5); + named: rgba(51, 204, 204, 0.4); +} + +clamped { + saturation: rgba(128, 128, 128, 0.5); + blue: rgba(255, 255, 255, 0.5); + alpha-above: red; + alpha-below: rgba(0, 255, 128, 0); +} diff --git a/spec/core_functions/color/hsla/basic/input.scss b/spec/core_functions/color/hsla/basic/input.scss new file mode 100644 index 0000000000..3d7562c5d2 --- /dev/null +++ b/spec/core_functions/color/hsla/basic/input.scss @@ -0,0 +1,14 @@ +basic { + transparent: hsla(180, 60%, 50%, 0); + opaque: hsla(180, 60%, 50%, 1); + partial: hsla(180, 60%, 50%, 0.5); + named: hsla($hue: 180, $saturation: 60%, $lightness: 50%, $alpha: 0.4); +} + +// Channels that are out of bounds are clamped within bounds. +clamped { + saturation: hsla(0, -0.1%, 50%, 0.5); + blue: hsla(0, 100%, 9999%, 0.5); + alpha-above: hsla(0, 100%, 50%, 1.1); + alpha-below: rgba(0, 100%, 50%, -0.1); +} diff --git a/spec/core_functions/color/hsla/error/five_args/error b/spec/core_functions/color/hsla/error/five_args/error new file mode 100644 index 0000000000..cdb4009352 --- /dev/null +++ b/spec/core_functions/color/hsla/error/five_args/error @@ -0,0 +1,4 @@ +Error: Only 1 argument allowed, but 5 were passed. + x: hsla(0, 100%, 50%, 0.5, 0); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/error/five_args/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/five_args/error-libsass b/spec/core_functions/color/hsla/error/five_args/error-libsass new file mode 100644 index 0000000000..59b8eb7165 --- /dev/null +++ b/spec/core_functions/color/hsla/error/five_args/error-libsass @@ -0,0 +1,5 @@ +Error: wrong number of arguments (5 for 4) for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/five_args/input.scss +>> x: hsla(0, 100%, 50%, 0.5, 0); + + -----^ diff --git a/spec/core_functions/color/hsla/error/five_args/error-ruby-sass b/spec/core_functions/color/hsla/error/five_args/error-ruby-sass new file mode 100644 index 0000000000..71022a96b1 --- /dev/null +++ b/spec/core_functions/color/hsla/error/five_args/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (given 5, expected 1..4) for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/five_args/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/five_args/expected_output.css b/spec/core_functions/color/hsla/error/five_args/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/five_args/input.scss b/spec/core_functions/color/hsla/error/five_args/input.scss new file mode 100644 index 0000000000..270ede1866 --- /dev/null +++ b/spec/core_functions/color/hsla/error/five_args/input.scss @@ -0,0 +1,3 @@ +five-arg { + x: hsla(0, 100%, 50%, 0.5, 0); +} diff --git a/spec/core_functions/color/hsla/error/five_args/status b/spec/core_functions/color/hsla/error/five_args/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/five_args/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/alpha_unit/error b/spec/core_functions/color/hsla/error/four_args/alpha_unit/error similarity index 52% rename from spec/core_functions/color/hsla/error/alpha_unit/error rename to spec/core_functions/color/hsla/error/four_args/alpha_unit/error index e509623cdd..2ff5f7ae35 100644 --- a/spec/core_functions/color/hsla/error/alpha_unit/error +++ b/spec/core_functions/color/hsla/error/four_args/alpha_unit/error @@ -1,4 +1,4 @@ Error: $alpha: Expected 0.5px to have no units or "%". a: hsla(0, 0, 0, 0.5px); ^^^^^^^^^^^^^^^^^^^^ - /sass/spec/core_functions/color/hsla/error/alpha_unit/input.scss 2:6 root stylesheet + /sass/spec/core_functions/color/hsla/error/four_args/alpha_unit/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/alpha_unit/error-ruby-sass b/spec/core_functions/color/hsla/error/four_args/alpha_unit/error-ruby-sass similarity index 100% rename from spec/core_functions/color/hsla/error/alpha_unit/error-ruby-sass rename to spec/core_functions/color/hsla/error/four_args/alpha_unit/error-ruby-sass diff --git a/spec/core_functions/color/hsla/error/four_args/alpha_unit/expected_output.css b/spec/core_functions/color/hsla/error/four_args/alpha_unit/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/alpha_unit/input.scss b/spec/core_functions/color/hsla/error/four_args/alpha_unit/input.scss similarity index 100% rename from spec/core_functions/color/hsla/error/alpha_unit/input.scss rename to spec/core_functions/color/hsla/error/four_args/alpha_unit/input.scss diff --git a/spec/core_functions/color/hsla/error/alpha_unit/options.yml b/spec/core_functions/color/hsla/error/four_args/alpha_unit/options.yml similarity index 52% rename from spec/core_functions/color/hsla/error/alpha_unit/options.yml rename to spec/core_functions/color/hsla/error/four_args/alpha_unit/options.yml index 453b6863bc..24dc08e9df 100644 --- a/spec/core_functions/color/hsla/error/alpha_unit/options.yml +++ b/spec/core_functions/color/hsla/error/four_args/alpha_unit/options.yml @@ -1,4 +1,4 @@ --- :start_version: '3.7' :todo: -- libsass # sass/libsass#2719 +- libsass diff --git a/spec/core_functions/color/hsla/error/four_args/alpha_unit/status b/spec/core_functions/color/hsla/error/four_args/alpha_unit/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/alpha_unit/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/error b/spec/core_functions/color/hsla/error/four_args/hue_type/error new file mode 100644 index 0000000000..b456fa7219 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/hue_type/error @@ -0,0 +1,4 @@ +Error: $hue: "foo" is not a number. + x: hsla("foo", 100%, 50%, 0.5); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/error-libsass b/spec/core_functions/color/hsla/error/four_args/hue_type/error-libsass new file mode 100644 index 0000000000..0938726f6b --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/hue_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$hue` of `hsla($hue, $saturation, $lightness, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss, in function `hsla` + from line 2 of /sass/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss +>> x: hsla("foo", 100%, 50%, 0.5); + + -----^ diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/error-ruby-sass b/spec/core_functions/color/hsla/error/four_args/hue_type/error-ruby-sass new file mode 100644 index 0000000000..f885b86900 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/hue_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $hue: "foo" is not a number for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/expected_output.css b/spec/core_functions/color/hsla/error/four_args/hue_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss b/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss new file mode 100644 index 0000000000..0ddaae7f59 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/hue_type/input.scss @@ -0,0 +1,3 @@ +hue-type { + x: hsla("foo", 100%, 50%, 0.5); +} diff --git a/spec/core_functions/color/hsla/error/four_args/hue_type/status b/spec/core_functions/color/hsla/error/four_args/hue_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/hue_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/error b/spec/core_functions/color/hsla/error/four_args/lightness_type/error new file mode 100644 index 0000000000..ab9e80e7d6 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/lightness_type/error @@ -0,0 +1,4 @@ +Error: $lightness: "foo" is not a number. + x: hsla(0, 100%, "foo", 0.5); + ^^^^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/error-libsass b/spec/core_functions/color/hsla/error/four_args/lightness_type/error-libsass new file mode 100644 index 0000000000..57bf22ba59 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/lightness_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$lightness` of `hsla($hue, $saturation, $lightness, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss, in function `hsla` + from line 2 of /sass/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss +>> x: hsla(0, 100%, "foo", 0.5); + + -----^ diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/error-ruby-sass b/spec/core_functions/color/hsla/error/four_args/lightness_type/error-ruby-sass new file mode 100644 index 0000000000..c67a770440 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/lightness_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $lightness: "foo" is not a number for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/expected_output.css b/spec/core_functions/color/hsla/error/four_args/lightness_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss b/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss new file mode 100644 index 0000000000..8f1882c1f2 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/lightness_type/input.scss @@ -0,0 +1,3 @@ +lightness-type { + x: hsla(0, 100%, "foo", 0.5); +} diff --git a/spec/core_functions/color/hsla/error/four_args/lightness_type/status b/spec/core_functions/color/hsla/error/four_args/lightness_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/lightness_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/error b/spec/core_functions/color/hsla/error/four_args/saturation_type/error new file mode 100644 index 0000000000..c5524ea4c6 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/saturation_type/error @@ -0,0 +1,4 @@ +Error: $saturation: "foo" is not a number. + x: hsla(0, "foo", 50%, 0.5); + ^^^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/error-libsass b/spec/core_functions/color/hsla/error/four_args/saturation_type/error-libsass new file mode 100644 index 0000000000..d9f7640168 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/saturation_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$saturation` of `hsla($hue, $saturation, $lightness, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss, in function `hsla` + from line 2 of /sass/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss +>> x: hsla(0, "foo", 50%, 0.5); + + -----^ diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/error-ruby-sass b/spec/core_functions/color/hsla/error/four_args/saturation_type/error-ruby-sass new file mode 100644 index 0000000000..8f8996f9ad --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/saturation_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $saturation: "foo" is not a number for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/expected_output.css b/spec/core_functions/color/hsla/error/four_args/saturation_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss b/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss new file mode 100644 index 0000000000..c4328773b4 --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/saturation_type/input.scss @@ -0,0 +1,3 @@ +saturation-type { + x: hsla(0, "foo", 50%, 0.5); +} diff --git a/spec/core_functions/color/hsla/error/four_args/saturation_type/status b/spec/core_functions/color/hsla/error/four_args/saturation_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/four_args/saturation_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/one_arg/error b/spec/core_functions/color/hsla/error/one_arg/error new file mode 100644 index 0000000000..bcefe5beee --- /dev/null +++ b/spec/core_functions/color/hsla/error/one_arg/error @@ -0,0 +1,4 @@ +Error: Missing argument $saturation. + x: hsla(0); + ^^^^^^^ + /sass/spec/core_functions/color/hsla/error/one_arg/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/one_arg/error-libsass b/spec/core_functions/color/hsla/error/one_arg/error-libsass new file mode 100644 index 0000000000..0c4e46b623 --- /dev/null +++ b/spec/core_functions/color/hsla/error/one_arg/error-libsass @@ -0,0 +1,5 @@ +Error: Function hsla is missing argument $saturation. + on line 2 of /sass/spec/core_functions/color/hsla/error/one_arg/input.scss +>> x: hsla(0); + + -----^ diff --git a/spec/core_functions/color/hsla/error/one_arg/error-ruby-sass b/spec/core_functions/color/hsla/error/one_arg/error-ruby-sass new file mode 100644 index 0000000000..c846031680 --- /dev/null +++ b/spec/core_functions/color/hsla/error/one_arg/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (1 for 4) for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/error/one_arg/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/one_arg/expected_output.css b/spec/core_functions/color/hsla/error/one_arg/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/one_arg/input.scss b/spec/core_functions/color/hsla/error/one_arg/input.scss new file mode 100644 index 0000000000..4f4e139dbb --- /dev/null +++ b/spec/core_functions/color/hsla/error/one_arg/input.scss @@ -0,0 +1,3 @@ +one-arg { + x: hsla(0); +} diff --git a/spec/core_functions/color/hsla/error/one_arg/status b/spec/core_functions/color/hsla/error/one_arg/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/one_arg/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/error/two_args/error b/spec/core_functions/color/hsla/error/two_args/error new file mode 100644 index 0000000000..a4c92b0c04 --- /dev/null +++ b/spec/core_functions/color/hsla/error/two_args/error @@ -0,0 +1,4 @@ +Error: Missing argument $lightness. + x: hsla(0, 100%); + ^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/error/two_args/one_arg/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/hsla/error/two_args/error-libsass b/spec/core_functions/color/hsla/error/two_args/error-libsass new file mode 100644 index 0000000000..4dc641a879 --- /dev/null +++ b/spec/core_functions/color/hsla/error/two_args/error-libsass @@ -0,0 +1,4 @@ +Error: Function hsla is missing argument $lightness. + on line 2 of /sass/spec/core_functions/color/hsla/error/two_args/one_arg/input.scss +>> x: hsla(0, 100%); + -----^ diff --git a/spec/core_functions/color/hsla/error/two_args/error-ruby-sass b/spec/core_functions/color/hsla/error/two_args/error-ruby-sass new file mode 100644 index 0000000000..4593c5283f --- /dev/null +++ b/spec/core_functions/color/hsla/error/two_args/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (2 for 4) for `hsla' + on line 2 of /sass/spec//sass/spec/core_functions/color/hsla/error/two_args/one_arg/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/error/two_args/expected_output.css b/spec/core_functions/color/hsla/error/two_args/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/error/two_args/input.scss b/spec/core_functions/color/hsla/error/two_args/input.scss new file mode 100644 index 0000000000..c25dc6ea8d --- /dev/null +++ b/spec/core_functions/color/hsla/error/two_args/input.scss @@ -0,0 +1,3 @@ +one-arg { + x: hsla(0, 100%); +} diff --git a/spec/core_functions/color/hsla/error/two_args/status b/spec/core_functions/color/hsla/error/two_args/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/error/two_args/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/hsla/success/expected_output.css b/spec/core_functions/color/hsla/special_functions/expected_output.css similarity index 100% rename from spec/core_functions/color/hsla/success/expected_output.css rename to spec/core_functions/color/hsla/special_functions/expected_output.css diff --git a/spec/core_functions/color/hsla/success/input.scss b/spec/core_functions/color/hsla/special_functions/input.scss similarity index 100% rename from spec/core_functions/color/hsla/success/input.scss rename to spec/core_functions/color/hsla/special_functions/input.scss diff --git a/spec/core_functions/color/hsla/with_color/error b/spec/core_functions/color/hsla/with_color/error new file mode 100644 index 0000000000..d5c25158b7 --- /dev/null +++ b/spec/core_functions/color/hsla/with_color/error @@ -0,0 +1,4 @@ +Error: Missing argument $lightness. + opaque: hsla(#123, 1); + ^^^^^^^^^^^^^ + /sass/spec/core_functions/color/hsla/with_color/input.scss 2:11 root stylesheet diff --git a/spec/core_functions/color/hsla/with_color/error-libsass b/spec/core_functions/color/hsla/with_color/error-libsass new file mode 100644 index 0000000000..2263403e9a --- /dev/null +++ b/spec/core_functions/color/hsla/with_color/error-libsass @@ -0,0 +1,5 @@ +Error: Function hsla is missing argument $lightness. + on line 2 of /sass/spec/core_functions/color/hsla/with_color/input.scss +>> opaque: hsla(#123, 1); + + ----------^ diff --git a/spec/core_functions/color/hsla/with_color/error-ruby-sass b/spec/core_functions/color/hsla/with_color/error-ruby-sass new file mode 100644 index 0000000000..a59972bb7e --- /dev/null +++ b/spec/core_functions/color/hsla/with_color/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (2 for 4) for `hsla' + on line 2 of /sass/spec/core_functions/color/hsla/with_color/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/hsla/with_color/expected_output.css b/spec/core_functions/color/hsla/with_color/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/hsla/with_color/input.scss b/spec/core_functions/color/hsla/with_color/input.scss new file mode 100644 index 0000000000..a2fa1cff49 --- /dev/null +++ b/spec/core_functions/color/hsla/with_color/input.scss @@ -0,0 +1,27 @@ +opaque-to { + opaque: hsla(#123, 1); + partial: hsla(#123, 0.5); + transparent: hsla(#123, 0); +} + +partial-to { + $color: hsla(0, 0, 255, 0.3); + opaque: hsla($color, 1); + partial: hsla($color, 0.5); + transparent: hsla($color, 0); +} + +transparent-to { + opaque: hsla(transparent, 1); + partial: hsla(transparent, 0.5); + transparent: hsla(transparent, 0); +} + +clamped { + opaque: hsla(#123, 1.1); + transparent: hsla(#123, -0.1); +} + +named { + x: hsla($color: #123, $alpha: 0.5); +} diff --git a/spec/core_functions/color/hsla/with_color/status b/spec/core_functions/color/hsla/with_color/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/hsla/with_color/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/basic/expected_output.css b/spec/core_functions/color/rgb/basic/expected_output.css new file mode 100644 index 0000000000..3715ea1fd9 --- /dev/null +++ b/spec/core_functions/color/rgb/basic/expected_output.css @@ -0,0 +1,23 @@ +unitless { + numbers: #123456; + beaded: #beaded; + springgreen: springgreen; + named: springgreen; +} +unitless clamped { + red: red; + green: black; + blue: blue; +} + +percents { + all-percent: #123456; + unitless-green: #beaded; + percent-green: #beaded; + boundaries: #00ff80; +} +percents clamped { + red: red; + green: black; + blue: blue; +} diff --git a/spec/core_functions/color/rgb/basic/input.scss b/spec/core_functions/color/rgb/basic/input.scss new file mode 100644 index 0000000000..a4d575dda5 --- /dev/null +++ b/spec/core_functions/color/rgb/basic/input.scss @@ -0,0 +1,30 @@ +// Channels may be specified as unitless numbers between 0 and 255. +unitless { + numbers: rgb(18, 52, 86); + beaded: rgb(190, 173, 237); + springgreen: rgb(0, 255, 127); + named: rgb($red: 0, $green: 255, $blue: 127); + + // Channels that are out of bounds are clamped within bounds. + clamped { + red: rgb(256, 0, 0); + green: rgb(0, -1, 0); + blue: rgb(0, 0, 9999); + } +} + +// Channels may also be specified as percents between 0% and 100%, which may be +// mixed with unitless numbers. +percents { + all-percent: rgb(7.1%, 20.4%, 33.9%); + unitless-green: rgb(74.7%, 173, 93%); + percent-green: rgb(190, 68%, 237); + boundaries: rgb(0%, 100%, 50%); + + // Channels that are out of bounds are clamped within bounds. + clamped { + red: rgb(100.1%, 0, 0); + green: rgb(0, -0.1%, 0); + blue: rgb(0, 0, 200%); + } +} diff --git a/spec/core_functions/color/rgb/error/blue_type/error b/spec/core_functions/color/rgb/error/blue_type/error new file mode 100644 index 0000000000..5c642ce698 --- /dev/null +++ b/spec/core_functions/color/rgb/error/blue_type/error @@ -0,0 +1,4 @@ +Error: $blue: "foo" is not a number. + x: rgb(0, 0, "foo"); + ^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgb/error/blue_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgb/error/blue_type/error-libsass b/spec/core_functions/color/rgb/error/blue_type/error-libsass new file mode 100644 index 0000000000..e1f61b685b --- /dev/null +++ b/spec/core_functions/color/rgb/error/blue_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$blue` of `rgb($red, $green, $blue)` must be a number + on line 2 of /sass/spec/core_functions/color/rgb/error/blue_type/input.scss, in function `rgb` + from line 2 of /sass/spec/core_functions/color/rgb/error/blue_type/input.scss +>> x: rgb(0, 0, "foo"); + + -----^ diff --git a/spec/core_functions/color/rgb/error/blue_type/error-ruby-sass b/spec/core_functions/color/rgb/error/blue_type/error-ruby-sass new file mode 100644 index 0000000000..81fc4229f0 --- /dev/null +++ b/spec/core_functions/color/rgb/error/blue_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $blue: "foo" is not a number for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/blue_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgb/error/blue_type/expected_output.css b/spec/core_functions/color/rgb/error/blue_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgb/error/blue_type/input.scss b/spec/core_functions/color/rgb/error/blue_type/input.scss new file mode 100644 index 0000000000..c019df4d8a --- /dev/null +++ b/spec/core_functions/color/rgb/error/blue_type/input.scss @@ -0,0 +1,3 @@ +blue-type { + x: rgb(0, 0, "foo"); +} diff --git a/spec/core_functions/color/rgb/error/blue_type/status b/spec/core_functions/color/rgb/error/blue_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgb/error/blue_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/error/five_args/error b/spec/core_functions/color/rgb/error/five_args/error new file mode 100644 index 0000000000..fd73d4b47e --- /dev/null +++ b/spec/core_functions/color/rgb/error/five_args/error @@ -0,0 +1,4 @@ +Error: Only 1 argument allowed, but 5 were passed. + x: rgb(1, 2, 3, 0.4, 5); + ^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgb/error/five_args/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgb/error/five_args/error-libsass b/spec/core_functions/color/rgb/error/five_args/error-libsass new file mode 100644 index 0000000000..ada253ddaa --- /dev/null +++ b/spec/core_functions/color/rgb/error/five_args/error-libsass @@ -0,0 +1,5 @@ +Error: wrong number of arguments (5 for 3) for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/five_args/input.scss +>> x: rgb(1, 2, 3, 0.4, 5); + + -----^ diff --git a/spec/core_functions/color/rgb/error/five_args/error-ruby-sass b/spec/core_functions/color/rgb/error/five_args/error-ruby-sass new file mode 100644 index 0000000000..fa7a82a4d5 --- /dev/null +++ b/spec/core_functions/color/rgb/error/five_args/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (given 5, expected 1..3) for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/five_args/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgb/error/five_args/expected_output.css b/spec/core_functions/color/rgb/error/five_args/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgb/error/five_args/input.scss b/spec/core_functions/color/rgb/error/five_args/input.scss new file mode 100644 index 0000000000..37552cabfb --- /dev/null +++ b/spec/core_functions/color/rgb/error/five_args/input.scss @@ -0,0 +1,3 @@ +five-args { + x: rgb(1, 2, 3, 0.4, 5); +} diff --git a/spec/core_functions/color/rgb/error/five_args/status b/spec/core_functions/color/rgb/error/five_args/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgb/error/five_args/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/error/green_type/error b/spec/core_functions/color/rgb/error/green_type/error new file mode 100644 index 0000000000..094ee216d6 --- /dev/null +++ b/spec/core_functions/color/rgb/error/green_type/error @@ -0,0 +1,4 @@ +Error: $green: "foo" is not a number. + x: rgb(0, "foo", 0); + ^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgb/error/green_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgb/error/green_type/error-libsass b/spec/core_functions/color/rgb/error/green_type/error-libsass new file mode 100644 index 0000000000..71cfe88497 --- /dev/null +++ b/spec/core_functions/color/rgb/error/green_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$green` of `rgb($red, $green, $blue)` must be a number + on line 2 of /sass/spec/core_functions/color/rgb/error/green_type/input.scss, in function `rgb` + from line 2 of /sass/spec/core_functions/color/rgb/error/green_type/input.scss +>> x: rgb(0, "foo", 0); + + -----^ diff --git a/spec/core_functions/color/rgb/error/green_type/error-ruby-sass b/spec/core_functions/color/rgb/error/green_type/error-ruby-sass new file mode 100644 index 0000000000..88af6d75bd --- /dev/null +++ b/spec/core_functions/color/rgb/error/green_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $green: "foo" is not a number for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/green_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgb/error/green_type/expected_output.css b/spec/core_functions/color/rgb/error/green_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgb/error/green_type/input.scss b/spec/core_functions/color/rgb/error/green_type/input.scss new file mode 100644 index 0000000000..156b3fa9e0 --- /dev/null +++ b/spec/core_functions/color/rgb/error/green_type/input.scss @@ -0,0 +1,3 @@ +green-type { + x: rgb(0, "foo", 0); +} diff --git a/spec/core_functions/color/rgb/error/green_type/status b/spec/core_functions/color/rgb/error/green_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgb/error/green_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/error/one_arg/error b/spec/core_functions/color/rgb/error/one_arg/error new file mode 100644 index 0000000000..88bc47c409 --- /dev/null +++ b/spec/core_functions/color/rgb/error/one_arg/error @@ -0,0 +1,4 @@ +Error: Missing argument $green. + x: rgb(1); + ^^^^^^ + /sass/spec/core_functions/color/rgb/error/one_arg/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgb/error/one_arg/error-libsass b/spec/core_functions/color/rgb/error/one_arg/error-libsass new file mode 100644 index 0000000000..bc624271da --- /dev/null +++ b/spec/core_functions/color/rgb/error/one_arg/error-libsass @@ -0,0 +1,5 @@ +Error: Function rgb is missing argument $green. + on line 2 of /sass/spec/core_functions/color/rgb/error/one_arg/input.scss +>> x: rgb(1); + + -----^ diff --git a/spec/core_functions/color/rgb/error/one_arg/error-ruby-sass b/spec/core_functions/color/rgb/error/one_arg/error-ruby-sass new file mode 100644 index 0000000000..19874ce1b3 --- /dev/null +++ b/spec/core_functions/color/rgb/error/one_arg/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (1 for 3) for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/one_arg/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgb/error/one_arg/expected_output.css b/spec/core_functions/color/rgb/error/one_arg/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgb/error/one_arg/input.scss b/spec/core_functions/color/rgb/error/one_arg/input.scss new file mode 100644 index 0000000000..7f7671bd17 --- /dev/null +++ b/spec/core_functions/color/rgb/error/one_arg/input.scss @@ -0,0 +1,3 @@ +one-arg { + x: rgb(1); +} diff --git a/spec/core_functions/color/rgb/error/one_arg/status b/spec/core_functions/color/rgb/error/one_arg/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgb/error/one_arg/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/error/red_type/error b/spec/core_functions/color/rgb/error/red_type/error new file mode 100644 index 0000000000..c9198d900c --- /dev/null +++ b/spec/core_functions/color/rgb/error/red_type/error @@ -0,0 +1,4 @@ +Error: $red: "foo" is not a number. + x: rgb("foo", 0, 0); + ^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgb/error/red_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgb/error/red_type/error-libsass b/spec/core_functions/color/rgb/error/red_type/error-libsass new file mode 100644 index 0000000000..e7879c78d4 --- /dev/null +++ b/spec/core_functions/color/rgb/error/red_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$red` of `rgb($red, $green, $blue)` must be a number + on line 2 of /sass/spec/core_functions/color/rgb/error/red_type/input.scss, in function `rgb` + from line 2 of /sass/spec/core_functions/color/rgb/error/red_type/input.scss +>> x: rgb("foo", 0, 0); + + -----^ diff --git a/spec/core_functions/color/rgb/error/red_type/error-ruby-sass b/spec/core_functions/color/rgb/error/red_type/error-ruby-sass new file mode 100644 index 0000000000..e7f93913f6 --- /dev/null +++ b/spec/core_functions/color/rgb/error/red_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $red: "foo" is not a number for `rgb' + on line 2 of /sass/spec/core_functions/color/rgb/error/red_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgb/error/red_type/expected_output.css b/spec/core_functions/color/rgb/error/red_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgb/error/red_type/input.scss b/spec/core_functions/color/rgb/error/red_type/input.scss new file mode 100644 index 0000000000..949b9febe0 --- /dev/null +++ b/spec/core_functions/color/rgb/error/red_type/input.scss @@ -0,0 +1,3 @@ +red-type { + x: rgb("foo", 0, 0); +} diff --git a/spec/core_functions/color/rgb/error/red_type/status b/spec/core_functions/color/rgb/error/red_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgb/error/red_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgb/success/expected_output.css b/spec/core_functions/color/rgb/special_functions/expected_output.css similarity index 100% rename from spec/core_functions/color/rgb/success/expected_output.css rename to spec/core_functions/color/rgb/special_functions/expected_output.css diff --git a/spec/core_functions/color/rgb/success/input.scss b/spec/core_functions/color/rgb/special_functions/input.scss similarity index 100% rename from spec/core_functions/color/rgb/success/input.scss rename to spec/core_functions/color/rgb/special_functions/input.scss diff --git a/spec/core_functions/color/rgba/basic/expected_output.css b/spec/core_functions/color/rgba/basic/expected_output.css new file mode 100644 index 0000000000..dd37e01fd0 --- /dev/null +++ b/spec/core_functions/color/rgba/basic/expected_output.css @@ -0,0 +1,14 @@ +basic { + transparent: rgba(0, 255, 127, 0); + opaque: #beaded; + partial: rgba(18, 52, 86, 0.5); + named: rgba(0, 255, 127, 0.3); +} + +clamped { + red: rgba(255, 0, 0, 0.5); + green: rgba(0, 0, 0, 0.5); + blue: rgba(0, 0, 255, 0.5); + alpha-above: black; + alpha-below: rgba(0, 0, 0, 0); +} diff --git a/spec/core_functions/color/rgba/basic/input.scss b/spec/core_functions/color/rgba/basic/input.scss new file mode 100644 index 0000000000..f2a912c599 --- /dev/null +++ b/spec/core_functions/color/rgba/basic/input.scss @@ -0,0 +1,15 @@ +basic { + transparent: rgba(0, 255, 127, 0); + opaque: rgba(190, 173, 237, 1); + partial: rgba(18, 52, 86, 0.5); + named: rgba($red: 0, $green: 255, $blue: 127, $alpha: 0.3); +} + +// Channels that are out of bounds are clamped within bounds. +clamped { + red: rgba(256, 0, 0, 0.5); + green: rgba(0, -1, 0, 0.5); + blue: rgba(0, 0, 9999, 0.5); + alpha-above: rgba(0, 0, 0, 1.1); + alpha-below: rgba(0, 0, 0, -0.1); +} diff --git a/spec/core_functions/color/rgba/error/five_args/error b/spec/core_functions/color/rgba/error/five_args/error new file mode 100644 index 0000000000..6463e5c8e2 --- /dev/null +++ b/spec/core_functions/color/rgba/error/five_args/error @@ -0,0 +1,4 @@ +Error: Only 1 argument allowed, but 5 were passed. + x: rgba(1, 2, 3, 0.4, 5); + ^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/five_args/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/five_args/error-libsass b/spec/core_functions/color/rgba/error/five_args/error-libsass new file mode 100644 index 0000000000..31f13763d2 --- /dev/null +++ b/spec/core_functions/color/rgba/error/five_args/error-libsass @@ -0,0 +1,5 @@ +Error: overloaded function `rgba` given wrong number of arguments + on line 2 of /sass/spec/core_functions/color/rgba/error/five_args/input.scss +>> x: rgba(1, 2, 3, 0.4, 5); + + -----^ diff --git a/spec/core_functions/color/rgba/error/five_args/error-ruby-sass b/spec/core_functions/color/rgba/error/five_args/error-ruby-sass new file mode 100644 index 0000000000..9204031865 --- /dev/null +++ b/spec/core_functions/color/rgba/error/five_args/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (5 for 4) for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/five_args/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/five_args/expected_output.css b/spec/core_functions/color/rgba/error/five_args/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/five_args/input.scss b/spec/core_functions/color/rgba/error/five_args/input.scss new file mode 100644 index 0000000000..ec615918bf --- /dev/null +++ b/spec/core_functions/color/rgba/error/five_args/input.scss @@ -0,0 +1,3 @@ +five-args { + x: rgba(1, 2, 3, 0.4, 5); +} diff --git a/spec/core_functions/color/rgba/error/five_args/status b/spec/core_functions/color/rgba/error/five_args/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/five_args/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/alpha_unit/error b/spec/core_functions/color/rgba/error/four_args/alpha_unit/error similarity index 52% rename from spec/core_functions/color/rgba/error/alpha_unit/error rename to spec/core_functions/color/rgba/error/four_args/alpha_unit/error index 7fa63f0333..cf9d81131c 100644 --- a/spec/core_functions/color/rgba/error/alpha_unit/error +++ b/spec/core_functions/color/rgba/error/four_args/alpha_unit/error @@ -1,4 +1,4 @@ Error: $alpha: Expected 0.5px to have no units or "%". a: rgba(0, 0, 0, 0.5px); ^^^^^^^^^^^^^^^^^^^^ - /sass/spec/core_functions/color/rgba/error/alpha_unit/input.scss 2:6 root stylesheet + /sass/spec/core_functions/color/rgba/error/four_args/alpha_unit/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/alpha_unit/error-ruby-sass b/spec/core_functions/color/rgba/error/four_args/alpha_unit/error-ruby-sass similarity index 100% rename from spec/core_functions/color/rgba/error/alpha_unit/error-ruby-sass rename to spec/core_functions/color/rgba/error/four_args/alpha_unit/error-ruby-sass diff --git a/spec/core_functions/color/rgba/error/four_args/alpha_unit/expected_output.css b/spec/core_functions/color/rgba/error/four_args/alpha_unit/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/alpha_unit/input.scss b/spec/core_functions/color/rgba/error/four_args/alpha_unit/input.scss similarity index 100% rename from spec/core_functions/color/rgba/error/alpha_unit/input.scss rename to spec/core_functions/color/rgba/error/four_args/alpha_unit/input.scss diff --git a/spec/core_functions/color/rgba/error/alpha_unit/options.yml b/spec/core_functions/color/rgba/error/four_args/alpha_unit/options.yml similarity index 52% rename from spec/core_functions/color/rgba/error/alpha_unit/options.yml rename to spec/core_functions/color/rgba/error/four_args/alpha_unit/options.yml index 453b6863bc..24dc08e9df 100644 --- a/spec/core_functions/color/rgba/error/alpha_unit/options.yml +++ b/spec/core_functions/color/rgba/error/four_args/alpha_unit/options.yml @@ -1,4 +1,4 @@ --- :start_version: '3.7' :todo: -- libsass # sass/libsass#2719 +- libsass diff --git a/spec/core_functions/color/rgba/error/four_args/alpha_unit/status b/spec/core_functions/color/rgba/error/four_args/alpha_unit/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/alpha_unit/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/error b/spec/core_functions/color/rgba/error/four_args/blue_type/error new file mode 100644 index 0000000000..b3892db691 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/blue_type/error @@ -0,0 +1,4 @@ +Error: $blue: "foo" is not a number. + x: rgba(0, 0, "foo", 0.5); + ^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/error-libsass b/spec/core_functions/color/rgba/error/four_args/blue_type/error-libsass new file mode 100644 index 0000000000..f6734413a1 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/blue_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$blue` of `rgba($red, $green, $blue, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss, in function `rgba` + from line 2 of /sass/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss +>> x: rgba(0, 0, "foo", 0.5); + + -----^ diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/error-ruby-sass b/spec/core_functions/color/rgba/error/four_args/blue_type/error-ruby-sass new file mode 100644 index 0000000000..ad5734597e --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/blue_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $blue: "foo" is not a number for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/expected_output.css b/spec/core_functions/color/rgba/error/four_args/blue_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss b/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss new file mode 100644 index 0000000000..87efc21015 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/blue_type/input.scss @@ -0,0 +1,3 @@ +blue-type { + x: rgba(0, 0, "foo", 0.5); +} diff --git a/spec/core_functions/color/rgba/error/four_args/blue_type/status b/spec/core_functions/color/rgba/error/four_args/blue_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/blue_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/error b/spec/core_functions/color/rgba/error/four_args/green_type/error new file mode 100644 index 0000000000..2af8a616c1 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/green_type/error @@ -0,0 +1,4 @@ +Error: $green: "foo" is not a number. + x: rgba(0, "foo", 0, 0.5); + ^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/four_args/green_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/error-libsass b/spec/core_functions/color/rgba/error/four_args/green_type/error-libsass new file mode 100644 index 0000000000..e520c91c16 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/green_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$green` of `rgba($red, $green, $blue, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/green_type/input.scss, in function `rgba` + from line 2 of /sass/spec/core_functions/color/rgba/error/four_args/green_type/input.scss +>> x: rgba(0, "foo", 0, 0.5); + + -----^ diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/error-ruby-sass b/spec/core_functions/color/rgba/error/four_args/green_type/error-ruby-sass new file mode 100644 index 0000000000..e59b462565 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/green_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $green: "foo" is not a number for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/green_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/expected_output.css b/spec/core_functions/color/rgba/error/four_args/green_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/input.scss b/spec/core_functions/color/rgba/error/four_args/green_type/input.scss new file mode 100644 index 0000000000..cf2142615b --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/green_type/input.scss @@ -0,0 +1,3 @@ +green-type { + x: rgba(0, "foo", 0, 0.5); +} diff --git a/spec/core_functions/color/rgba/error/four_args/green_type/status b/spec/core_functions/color/rgba/error/four_args/green_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/green_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/error b/spec/core_functions/color/rgba/error/four_args/red_type/error new file mode 100644 index 0000000000..0220cc2cb1 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/red_type/error @@ -0,0 +1,4 @@ +Error: $red: "foo" is not a number. + x: rgba("foo", 0, 0, 0.5); + ^^^^^^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/four_args/red_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/error-libsass b/spec/core_functions/color/rgba/error/four_args/red_type/error-libsass new file mode 100644 index 0000000000..8fb01ae37b --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/red_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$red` of `rgba($red, $green, $blue, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/red_type/input.scss, in function `rgba` + from line 2 of /sass/spec/core_functions/color/rgba/error/four_args/red_type/input.scss +>> x: rgba("foo", 0, 0, 0.5); + + -----^ diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/error-ruby-sass b/spec/core_functions/color/rgba/error/four_args/red_type/error-ruby-sass new file mode 100644 index 0000000000..5a0108f997 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/red_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $red: "foo" is not a number for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/four_args/red_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/expected_output.css b/spec/core_functions/color/rgba/error/four_args/red_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/input.scss b/spec/core_functions/color/rgba/error/four_args/red_type/input.scss new file mode 100644 index 0000000000..31ddfcfdb6 --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/red_type/input.scss @@ -0,0 +1,3 @@ +red-type { + x: rgba("foo", 0, 0, 0.5); +} diff --git a/spec/core_functions/color/rgba/error/four_args/red_type/status b/spec/core_functions/color/rgba/error/four_args/red_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/four_args/red_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/one_arg/error b/spec/core_functions/color/rgba/error/one_arg/error new file mode 100644 index 0000000000..8add17a070 --- /dev/null +++ b/spec/core_functions/color/rgba/error/one_arg/error @@ -0,0 +1,4 @@ +Error: Missing argument $green. + x: rgba(1); + ^^^^^^^ + /sass/spec/core_functions/color/rgba/error/one_arg/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/one_arg/error-libsass b/spec/core_functions/color/rgba/error/one_arg/error-libsass new file mode 100644 index 0000000000..0a3a119a87 --- /dev/null +++ b/spec/core_functions/color/rgba/error/one_arg/error-libsass @@ -0,0 +1,5 @@ +Error: overloaded function `rgba` given wrong number of arguments + on line 2 of /sass/spec/core_functions/color/rgba/error/one_arg/input.scss +>> x: rgba(1); + + -----^ diff --git a/spec/core_functions/color/rgba/error/one_arg/error-ruby-sass b/spec/core_functions/color/rgba/error/one_arg/error-ruby-sass new file mode 100644 index 0000000000..7d5698c43c --- /dev/null +++ b/spec/core_functions/color/rgba/error/one_arg/error-ruby-sass @@ -0,0 +1,3 @@ +Error: wrong number of arguments (1 for 4) for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/one_arg/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/one_arg/expected_output.css b/spec/core_functions/color/rgba/error/one_arg/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/one_arg/input.scss b/spec/core_functions/color/rgba/error/one_arg/input.scss new file mode 100644 index 0000000000..1e15e31eb3 --- /dev/null +++ b/spec/core_functions/color/rgba/error/one_arg/input.scss @@ -0,0 +1,3 @@ +one-arg { + x: rgba(1); +} diff --git a/spec/core_functions/color/rgba/error/one_arg/status b/spec/core_functions/color/rgba/error/one_arg/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/one_arg/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/error b/spec/core_functions/color/rgba/error/two_args/alpha_type/error new file mode 100644 index 0000000000..a1d75c4ed0 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_type/error @@ -0,0 +1,4 @@ +Error: $alpha: "foo" is not a number. + x: rgba(#123, "foo"); + ^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/error-libsass b/spec/core_functions/color/rgba/error/two_args/alpha_type/error-libsass new file mode 100644 index 0000000000..94a9f37d43 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$alpha` of `rgba($color, $alpha)` must be a number + on line 2 of /sass/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss, in function `rgba` + from line 2 of /sass/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss +>> x: rgba(#123, "foo"); + + -----^ diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/error-ruby-sass b/spec/core_functions/color/rgba/error/two_args/alpha_type/error-ruby-sass new file mode 100644 index 0000000000..d05a3e64bb --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $alpha: "foo" is not a number for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/expected_output.css b/spec/core_functions/color/rgba/error/two_args/alpha_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss b/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss new file mode 100644 index 0000000000..003ab9de6c --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_type/input.scss @@ -0,0 +1,3 @@ +alpha-type { + x: rgba(#123, "foo"); +} diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_type/status b/spec/core_functions/color/rgba/error/two_args/alpha_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/error b/spec/core_functions/color/rgba/error/two_args/alpha_unit/error new file mode 100644 index 0000000000..155226ad84 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_unit/error @@ -0,0 +1,4 @@ +Error: $alpha: Expected 0.5px to have no units or "%". + a: rgba(#123, 0.5px); + ^^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/two_args/alpha_unit/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/error-ruby-sass b/spec/core_functions/color/rgba/error/two_args/alpha_unit/error-ruby-sass new file mode 100644 index 0000000000..8af4d9f2e2 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_unit/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $alpha: Expected 0.5px to have no units or "%" for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/alpha_unit/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/expected_output.css b/spec/core_functions/color/rgba/error/two_args/alpha_unit/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/input.scss b/spec/core_functions/color/rgba/error/two_args/alpha_unit/input.scss new file mode 100644 index 0000000000..2444ca7acd --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_unit/input.scss @@ -0,0 +1,3 @@ +.alpha-unit { + a: rgba(#123, 0.5px); +} diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/options.yml b/spec/core_functions/color/rgba/error/two_args/alpha_unit/options.yml new file mode 100644 index 0000000000..24dc08e9df --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_unit/options.yml @@ -0,0 +1,4 @@ +--- +:start_version: '3.7' +:todo: +- libsass diff --git a/spec/core_functions/color/rgba/error/two_args/alpha_unit/status b/spec/core_functions/color/rgba/error/two_args/alpha_unit/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/alpha_unit/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/error b/spec/core_functions/color/rgba/error/two_args/color_type/error new file mode 100644 index 0000000000..1604fdc128 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/color_type/error @@ -0,0 +1,4 @@ +Error: $color: "foo" is not a color. + x: rgba("foo", 0.5); + ^^^^^^^^^^^^^^^^ + /sass/spec/core_functions/color/rgba/error/two_args/color_type/input.scss 2:6 root stylesheet diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/error-libsass b/spec/core_functions/color/rgba/error/two_args/color_type/error-libsass new file mode 100644 index 0000000000..228e11d38e --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/color_type/error-libsass @@ -0,0 +1,6 @@ +Error: argument `$color` of `rgba($color, $alpha)` must be a color + on line 2 of /sass/spec/core_functions/color/rgba/error/two_args/color_type/input.scss, in function `rgba` + from line 2 of /sass/spec/core_functions/color/rgba/error/two_args/color_type/input.scss +>> x: rgba("foo", 0.5); + + -----^ diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/error-ruby-sass b/spec/core_functions/color/rgba/error/two_args/color_type/error-ruby-sass new file mode 100644 index 0000000000..c824888c40 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/color_type/error-ruby-sass @@ -0,0 +1,3 @@ +Error: $color: "foo" is not a color for `rgba' + on line 2 of /sass/spec/core_functions/color/rgba/error/two_args/color_type/input.scss + Use --trace for backtrace. diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/expected_output.css b/spec/core_functions/color/rgba/error/two_args/color_type/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/input.scss b/spec/core_functions/color/rgba/error/two_args/color_type/input.scss new file mode 100644 index 0000000000..ae099c99f6 --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/color_type/input.scss @@ -0,0 +1,3 @@ +color-type { + x: rgba("foo", 0.5); +} diff --git a/spec/core_functions/color/rgba/error/two_args/color_type/status b/spec/core_functions/color/rgba/error/two_args/color_type/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/core_functions/color/rgba/error/two_args/color_type/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/core_functions/color/rgba/success/expected_output.css b/spec/core_functions/color/rgba/special_functions/expected_output.css similarity index 100% rename from spec/core_functions/color/rgba/success/expected_output.css rename to spec/core_functions/color/rgba/special_functions/expected_output.css diff --git a/spec/core_functions/color/rgba/success/input.scss b/spec/core_functions/color/rgba/special_functions/input.scss similarity index 100% rename from spec/core_functions/color/rgba/success/input.scss rename to spec/core_functions/color/rgba/special_functions/input.scss diff --git a/spec/core_functions/color/rgba/with_color/expected_output.css b/spec/core_functions/color/rgba/with_color/expected_output.css new file mode 100644 index 0000000000..575723276d --- /dev/null +++ b/spec/core_functions/color/rgba/with_color/expected_output.css @@ -0,0 +1,26 @@ +opaque-to { + opaque: #112233; + partial: rgba(17, 34, 51, 0.5); + transparent: rgba(17, 34, 51, 0); +} + +partial-to { + opaque: blue; + partial: rgba(0, 0, 255, 0.5); + transparent: rgba(0, 0, 255, 0); +} + +transparent-to { + opaque: black; + partial: rgba(0, 0, 0, 0.5); + transparent: rgba(0, 0, 0, 0); +} + +clamped { + opaque: #112233; + transparent: rgba(17, 34, 51, 0); +} + +named { + x: rgba(17, 34, 51, 0.5); +} diff --git a/spec/core_functions/color/rgba/with_color/input.scss b/spec/core_functions/color/rgba/with_color/input.scss new file mode 100644 index 0000000000..e0e6269418 --- /dev/null +++ b/spec/core_functions/color/rgba/with_color/input.scss @@ -0,0 +1,27 @@ +opaque-to { + opaque: rgba(#123, 1); + partial: rgba(#123, 0.5); + transparent: rgba(#123, 0); +} + +partial-to { + $color: rgba(0, 0, 255, 0.3); + opaque: rgba($color, 1); + partial: rgba($color, 0.5); + transparent: rgba($color, 0); +} + +transparent-to { + opaque: rgba(transparent, 1); + partial: rgba(transparent, 0.5); + transparent: rgba(transparent, 0); +} + +clamped { + opaque: rgba(#123, 1.1); + transparent: rgba(#123, -0.1); +} + +named { + x: rgba($color: #123, $alpha: 0.5); +}