1<===> number/unitless/input.scss 2$result: inspect(123.456); 3a { 4 value: $result; 5 type: type-of($result); 6} 7 8<===> number/unitless/output.css 9a { 10 value: 123.456; 11 type: string; 12} 13 14<===> 15================================================================================ 16<===> number/unit/input.scss 17// We explicitly don't test the inspect format for complex units. Their format 18// isn't guaranteed by the spec, since they can't be written literally in Sass. 19$result: inspect(50px); 20a { 21 value: $result; 22 type: type-of($result); 23} 24 25<===> number/unit/output.css 26a { 27 value: 50px; 28 type: string; 29} 30 31<===> 32================================================================================ 33<===> string/unquoted/input.scss 34$result: inspect(foo); 35a { 36 value: $result; 37 type: type-of($result); 38} 39 40<===> string/unquoted/output.css 41a { 42 value: foo; 43 type: string; 44} 45 46<===> 47================================================================================ 48<===> string/quoted/input.scss 49$result: inspect("foo"); 50a { 51 value: $result; 52 type: type-of($result); 53 54 // inspect() should always return an unquoted string, so when it's passed a 55 // quoted string its return value should contain quote characters. We check 56 // the length to verify that the quotes are included, since there's no 57 // built-in way to check whether a string is quoted. 58 length: str-length($result); 59} 60 61<===> string/quoted/output.css 62a { 63 value: "foo"; 64 type: string; 65 length: 5; 66} 67 68<===> 69================================================================================ 70<===> color/literal/README.md 71When colors are written literally by the user, rather than being generated by a 72function, inspect() should return them in the same format the user wrote them. 73 74<===> 75================================================================================ 76<===> color/literal/short_hex/input.scss 77$result: inspect(#00f); 78a { 79 value: $result; 80 type: type-of($result); 81} 82 83<===> color/literal/short_hex/output.css 84a { 85 value: #00f; 86 type: string; 87} 88 89<===> 90================================================================================ 91<===> color/literal/long_hex/input.scss 92$result: inspect(#0000ff); 93a { 94 value: $result; 95 type: type-of($result); 96} 97 98<===> color/literal/long_hex/output.css 99a { 100 value: #0000ff; 101 type: string; 102} 103 104<===> 105================================================================================ 106<===> color/literal/named/input.scss 107$result: inspect(blue); 108a { 109 value: $result; 110 type: type-of($result); 111} 112 113<===> color/literal/named/output.css 114a { 115 value: blue; 116 type: string; 117} 118 119<===> 120================================================================================ 121<===> color/literal/transparent/input.scss 122$result: inspect(transparent); 123a { 124 value: $result; 125 type: type-of($result); 126} 127 128<===> color/literal/transparent/output.css 129a { 130 value: transparent; 131 type: string; 132} 133 134<===> 135================================================================================ 136<===> color/generated/README.md 137A color that's generated from a function should be returned as rgba() if its 138alpha channel is anything other than 1, or the color name if it has one, or else 139the hex code. 140 141<===> color/generated/_utils.scss 142/// Returns a copy of `$color` that doesn't have color-literal metadata 143/// associated with it. 144@function generated-color($color) { 145 // This doesn't change the value of `$color` at all, but it does construct a 146 // new object. 147 @return scale-color($color, $blue: 0%); 148} 149 150<===> 151================================================================================ 152<===> color/generated/alpha/input.scss 153$result: inspect(rgba(1, 2, 3, 0.4)); 154a { 155 value: $result; 156 type: type-of($result); 157} 158 159<===> color/generated/alpha/output.css 160a { 161 value: rgba(1, 2, 3, 0.4); 162 type: string; 163} 164 165<===> 166================================================================================ 167<===> color/generated/transparent/input.scss 168@import "../utils"; 169$result: inspect(generated-color(transparent)); 170a { 171 value: $result; 172 type: type-of($result); 173} 174 175<===> color/generated/transparent/output.css 176a { 177 value: rgba(0, 0, 0, 0); 178 type: string; 179} 180 181<===> 182================================================================================ 183<===> color/generated/named/input.scss 184@import "../utils"; 185$result: inspect(generated-color(#00f)); 186a { 187 value: $result; 188 type: type-of($result); 189} 190 191<===> color/generated/named/output.css 192a { 193 value: blue; 194 type: string; 195} 196 197<===> 198================================================================================ 199<===> color/generated/short_hex/input.scss 200@import "../utils"; 201$result: inspect(generated-color(#abc)); 202a { 203 value: $result; 204 type: type-of($result); 205} 206 207<===> color/generated/short_hex/output.css 208a { 209 value: #aabbcc; 210 type: string; 211} 212 213<===> 214================================================================================ 215<===> color/generated/long_hex/input.scss 216@import "../utils"; 217$result: inspect(generated-color(#abcdef)); 218a { 219 value: $result; 220 type: type-of($result); 221} 222 223<===> color/generated/long_hex/output.css 224a { 225 value: #abcdef; 226 type: string; 227} 228 229<===> 230================================================================================ 231<===> boolean/true/input.scss 232$result: inspect(true); 233a { 234 value: $result; 235 type: type-of($result); 236} 237 238<===> boolean/true/output.css 239a { 240 value: true; 241 type: string; 242} 243 244<===> 245================================================================================ 246<===> boolean/false/input.scss 247$result: inspect(false); 248a { 249 value: $result; 250 type: type-of($result); 251} 252 253<===> boolean/false/output.css 254a { 255 value: false; 256 type: string; 257} 258 259<===> 260================================================================================ 261<===> null/input.scss 262$result: inspect(null); 263a { 264 value: $result; 265 type: type-of($result); 266} 267 268<===> null/output.css 269a { 270 value: null; 271 type: string; 272} 273 274<===> 275================================================================================ 276<===> list/empty/input.scss 277$result: inspect(()); 278a { 279 value: $result; 280 type: type-of($result); 281} 282 283<===> list/empty/output.css 284a { 285 value: (); 286 type: string; 287} 288 289<===> 290================================================================================ 291<===> list/single/space/options.yml 292--- 293:todo: 294- sass/libsass#2926 295 296<===> list/single/space/input.scss 297$result: inspect(append((), 1, space)); 298a { 299 value: $result; 300 type: type-of($result); 301} 302 303<===> list/single/space/output.css 304a { 305 value: 1; 306 type: string; 307} 308 309<===> 310================================================================================ 311<===> list/single/comma/input.scss 312$result: inspect((1,)); 313a { 314 value: $result; 315 type: type-of($result); 316} 317 318<===> list/single/comma/output.css 319a { 320 value: (1,); 321 type: string; 322} 323 324<===> 325================================================================================ 326<===> list/single/slash/options.yml 327--- 328:todo: 329- sass/libsass#2887 330 331<===> list/single/slash/input.scss 332$result: inspect(append((), 1, slash)); 333a { 334 value: $result; 335 type: type-of($result); 336} 337 338<===> list/single/slash/output.css 339a { 340 value: (1/); 341 type: string; 342} 343 344<===> 345================================================================================ 346<===> list/single/bracketed/undecided/input.scss 347$result: inspect([1]); 348a { 349 value: $result; 350 type: type-of($result); 351} 352 353<===> list/single/bracketed/undecided/output.css 354a { 355 value: [1]; 356 type: string; 357} 358 359<===> 360================================================================================ 361<===> list/single/bracketed/comma/input.scss 362$result: inspect([1,]); 363a { 364 value: $result; 365 type: type-of($result); 366} 367 368<===> list/single/bracketed/comma/output.css 369a { 370 value: [1,]; 371 type: string; 372} 373 374<===> 375================================================================================ 376<===> list/space/input.scss 377$result: inspect(1 2 3); 378a { 379 value: $result; 380 type: type-of($result); 381} 382 383<===> list/space/output.css 384a { 385 value: 1 2 3; 386 type: string; 387} 388 389<===> 390================================================================================ 391<===> list/comma/input.scss 392$result: inspect((1, 2, 3)); 393a { 394 value: $result; 395 type: type-of($result); 396} 397 398<===> list/comma/output.css 399a { 400 value: 1, 2, 3; 401 type: string; 402} 403 404<===> 405================================================================================ 406<===> list/bracketed/input.scss 407$result: inspect([1, 2, 3]); 408a { 409 value: $result; 410 type: type-of($result); 411} 412 413<===> list/bracketed/output.css 414a { 415 value: [1, 2, 3]; 416 type: string; 417} 418 419<===> 420================================================================================ 421<===> list/nested/empty/in_space/bracketed/options.yml 422--- 423:todo: 424- sass/libsass#2654 425 426<===> list/nested/empty/in_space/bracketed/input.scss 427$result: inspect([() ()]); 428a { 429 value: $result; 430 type: type-of($result); 431} 432 433<===> list/nested/empty/in_space/bracketed/output.css 434a { 435 value: [() ()]; 436 type: string; 437} 438 439<===> 440================================================================================ 441<===> list/nested/empty/in_space/unbracketed/input.scss 442$result: inspect(() ()); 443a { 444 value: $result; 445 type: type-of($result); 446} 447 448<===> list/nested/empty/in_space/unbracketed/output.css 449a { 450 value: () (); 451 type: string; 452} 453 454<===> 455================================================================================ 456<===> list/nested/empty/in_comma/bracketed/input.scss 457$result: inspect([(), ()]); 458a { 459 value: $result; 460 type: type-of($result); 461} 462 463<===> list/nested/empty/in_comma/bracketed/output.css 464a { 465 value: [(), ()]; 466 type: string; 467} 468 469<===> 470================================================================================ 471<===> list/nested/empty/in_comma/unbracketed/input.scss 472$result: inspect(((), ())); 473a { 474 value: $result; 475 type: type-of($result); 476} 477 478<===> list/nested/empty/in_comma/unbracketed/output.css 479a { 480 value: (), (); 481 type: string; 482} 483 484<===> 485================================================================================ 486<===> list/nested/empty/in_slash/options.yml 487:todo: 488- sass/libsass#2887 489 490<===> 491================================================================================ 492<===> list/nested/empty/in_slash/bracketed/input.scss 493$result: inspect(join([(), ()], (), $separator: slash)); 494a { 495 value: $result; 496 type: type-of($result); 497} 498 499<===> list/nested/empty/in_slash/bracketed/output.css 500a { 501 value: [() / ()]; 502 type: string; 503} 504 505<===> 506================================================================================ 507<===> list/nested/empty/in_slash/unbracketed/input.scss 508@use "sass:list"; 509$result: inspect(list.slash((), ())); 510a { 511 value: $result; 512 type: type-of($result); 513} 514 515<===> list/nested/empty/in_slash/unbracketed/output.css 516a { 517 value: () / (); 518 type: string; 519} 520 521<===> 522================================================================================ 523<===> list/nested/space/in_space/bracketed/options.yml 524--- 525:todo: 526- sass/libsass#2654 527 528<===> list/nested/space/in_space/bracketed/input.scss 529$result: inspect([(1 2) (3 4)]); 530a { 531 value: $result; 532 type: type-of($result); 533} 534 535<===> list/nested/space/in_space/bracketed/output.css 536a { 537 value: [(1 2) (3 4)]; 538 type: string; 539} 540 541<===> 542================================================================================ 543<===> list/nested/space/in_space/unbracketed/input.scss 544$result: inspect((1 2) (3 4)); 545a { 546 value: $result; 547 type: type-of($result); 548} 549 550<===> list/nested/space/in_space/unbracketed/output.css 551a { 552 value: (1 2) (3 4); 553 type: string; 554} 555 556<===> 557================================================================================ 558<===> list/nested/space/in_comma/bracketed/input.scss 559$result: inspect([1 2, 3 4]); 560a { 561 value: $result; 562 type: type-of($result); 563} 564 565<===> list/nested/space/in_comma/bracketed/output.css 566a { 567 value: [1 2, 3 4]; 568 type: string; 569} 570 571<===> 572================================================================================ 573<===> list/nested/space/in_comma/unbracketed/input.scss 574$result: inspect((1 2, 3 4)); 575a { 576 value: $result; 577 type: type-of($result); 578} 579 580<===> list/nested/space/in_comma/unbracketed/output.css 581a { 582 value: 1 2, 3 4; 583 type: string; 584} 585 586<===> 587================================================================================ 588<===> list/nested/space/in_slash/options.yml 589:todo: 590- sass/libsass#2887 591 592<===> 593================================================================================ 594<===> list/nested/space/in_slash/bracketed/input.scss 595$result: inspect(join([1 2, 3 4], (), $separator: slash)); 596a { 597 value: $result; 598 type: type-of($result); 599} 600 601<===> list/nested/space/in_slash/bracketed/output.css 602a { 603 value: [1 2 / 3 4]; 604 type: string; 605} 606 607<===> 608================================================================================ 609<===> list/nested/space/in_slash/unbracketed/input.scss 610@use "sass:list"; 611$result: inspect(list.slash(1 2, 3 4)); 612a { 613 value: $result; 614 type: type-of($result); 615} 616 617<===> list/nested/space/in_slash/unbracketed/output.css 618a { 619 value: 1 2 / 3 4; 620 type: string; 621} 622 623<===> 624================================================================================ 625<===> list/nested/comma/in_space/bracketed/options.yml 626--- 627:todo: 628- sass/libsass#2931 629 630<===> list/nested/comma/in_space/bracketed/input.scss 631$result: inspect([(1, 2) (3, 4)]); 632a { 633 value: $result; 634 type: type-of($result); 635} 636 637<===> list/nested/comma/in_space/bracketed/output.css 638a { 639 value: [(1, 2) (3, 4)]; 640 type: string; 641} 642 643<===> 644================================================================================ 645<===> list/nested/comma/in_space/unbracketed/options.yml 646--- 647:todo: 648- sass/libsass#2931 649 650<===> list/nested/comma/in_space/unbracketed/input.scss 651$result: inspect((1, 2) (3, 4)); 652a { 653 value: $result; 654 type: type-of($result); 655} 656 657<===> list/nested/comma/in_space/unbracketed/output.css 658a { 659 value: (1, 2) (3, 4); 660 type: string; 661} 662 663<===> 664================================================================================ 665<===> list/nested/comma/in_comma/bracketed/input.scss 666$result: inspect([(1, 2), (3, 4)]); 667a { 668 value: $result; 669 type: type-of($result); 670} 671 672<===> list/nested/comma/in_comma/bracketed/output.css 673a { 674 value: [(1, 2), (3, 4)]; 675 type: string; 676} 677 678<===> 679================================================================================ 680<===> list/nested/comma/in_comma/unbracketed/input.scss 681$result: inspect(((1, 2), (3, 4))); 682a { 683 value: $result; 684 type: type-of($result); 685} 686 687<===> list/nested/comma/in_comma/unbracketed/output.css 688a { 689 value: (1, 2), (3, 4); 690 type: string; 691} 692 693<===> 694================================================================================ 695<===> list/nested/comma/in_slash/options.yml 696:todo: 697- sass/libsass#2887 698 699<===> 700================================================================================ 701<===> list/nested/comma/in_slash/bracketed/input.scss 702$result: inspect(join([(1, 2), (3, 4)], (), $separator: slash)); 703a { 704 value: $result; 705 type: type-of($result); 706} 707 708<===> list/nested/comma/in_slash/bracketed/output.css 709a { 710 value: [(1, 2) / (3, 4)]; 711 type: string; 712} 713 714<===> 715================================================================================ 716<===> list/nested/comma/in_slash/unbracketed/input.scss 717@use "sass:list"; 718$result: inspect(list.slash((1, 2), (3, 4))); 719a { 720 value: $result; 721 type: type-of($result); 722} 723 724<===> list/nested/comma/in_slash/unbracketed/output.css 725a { 726 value: (1, 2) / (3, 4); 727 type: string; 728} 729 730<===> 731================================================================================ 732<===> list/nested/bracketed/in_space/bracketed/input.scss 733$result: inspect([[1, 2] [3, 4]]); 734a { 735 value: $result; 736 type: type-of($result); 737} 738 739<===> list/nested/bracketed/in_space/bracketed/output.css 740a { 741 value: [[1, 2] [3, 4]]; 742 type: string; 743} 744 745<===> 746================================================================================ 747<===> list/nested/bracketed/in_space/unbracketed/input.scss 748$result: inspect([1, 2] [3, 4]); 749a { 750 value: $result; 751 type: type-of($result); 752} 753 754<===> list/nested/bracketed/in_space/unbracketed/output.css 755a { 756 value: [1, 2] [3, 4]; 757 type: string; 758} 759 760<===> 761================================================================================ 762<===> list/nested/bracketed/in_comma/bracketed/input.scss 763$result: inspect([[1, 2], [3, 4]]); 764a { 765 value: $result; 766 type: type-of($result); 767} 768 769<===> list/nested/bracketed/in_comma/bracketed/output.css 770a { 771 value: [[1, 2], [3, 4]]; 772 type: string; 773} 774 775<===> 776================================================================================ 777<===> list/nested/bracketed/in_comma/unbracketed/input.scss 778$result: inspect(((1, 2), (3, 4))); 779a { 780 value: $result; 781 type: type-of($result); 782} 783 784<===> list/nested/bracketed/in_comma/unbracketed/output.css 785a { 786 value: (1, 2), (3, 4); 787 type: string; 788} 789 790<===> 791================================================================================ 792<===> list/nested/bracketed/in_slash/options.yml 793:todo: 794- sass/libsass#2887 795 796<===> 797================================================================================ 798<===> list/nested/bracketed/in_slash/bracketed/input.scss 799$result: inspect(join([[1, 2], [3, 4]], (), $separator: slash)); 800a { 801 value: $result; 802 type: type-of($result); 803} 804 805<===> list/nested/bracketed/in_slash/bracketed/output.css 806a { 807 value: [[1, 2] / [3, 4]]; 808 type: string; 809} 810 811<===> 812================================================================================ 813<===> list/nested/bracketed/in_slash/unbracketed/input.scss 814@use "sass:list"; 815$result: inspect(list.slash([1, 2], [3, 4])); 816a { 817 value: $result; 818 type: type-of($result); 819} 820 821<===> list/nested/bracketed/in_slash/unbracketed/output.css 822a { 823 value: [1, 2] / [3, 4]; 824 type: string; 825} 826 827<===> 828================================================================================ 829<===> map/number/input.scss 830$result: inspect((1: 2, 3: 4)); 831a { 832 value: $result; 833 type: type-of($result); 834} 835 836<===> map/number/output.css 837a { 838 value: (1: 2, 3: 4); 839 type: string; 840} 841 842<===> 843================================================================================ 844<===> map/list/key/space/input.scss 845$result: inspect((1 2: 3, 4 5: 6)); 846a { 847 value: $result; 848 type: type-of($result); 849} 850 851<===> map/list/key/space/output.css 852a { 853 value: (1 2: 3, 4 5: 6); 854 type: string; 855} 856 857<===> 858================================================================================ 859<===> map/list/key/comma/options.yml 860--- 861:todo: 862- sass/libsass#2932 863 864<===> map/list/key/comma/input.scss 865$result: inspect(((1, 2): 3, (4, 5): 6)); 866a { 867 value: $result; 868 type: type-of($result); 869} 870 871<===> map/list/key/comma/output.css 872a { 873 value: ((1, 2): 3, (4, 5): 6); 874 type: string; 875} 876 877<===> 878================================================================================ 879<===> map/list/value/space/input.scss 880$result: inspect((1: 2 3, 4: 5 6)); 881a { 882 value: $result; 883 type: type-of($result); 884} 885 886<===> map/list/value/space/output.css 887a { 888 value: (1: 2 3, 4: 5 6); 889 type: string; 890} 891 892<===> map/list/value/space/output-libsass.css 893a { 894 value: (1: (2 3), 4: (5 6)); 895 type: string; 896} 897 898<===> 899================================================================================ 900<===> map/list/value/comma/input.scss 901$result: inspect((1: (2, 3), 4: (5, 6))); 902a { 903 value: $result; 904 type: type-of($result); 905} 906 907<===> map/list/value/comma/output.css 908a { 909 value: (1: (2, 3), 4: (5, 6)); 910 type: string; 911} 912 913<===> 914================================================================================ 915<===> function/input.scss 916$result: inspect(get-function("get-function")); 917a { 918 value: $result; 919 type: type-of($result); 920} 921 922<===> function/output.css 923a { 924 value: get-function("get-function"); 925 type: string; 926} 927 928<===> 929================================================================================ 930<===> error/too_few_args/input.scss 931a {a: inspect()} 932 933<===> error/too_few_args/error 934Error: Missing argument $value. 935 ,--> input.scss 9361 | a {a: inspect()} 937 | ^^^^^^^^^ invocation 938 ' 939 ,--> sass:meta 9401 | @function inspect($value) { 941 | =============== declaration 942 ' 943 input.scss 1:7 root stylesheet 944 945<===> error/too_few_args/error-libsass 946Error: Function inspect is missing argument $value. 947 on line 1 of input.scss 948>> a {a: inspect()} 949 950 ------^ 951 952<===> 953================================================================================ 954<===> error/too_many_args/input.scss 955a {a: inspect(1, 2)} 956 957<===> error/too_many_args/error 958Error: Only 1 argument allowed, but 2 were passed. 959 ,--> input.scss 9601 | a {a: inspect(1, 2)} 961 | ^^^^^^^^^^^^^ invocation 962 ' 963 ,--> sass:meta 9641 | @function inspect($value) { 965 | =============== declaration 966 ' 967 input.scss 1:7 root stylesheet 968 969<===> error/too_many_args/error-libsass 970Error: wrong number of arguments (2 for 1) for `inspect' 971 on line 1:7 of input.scss 972>> a {a: inspect(1, 2)} 973 974 ------^ 975