1<===> _utils.scss 2/// Returns the keyword arguments passed to this function as a map. 3@function args-to-keywords($args...) { 4 @return keywords($args); 5} 6 7<===> 8================================================================================ 9<===> empty/no_args/input.scss 10@import "../../utils"; 11a {b: inspect(args-to-keywords())} 12 13<===> empty/no_args/output.css 14a { 15 b: (); 16} 17 18<===> 19================================================================================ 20<===> empty/positional/input.scss 21@import "../../utils"; 22a {b: inspect(args-to-keywords(1, 2, 3))} 23 24<===> empty/positional/output.css 25a { 26 b: (); 27} 28 29<===> 30================================================================================ 31<===> one_arg/input.scss 32@import "../utils"; 33a {b: inspect(args-to-keywords($c: d))} 34 35<===> one_arg/output.css 36a { 37 b: (c: d); 38} 39 40<===> 41================================================================================ 42<===> multi_arg/input.scss 43@import "../utils"; 44a {b: inspect(args-to-keywords($c: d, $e: f, $g: h))} 45 46<===> multi_arg/output.css 47a { 48 b: (c: d, e: f, g: h); 49} 50 51<===> 52================================================================================ 53<===> forwarded/function/input.scss 54@import "../../utils"; 55 56@function args-to-keywords-forward($args...) { 57 @return args-to-keywords($args...); 58} 59 60a {b: inspect(args-to-keywords-forward($c: d))} 61 62<===> forwarded/function/output.css 63a { 64 b: (c: d); 65} 66 67<===> 68================================================================================ 69<===> forwarded/call/input.scss 70@import "../../utils"; 71 72@function args-to-keywords-forward($args...) { 73 @return call(get-function("args-to-keywords"), $args...); 74} 75 76a {b: inspect(args-to-keywords-forward($c: d))} 77 78<===> forwarded/call/output.css 79a { 80 b: (c: d); 81} 82 83<===> 84================================================================================ 85<===> forwarded/mixin/input.scss 86@import "../../utils"; 87 88@mixin args-to-keywords-forward($args...) { 89 a {b: inspect(args-to-keywords($args...))} 90} 91 92@include args-to-keywords-forward($c: d); 93 94<===> forwarded/mixin/output.css 95a { 96 b: (c: d); 97} 98 99<===> 100================================================================================ 101<===> forwarded/content/input.scss 102@import "../../utils"; 103 104@mixin args-to-keywords-forward($args...) { 105 @content($args...); 106} 107 108@include args-to-keywords-forward($c: d) using ($args...) { 109 a {b: inspect(args-to-keywords($args...))} 110} 111 112<===> forwarded/content/output.css 113a { 114 b: (c: d); 115} 116 117<===> 118================================================================================ 119<===> dash_insensitive/input.scss 120@import "../utils"; 121a {b: inspect(args-to-keywords($c-d: e, $f_g: h))} 122 123<===> dash_insensitive/output.css 124a { 125 b: (c-d: e, f-g: h); 126} 127 128<===> 129================================================================================ 130<===> named/input.scss 131@function args-to-keywords($args...) { 132 @return keywords($args: $args); 133} 134 135a {b: inspect(args-to-keywords($c: d))} 136 137<===> named/output.css 138a { 139 b: (c: d); 140} 141 142<===> 143================================================================================ 144<===> error/type/non_arg_list/options.yml 145--- 146:todo: 147- sass/libsass#2937 148 149<===> error/type/non_arg_list/input.scss 150a {b: keywords(1 2 3)} 151 152<===> error/type/non_arg_list/error 153Error: $args: 1 2 3 is not an argument list. 154 , 1551 | a {b: keywords(1 2 3)} 156 | ^^^^^^^^^^^^^^^ 157 ' 158 input.scss 1:7 root stylesheet 159 160<===> 161================================================================================ 162<===> error/type/non_list/input.scss 163a {b: keywords(1)} 164 165<===> error/type/non_list/error 166Error: $args: 1 is not an argument list. 167 , 1681 | a {b: keywords(1)} 169 | ^^^^^^^^^^^ 170 ' 171 input.scss 1:7 root stylesheet 172 173<===> error/type/non_list/error-libsass 174Error: argument `$args` of `keywords($args)` must be a list 175 on line 1:7 of input.scss, in function `keywords` 176 from line 1:7 of input.scss 177>> a {b: keywords(1)} 178 179 ------^ 180 181<===> 182================================================================================ 183<===> error/too_few_args/input.scss 184a {b: keywords()} 185 186<===> error/too_few_args/error 187Error: Missing argument $args. 188 ,--> input.scss 1891 | a {b: keywords()} 190 | ^^^^^^^^^^ invocation 191 ' 192 ,--> sass:meta 1931 | @function keywords($args) { 194 | =============== declaration 195 ' 196 input.scss 1:7 root stylesheet 197 198<===> error/too_few_args/error-libsass 199Error: Function keywords is missing argument $args. 200 on line 1 of input.scss 201>> a {b: keywords()} 202 203 ------^ 204 205<===> 206================================================================================ 207<===> error/too_many_args/input.scss 208a {b: keywords(1, 2)} 209 210<===> error/too_many_args/error 211Error: Only 1 argument allowed, but 2 were passed. 212 ,--> input.scss 2131 | a {b: keywords(1, 2)} 214 | ^^^^^^^^^^^^^^ invocation 215 ' 216 ,--> sass:meta 2171 | @function keywords($args) { 218 | =============== declaration 219 ' 220 input.scss 1:7 root stylesheet 221 222<===> error/too_many_args/error-libsass 223Error: wrong number of arguments (2 for 1) for `keywords' 224 on line 1:7 of input.scss 225>> a {b: keywords(1, 2)} 226 227 ------^ 228