Warning, /frameworks/syntax-highlighting/autotests/input/highlight.scss is written in an unsupported language. File is not indexed.

0001 /**
0002  * This is a pseudo SCSS file to test Kate's SCSS syntax highlighting.
0003  */
0004 
0005 /* Properties */
0006 
0007 body {
0008         font-size: 15pt;
0009         font-family: Verdana, Helvetica, "Bitstream Vera Sans", sans-serif;
0010         margin-top: 0px;                        /* yet another comment */
0011         margin-bottom: 0px;
0012         // this is no comment, it's just broken!
0013         background-color: hsl(0, 0%, calc(95% - 3%));
0014     font-family: "Droid Sans", Arial, sans-serif;
0015     font-size: 11pt;
0016     line-height: 1.5em;
0017     background: #fff000;
0018     text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
0019     box-sizing: border-box;
0020         font-variant-alternates: styleset(nice-style);
0021 }
0022 
0023 /* Selectors */
0024 
0025 body, blockquote {
0026     margin: 0;
0027 }
0028 
0029 header #logo {
0030     width: 100px;
0031 }
0032 
0033 div#footer .link {
0034     color: blue;
0035 }
0036 
0037 .something
0038 {
0039         margin-right: 0px;
0040         color: #cdd;
0041         color: #AAFE04;
0042         color: rgb(10%,30%,43%);
0043         background: maroon;
0044 }
0045 
0046 sidebar #subscribe .subscribe_form input[type="text"] {
0047     font-size: 20px;
0048 }
0049 
0050 sidebar #subscribe .subscribe_form:nth-child(2n + 1):hover input[class*="small-"] {
0051     font-weight: bold;
0052 }
0053 
0054 input[value=text]
0055 input[value= text ]
0056 input[value= text i]
0057 input[value= "text" i]
0058 input[value=i]
0059 input[value= i] {
0060     font-size: 20px;
0061 }
0062 
0063 #header,
0064 a:hover,
0065 p.intro:first-letter,
0066 p:lang(nl),
0067 img[align="right"]
0068 {
0069         border: 1px solid Qt::red !important;
0070         -moz-border-radius: 15px; /* unknown properties render italic */
0071 }
0072 
0073 .nice-look {
0074 }
0075 
0076 ul {
0077         list-style: thumbs;
0078 }
0079 
0080 /* SVG <a> */
0081 svg|a {}
0082 
0083 /* XHTML and SVG <a> */
0084 *|a {}
0085 
0086 *{}
0087 .class{}
0088 #id{}
0089 :hover{}
0090 :lang(fr){}
0091 E{}
0092 E F{}
0093 E>F{}
0094 E > F{}
0095 E~F{}
0096 E ~ F{}
0097 E:first-child{}
0098 E:visited{}
0099 E::after{}
0100 E:lang(c){}
0101 E:lang(fr-ca){}
0102 E + F{}
0103 E+F{}
0104 E[foo]{}
0105 E[foo=warning]{}
0106 E[foo="warning"]{}
0107 E[foo~="warning"]{}
0108 E[foo^="warning"]{}
0109 E[foo$="warning"]{}
0110 E[foo*="warning"]{}
0111 E[lang|="en"]{}
0112 DIV.warning{}
0113 DIV .warning{}
0114 E#myid{}
0115 E #myid{}
0116 E,E{}
0117 E, E{}
0118 E ,E{}
0119 E , E{}
0120 
0121 p:nth-child(2) {
0122         background: red;
0123 }
0124 
0125 /* Elements that are not <div> or <span> elements */
0126 body :not(div):not(span) {
0127         font-weight: bold;
0128 }
0129 
0130 /* Elements that are not `.crazy` or `.fancy` */
0131 /* Note that this syntax is not well supported yet. */
0132 body :not(.crazy, .fancy) {
0133         font-family: sans-serif;
0134 }
0135 
0136 :nth-child(odd) { color: lime; }
0137 :nth-child(even) { color: lime; }
0138 :nth-child(4) { color: lime; }
0139 :nth-child(4n) { color: lime; }
0140 :nth-child(3n+4) { color: lime; }
0141 :nth-child(-n+3) { color: lime; }
0142 :nth-child(n+8):nth-child(-n+15) { color: lime; }
0143 
0144 .first span:nth-child(2n+1),
0145 .second span:nth-child(2n+1),
0146 .third span:nth-of-type(2n+1) {
0147         background-color: lime;
0148         unknown-property: lime;
0149 }
0150 
0151 :root{
0152         --foo: if(x > 5) this.width = 10; /* valid custom property, invalid in any normal property */
0153 }
0154 
0155 :root,
0156 :root:lang(en) {--external-link: "external link";}
0157 :root:lang(de) {--external-link: "externer Link";}
0158 
0159 a[href^="http"]::after {content: " (" var(--external-link) ")"}
0160 
0161 one   { --foo: 10px; }
0162 two   { --bar: calc(var(--foo) + 10px); }
0163 three { --foo: calc(var(--bar) + 10px); }
0164 .foo {
0165         --gap: 20;
0166         margin-top: var(--gap)px; /*20 px*/
0167         margin-top: calc(var(--gap) * 1px); /*20px*/
0168 }
0169 
0170 foo {
0171         width: calc(50% -8px); /* invalid */
0172         width: calc(50%- 8px); /* invalid */
0173         width: calc(50% +8px); /* invalid */
0174         width: calc(50%+ 8px); /* invalid */
0175         width: calc(2px -var(--a)); /* invalid */
0176         width: calc(50%*-8px);
0177         width: calc(50% - 8px);
0178         width: calc(50% + -8px);
0179         width: calc(50% +(8px));
0180         width: calc(2px -(var(--a)));
0181 }
0182 
0183 sweet-alert input:focus::-moz-placeholder {
0184         -webkit-transition: opacity 0.3s 0.03s ease;
0185         transition: opacity 0.3s 0.03s ease;
0186         opacity: 0.5;
0187 }
0188 
0189 
0190 @font-feature-values Font One {
0191         @styleset {
0192                 nice-style: 12;
0193         }
0194 }
0195 
0196 @font-feature-values Font Two {
0197         @styleset {
0198                 nice-style: 4;
0199         }
0200 }
0201 
0202 @font-palette-values --identifier {
0203   font-family: Bixa;
0204 }
0205 
0206 @counter-style thumbs {
0207         system: cyclic;
0208         symbols: "\1F44D";
0209         suffix: " ";
0210 }
0211 
0212 @font-face {
0213         font-family: "Open Sans";
0214         /* comments */
0215         unknown: 2px;
0216         src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
0217         url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
0218 }
0219 
0220 @page {
0221         margin: 1cm;
0222 }
0223 
0224 @page :first {
0225         margin: 2cm;
0226         /* comments */
0227         marks: crop cross;
0228 }
0229 
0230 @page :unknown {
0231         margin: 2cm;
0232 }
0233 
0234 @document url("https://www.example.com/") {
0235         h1 {
0236                 color: green;
0237         }
0238 }
0239 
0240 @charset "UTF-8";
0241 
0242 @import 'custom.css';
0243 @import "common.css" screen;
0244 @import url("fineprint.css") print;
0245 @import url(fineprint.css) print;
0246 @import url('bluish.css') speech;
0247 @import url("chrome://communicator/skin/");
0248 @import url('landscape.css') screen and (orientation:landscape);
0249 @import url("othersheet.css") screen, print;
0250 
0251 @namespace url(http://www.w3.org/1999/xhtml);
0252 @namespace svg url(http://www.w3.org/2000/svg);
0253 
0254 /* Animation (Keyframes) */
0255 
0256 @keyframes important1 {
0257         from { margin-top: 50px; }
0258         50%  { margin-top: 150px !important; } /* ignored */
0259         to   { margin-top: 100px; }
0260 }
0261 
0262 @keyframes important2 {
0263         from { margin-top: 50px;
0264                 margin-bottom: 100px; }
0265         to   { margin-top: 150px !important; /* ignored */
0266                 margin-bottom: 50px; }
0267 }
0268 
0269 @keyframes slidein {
0270         from {
0271                 margin-left: 100%;
0272                 width: 300%;
0273         }
0274 
0275         to {
0276                 margin-left: 0%;
0277                 width: 100%;
0278         }
0279 }
0280 
0281 /* Media Queries */
0282 
0283 @media print {
0284     .container {
0285         width: 100%;
0286     }
0287         a:hover { color: red }
0288         /* comments */
0289         a:hover { color: red }
0290 
0291         #header
0292         {
0293                 display: none;
0294         }
0295 }
0296 
0297 @media screen and (orientation: landscape) {
0298   .sidebar {
0299     width: 500px; } }
0300 
0301 @media screen and (min-width: 768px) and (max-width: 960px) {
0302     .container {
0303         width: 720px;
0304     }
0305 }
0306 
0307 @media (max-width: 600px) {
0308         .sidebar {
0309                 display: none;
0310         }
0311 }
0312 
0313 @media print {
0314 }
0315 
0316 @media (height > 600px) {
0317   body {
0318     line-height: 1.4;
0319   }
0320 }
0321 
0322 @media (400px <= width <= 700px) {
0323   body {
0324     line-height: 1.4;
0325   }
0326 }
0327 
0328 @supports (display: grid) {
0329         div {
0330                 display: grid;
0331         }
0332 }
0333 
0334 @supports font-tech(color-COLRv1) {
0335   div {}
0336 }
0337 
0338 @supports not (not (transform-origin: 2px)) {
0339   div {}
0340 }
0341 
0342 @supports (display: grid) and (not (display: inline-grid)) {
0343   div {}
0344 }
0345 
0346 /*
0347  * CSS Syntax Highlight Sample File (Standard)
0348  *
0349  * This file contains most CSS syntax, CSS3 properties, @media, @font-face and
0350  * @keyframes annotations.
0351  *
0352  * @author  Guo Yunhe guoyunhebrave@gmail.com
0353  * @date    2016-09-16
0354  */
0355 
0356 /*
0357  * Block comment
0358  *
0359  * Alert keywords:
0360  * TODO BUG FIXME
0361  */
0362 
0363 
0364 /* Region markers */
0365 
0366 /*BEGIN Comment */
0367 
0368 
0369 /*END Comment */
0370 
0371 /*
0372  * CSS Syntax Highlight Sample File (Complex)
0373  *
0374  * This file contains complex CSS syntax that can test unexpected situations.
0375  *
0376  * @author  Guo Yunhe guoyunhebrave@gmail.com
0377  * @date    2016-09-16
0378  */
0379 
0380 
0381 /* Comments with special content */
0382 
0383 /*
0384  * .class-selector #id "string" 'comment' // comment {} [] ()  /* comment
0385  * TODO BUG DEBUG
0386  * body {
0387  *    margin: 0 !important;
0388  * }
0389  */
0390 
0391 /* Comments in special positions */
0392 
0393 header/* comment here */.active /* comment here */ {
0394     /* comment here */ color : /* comment here */ blue/* comment here */;
0395     font-family: Arial /* comment here */,
0396         "Droid Sans", /* comment here */
0397         sans-serif/* comment here */;
0398 }
0399 
0400 @media screen /* comment here */ and (max-width: 300px /* comment here */) /* comment here */ {/* comment here */}
0401 
0402 
0403 /* Strings with special content */
0404 
0405 @import url("{} $variable /* comment */");
0406 
0407 
0408 /* Without extra breaklines and spaces */
0409 
0410 pre.primary:hover.large:nth-child(2n-1){font-size:17px;font-family:"Noto Sans";-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.3)}
0411 
0412 
0413 /* With unnecessary breaklines and spaces */
0414 
0415 blockquote .ref
0416     {
0417              flex : 0 1 30%;
0418         flex-wrap : wrap;
0419     }
0420 
0421 @media screen and (orientation: landscape) {
0422   .sidebar {
0423     width: 500px; } }
0424 
0425 
0426 
0427 /* Special selectors: HTML5 allows user defined tags */
0428 
0429 header {
0430     flex {
0431         width: 300px;
0432     }
0433 }
0434 
0435 /* CSS Nesting */
0436 
0437 header {
0438     .abc {
0439         width: 300px;
0440     }
0441     width: 300px;
0442     & width:hover {
0443         width: 300px;
0444     }
0445     width: 300px;
0446 }
0447 
0448 
0449 /**
0450  * SCSS https://sass-lang.com/documentation/file.SASS_REFERENCE.html
0451  */
0452 // These comments are only one line long each.
0453 // They won't appear in the CSS output,
0454 // since they use the single-line comment syntax.
0455 
0456 #sidebar { width: grid-width(5); }
0457 
0458 #main {
0459   content: $content;
0460   new-content: $new_content;
0461 }
0462 
0463 #main {
0464   $width: 5em !global;
0465   width: $width;
0466 }
0467 
0468 #main {
0469   @import "example";
0470 }
0471 
0472 #main {
0473   color: black;
0474   &-sidebar { border: 1px solid; }
0475 }
0476 
0477 #main p {
0478   color: #00ff00;
0479   width: 97%;
0480 
0481   .redbox {
0482     background-color: #ff0000;
0483     color: #000000;
0484   }
0485 }
0486 
0487 #main {
0488   color: black;
0489   a {
0490     font-weight: bold;
0491     &:hover { color: red; }
0492   }
0493 }
0494 
0495 .sidebar {
0496   float: left;
0497   margin-left: pow(4, 3) * 1px;
0498 }
0499 
0500 .banner {
0501   background-color: $primary-color;
0502   color: scale-color($primary-color, $lightness: +40%);
0503 }
0504 
0505 .micro {
0506   width: sum(50px, 30px, 100px);
0507   width: min($widths...);
0508 }
0509 
0510 a.funky:hover {
0511   font: 20px/24px fantasy {
0512     weight: bold;
0513   }
0514 }
0515 
0516 .foo.bar .baz.bang, .bip.qux {
0517     $selector: &;
0518 }
0519 
0520 ul, ol {
0521   text-align: left;
0522 
0523   & & {
0524     padding: {
0525       bottom: 0;
0526       left: 0;
0527     }
0528   }
0529 
0530   font-size: scale-below(20px, 16px);
0531   border-radius: $border-radius;
0532   box-shadow: $box-shadow;
0533 }
0534 
0535 ul li {
0536   $padding: 16px;
0537   padding-left: $padding;
0538   [dir=rtl] & {
0539     padding: {
0540       left: 0;
0541       right: $padding;
0542     }
0543   }
0544 }
0545 
0546 div {
0547   background-image: url("/icons/#{$name}.svg");
0548   font: #{"string"};
0549 }
0550 
0551 p {
0552   font: 10px/8px;             // Plain CSS, no division
0553   $width: 1000px;
0554   width: $width/2;            // Uses a variable, does division
0555   width: round(1.5)/2;        // Uses a function, does division
0556   height: (500px/2);          // Uses parentheses, does division
0557   margin-left: 5px + 8px/2px; // Uses +, does division
0558   font: (italic bold 10px/8px); // In a list, parentheses don't count
0559 }
0560 
0561 p {
0562   $font-size: 12px;
0563   $line-height: 30px;
0564   font: #{$font-size}/#{$line-height};
0565 }
0566 
0567 p {
0568   color: #010203 + #040506;
0569   color: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75);
0570 }
0571 
0572 p {
0573   color: opacify($translucent-red, 0.3);
0574   background-color: transparentize($translucent-red, 0.25);
0575 }
0576 
0577 div {
0578   filter: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}');
0579 }
0580 
0581 p {
0582   cursor: e + -resize;
0583 }
0584 
0585 p {
0586   width: 1em + (2em * 3);
0587   width: #{$n}px;
0588 }
0589 
0590 p {
0591   color: hsl($hue: 0, $saturation: 100%, $lightness: 50%);
0592 }
0593 
0594 :root {
0595   --font-family-sans-serif: #{inspect($font-family-sans-serif)};
0596   --font-family-monospace: #{inspect($font-family-monospace)};
0597 }
0598 
0599 p:before {
0600   font-family: sans- + "serif";
0601   content: "Foo " + Bar;
0602   content: "I ate #{5 + 10} pies!";
0603   content: "I ate #{$value} pies!";
0604 }
0605 
0606 a {
0607   font-weight: bold;
0608   text-decoration: none;
0609   &:hover { text-decoration: underline; }
0610   body.firefox & { font-weight: normal; }
0611 }
0612 
0613 
0614 #context a%extreme a %extreme {
0615   color: blue;
0616   font-weight: bold;
0617   font-size: 2em;
0618 }
0619 
0620 %strong-alert:hover {
0621   color: red;
0622 }
0623 .alert:hover, %strong-alert {
0624   font-weight: bold;
0625 }
0626 
0627 
0628 p.#{$name} {
0629   #{$attr}-color: blue;
0630 }
0631 
0632 p {
0633     background: {
0634         color: red;
0635     }
0636     background-#{prop}: red;
0637     #{prop}-color: red;
0638 
0639     #a#{""}c .a#{""}c a#{""}c {
0640     }
0641 }
0642 
0643 .icon-#{$name} {
0644   position: absolute;
0645   #{$top-or-bottom}: 0;
0646   -#{$prefix}-#{$property}: $value;
0647   .icon-#{$name} {
0648     position: absolute;
0649     #{$top-or-bottom}: 0;
0650     -#{$prefix}-#{$property}-image: $value
0651   }
0652 }
0653 
0654 
0655 @mixin firefox-message($selector) {
0656   body.firefox #{$selector}:before {
0657     content: "Hi, Firefox users!";
0658   }
0659 }
0660 
0661 @mixin clearfix {
0662   display: inline-block;
0663   &:after {
0664     content: ".";
0665     display: block;
0666   }
0667   * html & { height: 1px }
0668 }
0669 
0670 @mixin apply-to-ie6-only {
0671   * html {
0672     @content;
0673   }
0674 }
0675 
0676 @mixin highlighted-background { background-color: #fc0; }
0677 
0678 @mixin sexy-border($color, $width) {
0679   border: {
0680     color: $color;
0681     width: $width;
0682     style: dashed;
0683   }
0684   color: #ff0000;
0685 }
0686 
0687 @mixin border-radius($radius) {
0688   -webkit-border-radius: $radius;
0689      -moz-border-radius: $radius;
0690       -ms-border-radius: $radius;
0691           border-radius: $radius;
0692 }
0693 
0694 @mixin define-emoji($name, $glyph) {
0695   span.emoji-#{$name} {
0696     font-family: IconFont;
0697   }
0698 }
0699 
0700 @mixin styles {
0701   code {
0702     border-radius: $-border-radius;
0703     box-shadow: -box-shadow();
0704   }
0705 }
0706 
0707 @mixin rtl($property, $ltr-value, $rtl-value) {
0708   #{$property}: $ltr-value;
0709 
0710   [dir=rtl] & {
0711     #{$property}: $rtl-value;
0712   }
0713 }
0714 
0715 @mixin replace-text($image, $x: 50%, $y: 50%) {
0716   text-indent: -99999em;
0717   overflow: hidden;
0718   text-align: left;
0719 
0720   background: {
0721     image: $image;
0722     repeat: no-repeat;
0723     position: $x $y;
0724   }
0725 }
0726 
0727 @mixin btn($args...) {
0728   @warn "The btn() mixin is deprecated. Include button() instead.";
0729   @import url("http://fonts.googleapis.com/css?family=#{$family}");
0730   @include button($args...);
0731 }
0732 
0733 @mixin hover {
0734   &:not([disabled]):hover {
0735     @content;
0736   }
0737 }
0738 
0739 @mixin adjust-location($x, $y) {
0740   @if unitless($x) {
0741     @error "$x may not be unitless, was #{$x}.";
0742     @warn "Assuming #{$x} to be in pixels";
0743     $x: 1px * $x;
0744   }
0745   @if unitless($y) {
0746     @error "$y may not be unitless, was #{$y}.";
0747     @warn "Assuming #{$y} to be in pixels";
0748     $y: 1px * $y;
0749   }
0750   position: relative; left: $x; top: $y;
0751 }
0752 
0753 @mixin avatar($size, $circle: false) {
0754   width: $size;
0755   height: $size;
0756 
0757   @if $circle != 0 {
0758     border-radius: math.div($size, 2);
0759   }
0760 }
0761 
0762 @mixin theme-colors($light-theme: true) {
0763   @if $light-theme {
0764     background-color: $light-background;
0765     color: $light-text;
0766   } @else {
0767     background-color: $dark-background;
0768     color: $dark-text;
0769   }
0770 }
0771 
0772 @mixin configure($black: null, $border-radius: null, $box-shadow: null) {
0773   @if $black {
0774     $-black: $black !global;
0775   }
0776   @if $border-radius {
0777     $-border-radius: $border-radius !global;
0778   }
0779 }
0780 
0781 @mixin does-parent-exist {
0782     @if & {
0783         &:hover {
0784             color: red;
0785         }
0786     } @else {
0787         a {
0788             color: red;
0789         }
0790     }
0791 }
0792 
0793 @mixin order($height, $selectors...) {
0794   @for $i from 0 to length($selectors) {
0795     #{nth($selectors, $i + 1)} {
0796       position: absolute;
0797       height: $height;
0798       margin-top: $i * $height;
0799     }
0800   }
0801 }
0802 
0803 @mixin syntax-colors($args...) {
0804   @debug meta.keywords($args);
0805   // (string: #080, comment: #800, variable: #60b)
0806 
0807   @each $name, $color in meta.keywords($args) {
0808     pre span.stx-#{$name} {
0809       color: $color;
0810     }
0811   }
0812 }
0813 
0814 @mixin media($types...) {
0815   @each $type in $types {
0816     @media #{$type} {
0817       @content($type);
0818     }
0819   }
0820 }
0821 
0822 @mixin reflexive-position($property, $value) {
0823   @if $property != left and $property != right {
0824     @error "Property #{$property} must be either left or right.";
0825   }
0826 
0827   $left-value: if($property == right, initial, $value);
0828   $right-value: if($property == right, $value, initial);
0829 
0830   left: $left-value;
0831   right: $right-value;
0832   [dir=rtl] & {
0833     left: $right-value;
0834     right: $left-value;
0835   }
0836 }
0837 
0838 @mixin prefix($property, $value, $prefixes) {
0839   @each $prefix in $prefixes {
0840     @if not index($known-prefixes, $prefix) {
0841       @warn "Unknown prefix #{$prefix}.";
0842     }
0843 
0844     -#{$prefix}-#{$property}: $value;
0845   }
0846   #{$property}: $value;
0847 }
0848 
0849 @mixin inset-divider-offset($offset, $padding) {
0850   $divider-offset: (2 * $padding) + $offset;
0851   @debug "divider offset: #{$divider-offset}";
0852 
0853   margin-left: $divider-offset;
0854   width: calc(100% - #{$divider-offset});
0855 }
0856 
0857 
0858 @mixin sticky-position {
0859   position: fixed;
0860   @supports (position: sticky) {
0861     position: sticky;
0862   }
0863 }
0864 
0865 
0866 @at-root (without: media) {
0867     color: #111;
0868 }
0869 @at-root (with: rule) {
0870     font-size: 1.2em;
0871 }
0872 
0873 @mixin unify-parent($child) {
0874   @at-root #{selector.unify(&, $child)} {
0875     @content;
0876   }
0877   @at-root #{selector-unify(&, $child)} {
0878     @content;
0879   }
0880 }
0881 
0882 @media print {
0883   .page {
0884     width: 8in;
0885     @at-root (without: media) {
0886       color: red;
0887     }
0888   }
0889 }
0890 
0891 .sidebar {
0892   width: 300px;
0893   @media screen and (orientation: landscape) {
0894     width: 500px;
0895   }
0896 }
0897 
0898 @media screen {
0899   .sidebar {
0900     @media (orientation: landscape) {
0901       width: 500px;
0902     }
0903   }
0904 }
0905 
0906 @media (min-width: $layout-breakpoint-small) {
0907   .hide-extra-small {
0908     display: none;
0909   }
0910 }
0911 
0912 @media (hover: hover) {
0913   .button:hover {
0914     border: 2px solid black;
0915 
0916     @media (color) {
0917       border-color: #036;
0918     }
0919   }
0920 }
0921 
0922 @media #{$media} and ($feature: $value) {
0923   .sidebar {
0924     width: 500px;
0925   }
0926 }
0927 
0928 
0929 @extend .error;
0930 
0931 .hoverlink {
0932   @extend a:hover;
0933   @extend %extreme;
0934   @extend .message;
0935   @extend .notice !optional;
0936   border-width: 3px;
0937 }
0938 
0939 .error {
0940   border: 1px #f00;
0941   background-color: #fdd;
0942 
0943   &--serious {
0944     @extend .error;
0945     border-width: 3px;
0946   }
0947 }
0948 
0949 
0950 p {
0951   @if 1 + 1 == 2 { border: 1px solid;  }
0952   @if 5 < 3      { border: 2px dotted; }
0953   @if null       { border: 3px double; }
0954 }
0955 
0956 p {
0957   @if $type == ocean {
0958     color: blue;
0959   } @else if $type == matador {
0960     color: red;
0961   } @else if $type == monster {
0962     color: green;
0963   } @else {
0964     color: black;
0965   }
0966 }
0967 
0968 
0969 @each $animal in puma, sea-slug, egret, salamander {
0970   .#{$animal}-icon {
0971     background-image: url('/images/#{$animal}.png');
0972   }
0973 }
0974 
0975 @each $name, $glyph in $icons {
0976   .icon-#{$name}:before {
0977     display: inline-block;
0978     font-family: "Icon Font";
0979     content: $glyph;
0980   }
0981 }
0982 
0983 @each $size in $sizes {
0984   .icon-#{$size} {
0985     font-size: $size;
0986     height: $size;
0987     width: $size;
0988   }
0989 }
0990 
0991 @each $animal, $color, $cursor in (puma, black, default),
0992                                   (sea-slug, blue, pointer),
0993                                   (egret, white, move) {
0994   .#{$animal}-icon {
0995     background-image: url('/images/#{$animal}.png');
0996     border: 2px solid $color;
0997     cursor: $cursor;
0998   }
0999 }
1000 
1001 @each $header, $size in (h1: 2em, h2: 1.5em, h3: 1.2em) {
1002   #{$header} {
1003     font-size: $size;
1004   }
1005 }
1006 
1007 
1008 @for $i from 1 through 3 {
1009   .item-#{$i} { width: 2em * $i; }
1010 }
1011 
1012 @for $i from 1 to 3 {
1013   ul:nth-child(3n + #{$i}) {
1014     background-color: lighten($base-color, $i * 5%);
1015   }
1016 }
1017 
1018 
1019 @while $i > 0 {
1020   .item-#{$i} { width: 2em * $i; }
1021   $i: $i - 2;
1022 }
1023 
1024 
1025 @include order(150px, $form-selectors...);
1026 @include order(150px, "input.name", "input.address", "input.zip");
1027 @include unify-parent("input") { }
1028 @include google-font("Droid Sans");
1029 @include library.styles;
1030 @include library.configure(
1031   $black: #222,
1032   $border-radius: 0.1rem
1033 );
1034 @include firefox-message(".header");
1035 @include apply-to-ie6-only {
1036   #logo {
1037     background-image: url(/logo.gif);
1038   }
1039 }
1040 
1041 @include media(screen, print) using ($type) {
1042   h1 {
1043     font-size: 40px;
1044     @if $type == print {
1045       font-family: Calluna;
1046     }
1047   }
1048 }
1049 
1050 p { @include sexy-border(blue, 1in); }
1051 h1 { @include sexy-border($color: blue, $width: 2in); }
1052 nav ul {
1053   @include corners.rounded;
1054   padding: 5px + corners.$radius;
1055   @include horizontal-list;
1056   @include rtl(float, left, right);
1057   @include hover {
1058     border-width: 2px;
1059   }
1060   @include replace-text(url("/images/mail.svg"), 0);
1061   @include square(100px, $radius: 4px);
1062   // Oops, we typo'd "webkit" as "wekbit"!
1063   @include prefix(transform, rotate(15deg), wekbit ms);
1064 }
1065 
1066 .primary {
1067   @include colors($value-map...);
1068 }
1069 .box { @include border-radius(10px); }
1070 
1071 .wrapper .field {
1072   @include unify-parent("input") {
1073     /* ... */
1074   }
1075   @include unify-parent("select") {
1076     /* ... */
1077   }
1078 }
1079 
1080 .banner {
1081   @include theme-colors($light-theme: true);
1082   body.dark & {
1083     @include theme-colors($light-theme: false);
1084   }
1085 }
1086 
1087 
1088 
1089 @function grid-width($n) {
1090   @return $n * $grid-width + ($n - 1) * $gutter-width;
1091 }
1092 
1093 @function scale-below($value, $base, $ratio: 1.618) {
1094   @while $value > $base {
1095     $value: math.div($value, $ratio);
1096   }
1097   @return $value;
1098 }
1099 
1100 /// If the user has configured `$-box-shadow`, returns their configured value.
1101 /// Otherwise returns a value derived from `$-black`.
1102 @function -box-shadow() {
1103   @return $-box-shadow or (0 0.5rem 1rem rgba($-black, 0.15));
1104 }
1105 
1106 @function pow($base, $exponent) {
1107   $result: 1;
1108   @for $_ from 1 through $exponent {
1109     $result: $result * $base;
1110   }
1111   @return $result;
1112 }
1113 
1114 @function invert($color, $amount: 100%) {
1115   $inverse: change-color($color, $hue: hue($color) + 180);
1116   @return mix($inverse, $color, $amount);
1117 }
1118 
1119 @function sum($numbers...) {
1120   $sum: 0;
1121   @each $number in $numbers {
1122     $sum: $sum + $number;
1123   }
1124   @return $sum;
1125 }
1126 
1127 @function fg($args...) {
1128   @warn "The fg() function is deprecated. Call foreground() instead.";
1129   @return foreground($args...);
1130 }
1131 
1132 @function str-insert($string, $insert, $index) {
1133   // Avoid making new strings if we don't need to.
1134   @if string.length($string) == 0 {
1135     @return $insert;
1136   }
1137 
1138   $before: string.slice($string, 0, $index);
1139   $after: string.slice($string, $index);
1140   @return $before + $insert + $after;
1141 }
1142 
1143 
1144 // Variable define
1145 
1146 $image-path:            "../../static/images";
1147 $-text-color:    #333 !default; // Default can be overrided
1148 $default-font-size:     16px !default;
1149 $default-font-family:   Roboto, "Droid Sans", sans-serif;
1150 $default-font-weight:   400;
1151 $default-line-height:   $default-font-size * 1.8;
1152 $shadow-transparence:   0.25;
1153 $box-shadow:            0 0 3px rgba(0,0,0,$shadow-transparence);
1154 $page-width:            100rem; // kabab-case
1155 $gapOfArticle:          20px;   // camelCase
1156 $body_background_color: white;  // snake_case
1157 $-box-shadow: null;
1158 $sizes: 40px, 50px, 80px;
1159 $icons: ("eye": "\f112", "start": "\f12e", "stop": "\f12f");
1160 $value-map: (text: #00ff00, background: #0000ff, border: #ff0000);
1161 $map: (key1: value1, key2: value2, key3: value3);
1162 $icons:
1163   "eye" "\f112" 12px,
1164   "start" "\f12e" 16px,
1165   "stop" "\f12f" 10px;
1166 $known-prefixes: webkit, moz, ms, o;
1167 $primary-color: #036;
1168 $form-selectors: "input.name", "input.address", "input.zip" !default;
1169 $color1: hsl(120deg, 100%, 50%);
1170 $color2: rgb($red, $green, blue($color1));
1171 $color3: mix($color1, $color2, [$weight]);
1172 $translucent-red: rgba(255, 0, 0, 0.5);
1173 $name: foo;
1174 $attr: border;
1175 $media: screen;
1176 $feature: -webkit-min-device-pixel-ratio;
1177 $value: 1.5;
1178 $values: #ff0000, #00ff00, #0000ff;
1179 library.$color: blue;
1180 
1181 
1182 // Nesting
1183 
1184 #home-page {
1185 
1186     header {
1187         width: 80%;
1188         margin: 0 auto;
1189 
1190         .cover {
1191             @include border-radius(20px);
1192             max-width: 100%;
1193 
1194             &:hover {
1195                 background: #ffffff;
1196             }
1197 
1198             .like-button {
1199                 font-size: $default-font-size * 0.8;
1200 
1201                 @media (max-width: 300px) and (min-width: 200px) {
1202                     font-size: $default-font-size * 0.8;
1203 
1204                     .icon {
1205                         width: 20px;
1206                         height: 20px;
1207                     }
1208                 }
1209 
1210                 @media print {
1211                     display: none;
1212                 }
1213             }
1214         }
1215     }
1216 }
1217 
1218 
1219 @use "sass:selector";
1220 @use 'library';
1221 @use "src/corners" as *;
1222 @use "src/corners" as c;
1223 @use 'opinionated' with ($black: #333);
1224 @use 'library' with (
1225   $black: #222,
1226   $border-radius: 0.1rem
1227 );
1228 
1229 @forward "src/list" hide list-reset, $horizontal-list-gap;
1230 @forward "src/list" as list-*;
1231 @forward 'library' with (
1232     $black: #222 !default,
1233     $border-radius: 0.1rem !default
1234 );
1235 
1236 @import url("http://fonts.googleapis.com/css?family=#{$family}");
1237 @import 'foundation/code', 'foundation/lists';
1238 @import "http://fonts.googleapis.com/css?family=Droid+Sans";
1239 
1240 @error "Property #{$property} must be either left or right.";
1241 @error var(--abcd);
1242 
1243 @debug 10em + 12em;
1244 @debug library.$color;  //=> blue
1245 @debug radial-gradient($primary, $accent); // radial-gradient(#f2ece4, #e1d7d2)
1246 @debug -webkit-flex; // -webkit-flex
1247 
1248 
1249 @keyframes slide-in {
1250   from {
1251     margin-left: 100%;
1252     width: 300%;
1253   }
1254 
1255   #{$x}% {
1256     margin-left: 90%;
1257     width: 150%;
1258   }
1259 
1260   70% {
1261     margin-left: 90%;
1262     width: 150%;
1263   }
1264 }