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 @import url("othersheet.css") screen, tv; 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 margin-left: 0px; 0013 margin-right: 0px; 0014 } 0015 0016 .something 0017 { 0018 margin-right: 0px; 0019 color: #cdd; 0020 color: #AAFE04; 0021 color: rgb(10%,30%,43%); 0022 background: maroon; 0023 } 0024 0025 a:hover { 0026 } 0027 0028 #header, 0029 p.intro:first-letter, 0030 p:lang(nl), 0031 img[align="right"] 0032 { 0033 border: 1px solid Qt::red !important; 0034 -moz-border-radius: 15px; /* unknown properties render italic */ 0035 } 0036 0037 @media print { 0038 0039 #header 0040 { 0041 display: none; 0042 } 0043 0044 } 0045 0046 /* 0047 TODO: add more tests, e.g. media 0048 */ 0049 0050 0051 .nice-look { 0052 font-variant-alternates: styleset(nice-style); 0053 } 0054 0055 ul { 0056 list-style: thumbs; 0057 } 0058 0059 /* SVG <a> */ 0060 svg|a {} 0061 0062 /* XHTML and SVG <a> */ 0063 *|a {} 0064 0065 *{} 0066 .class{} 0067 #id{} 0068 :hover{} 0069 :lang(fr){} 0070 E{} 0071 E F{} 0072 E>F{} 0073 E > F{} 0074 E~F{} 0075 E ~ F{} 0076 E:first-child{} 0077 E:visited{} 0078 E::after{} 0079 E:lang(c){} 0080 E:lang(fr-ca){} 0081 E + F{} 0082 E+F{} 0083 E[foo]{} 0084 E[foo=warning]{} 0085 E[foo="warning"]{} 0086 E[foo~="warning"]{} 0087 E[foo^="warning"]{} 0088 E[foo$="warning"]{} 0089 E[foo*="warning"]{} 0090 E[lang|="en"]{} 0091 DIV.warning{} 0092 DIV .warning{} 0093 E#myid{} 0094 E #myid{} 0095 E,E{} 0096 E, E{} 0097 E ,E{} 0098 E , E{} 0099 0100 p:nth-child(2) { 0101 background: red; 0102 } 0103 0104 /* Elements that are not <div> or <span> elements */ 0105 body :not(div):not(span) { 0106 font-weight: bold; 0107 } 0108 0109 /* Elements that are not `.crazy` or `.fancy` */ 0110 /* Note that this syntax is not well supported yet. */ 0111 body :not(.crazy, .fancy) { 0112 font-family: sans-serif; 0113 } 0114 0115 :nth-child(odd) { color: lime; } 0116 :nth-child(even) { color: lime; } 0117 :nth-child(4) { color: lime; } 0118 :nth-child(4n) { color: lime; } 0119 :nth-child(3n+4) { color: lime; } 0120 :nth-child(-n+3) { color: lime; } 0121 :nth-child(n+8):nth-child(-n+15) { color: lime; } 0122 0123 .first span:nth-child(2n+1), 0124 .second span:nth-child(2n+1), 0125 .third span:nth-of-type(2n+1) { 0126 background-color: lime; 0127 unknown-property: lime; 0128 } 0129 0130 :root{ 0131 --foo: if(x > 5) this.width = 10; /* valid custom property, invalid in any normal property */ 0132 } 0133 0134 :root, 0135 :root:lang(en) {--external-link: "external link";} 0136 :root:lang(de) {--external-link: "externer Link";} 0137 0138 a[href^="http"]::after {content: " (" var(--external-link) ")"} 0139 0140 one { --foo: 10px; } 0141 two { --bar: calc(var(--foo) + 10px); } 0142 three { --foo: calc(var(--bar) + 10px); } 0143 .foo { 0144 --gap: 20; 0145 margin-top: var(--gap)px; /*20 px*/ 0146 margin-top: calc(var(--gap) * 1px); /*20px*/ 0147 } 0148 0149 foo { 0150 width: calc(50% -8px); /* invalid */ 0151 width: calc(50%- 8px); /* invalid */ 0152 width: calc(50% +8px); /* invalid */ 0153 width: calc(50%+ 8px); /* invalid */ 0154 width: calc(2px -var(--a)); /* invalid */ 0155 width: calc(50%*-8px); 0156 width: calc(50% - 8px); 0157 width: calc(50% + -8px); 0158 width: calc(50% +(8px)); 0159 width: calc(2px -(var(--a))); 0160 } 0161 0162 sweet-alert input:focus::-moz-placeholder { 0163 -webkit-transition: opacity 0.3s 0.03s ease; 0164 transition: opacity 0.3s 0.03s ease; 0165 opacity: 0.5; 0166 } 0167 0168 0169 @font-feature-values Font One { 0170 @styleset { 0171 nice-style: 12; 0172 } 0173 } 0174 0175 @font-feature-values Font Two { 0176 @styleset { 0177 nice-style: 4; 0178 } 0179 } 0180 0181 @counter-style thumbs { 0182 system: cyclic; 0183 symbols: "\1F44D"; 0184 suffix: " "; 0185 } 0186 0187 @font-face { 0188 font-family: "Open Sans"; 0189 src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), 0190 url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); 0191 } 0192 0193 @page { 0194 margin: 1cm; 0195 } 0196 0197 @page :first { 0198 margin: 2cm; 0199 /* comments */ 0200 marks: crop cross; 0201 } 0202 0203 @page :unknown { 0204 margin: 2cm; 0205 } 0206 0207 @font-face { 0208 unknown: 2px; 0209 /* comments */ 0210 font-family: "Bitstream Vera Serif Bold"; 0211 src: url("/static/styles/libs/font-awesome/fonts/fontawesome-webfont.fdf491ce5ff5.woff"); 0212 } 0213 0214 @viewport { 0215 zoom: 0.75; 0216 /* comments */ 0217 min-zoom: 0.5; 0218 max-zoom: 0.9; 0219 } 0220 0221 @viewport { 0222 orientation: landscape; 0223 /* comments */ 0224 orientation: landscape; 0225 } 0226 0227 @document url("https://www.example.com/") { 0228 h1 { 0229 color: green; 0230 } 0231 } 0232 0233 @supports (display: grid) { 0234 div { 0235 display: grid; 0236 } 0237 } 0238 0239 @media (max-width: 600px) { 0240 .sidebar { 0241 display: none; 0242 } 0243 } 0244 0245 @import url("fineprint.css") print; 0246 @import url(fineprint.css) print; 0247 @import url('bluish.css') speech; 0248 @import 'custom.css'; 0249 @import url("chrome://communicator/skin/"); 0250 @import "common.css" screen; 0251 @import url('landscape.css') screen and (orientation:landscape); 0252 0253 @namespace url(http://www.w3.org/1999/xhtml); 0254 @namespace svg url(http://www.w3.org/2000/svg); 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 print { 0282 a:hover { color: red } 0283 /* comments */ 0284 a:hover { color: red } 0285 } 0286 0287 /** 0288 * SCSS https://sass-lang.com/documentation/file.SASS_REFERENCE.html 0289 */ 0290 0291 #main p { 0292 color: #00ff00; 0293 width: 97%; 0294 0295 .redbox { 0296 background-color: #ff0000; 0297 color: #000000; 0298 } 0299 } 0300 0301 a { 0302 font-weight: bold; 0303 text-decoration: none; 0304 &:hover { text-decoration: underline; } 0305 body.firefox & { font-weight: normal; } 0306 } 0307 0308 #main { 0309 color: black; 0310 a { 0311 font-weight: bold; 0312 &:hover { color: red; } 0313 } 0314 } 0315 0316 #main { 0317 color: black; 0318 &-sidebar { border: 1px solid; } 0319 } 0320 0321 .funky { 0322 font: { 0323 family: fantasy; 0324 size: 30em; 0325 weight: bold; 0326 } 0327 } 0328 0329 .funky { 0330 font: 20px/24px fantasy { 0331 weight: bold; 0332 } 0333 } 0334 0335 /* This comment is 0336 * several lines long. 0337 * since it uses the CSS comment syntax, 0338 * it will appear in the CSS output. */ 0339 body { color: black; } 0340 0341 // These comments are only one line long each. 0342 // They won't appear in the CSS output, 0343 // since they use the single-line comment syntax. 0344 a { color: green; } 0345 0346 $version: "1.2.3"; 0347 /* This CSS is generated by My Snazzy Framework version #{$version}. */ 0348 0349 $width: 5em; 0350 0351 #main { 0352 width: $width; 0353 } 0354 0355 #main { 0356 $width: 5em !global; 0357 width: $width; 0358 } 0359 0360 #sidebar { 0361 width: $width; 0362 } 0363 0364 @mixin firefox-message($selector) { 0365 body.firefox #{$selector}:before { 0366 content: "Hi, Firefox users!"; 0367 } 0368 } 0369 0370 @include firefox-message(".header"); 0371 0372 $map: (key1: value1, key2: value2, key3: value3); 0373 0374 p { 0375 font: 10px/8px; // Plain CSS, no division 0376 $width: 1000px; 0377 width: $width/2; // Uses a variable, does division 0378 width: round(1.5)/2; // Uses a function, does division 0379 height: (500px/2); // Uses parentheses, does division 0380 margin-left: 5px + 8px/2px; // Uses +, does division 0381 font: (italic bold 10px/8px); // In a list, parentheses don't count 0382 } 0383 0384 p { 0385 $font-size: 12px; 0386 $line-height: 30px; 0387 font: #{$font-size}/#{$line-height}; 0388 } 0389 0390 p { 0391 color: #010203 + #040506; 0392 color: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); 0393 } 0394 0395 $translucent-red: rgba(255, 0, 0, 0.5); 0396 p { 0397 color: opacify($translucent-red, 0.3); 0398 background-color: transparentize($translucent-red, 0.25); 0399 } 0400 0401 $translucent-red: rgba(255, 0, 0, 0.5); 0402 $green: #00ff00; 0403 div { 0404 filter: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); 0405 } 0406 p { 0407 cursor: e + -resize; 0408 } 0409 p:before { 0410 content: "Foo " + Bar; 0411 font-family: sans- + "serif"; 0412 } 0413 p:before { 0414 content: "I ate #{5 + 10} pies!"; 0415 } 0416 $value: null; 0417 p:before { 0418 content: "I ate #{$value} pies!"; 0419 } 0420 p { 0421 width: 1em + (2em * 3); 0422 } 0423 p { 0424 color: hsl($hue: 0, $saturation: 100%, $lightness: 50%); 0425 } 0426 $name: foo; 0427 $attr: border; 0428 p.#{$name} { 0429 #{$attr}-color: blue; 0430 } 0431 p { 0432 $font-size: 12px; 0433 $line-height: 30px; 0434 font: #{$font-size}/#{$line-height}; 0435 } 0436 0437 .foo.bar .baz.bang, .bip.qux { 0438 $selector: &; 0439 } 0440 0441 @mixin does-parent-exist { 0442 @if & { 0443 &:hover { 0444 color: red; 0445 } 0446 } @else { 0447 a { 0448 color: red; 0449 } 0450 } 0451 } 0452 0453 $content: "First content"; 0454 $content: "Second content?" !default; 0455 $new_content: "First time reference" !default; 0456 0457 #main { 0458 content: $content; 0459 new-content: $new_content; 0460 } 0461 0462 @import "foo.css"; 0463 @import "foo" screen; 0464 @import "http://foo.com/bar"; 0465 @import url(foo); 0466 0467 $family: unquote("Droid+Sans"); 0468 @import url("http://fonts.googleapis.com/css?family=#{$family}"); 0469 #main { 0470 @import "example"; 0471 } 0472 0473 .sidebar { 0474 width: 300px; 0475 @media screen and (orientation: landscape) { 0476 width: 500px; 0477 } 0478 } 0479 @media screen { 0480 .sidebar { 0481 @media (orientation: landscape) { 0482 width: 500px; 0483 } 0484 } 0485 } 0486 0487 $media: screen; 0488 $feature: -webkit-min-device-pixel-ratio; 0489 $value: 1.5; 0490 0491 @media #{$media} and ($feature: $value) { 0492 .sidebar { 0493 width: 500px; 0494 } 0495 } 0496 0497 .error { 0498 border: 1px #f00; 0499 background-color: #fdd; 0500 } 0501 .seriousError { 0502 @extend .error; 0503 border-width: 3px; 0504 } 0505 0506 .hoverlink { 0507 @extend a:hover; 0508 } 0509 a:hover { 0510 text-decoration: underline; 0511 } 0512 0513 #context a%extreme a %extreme { 0514 color: blue; 0515 font-weight: bold; 0516 font-size: 2em; 0517 } 0518 .notice { 0519 @extend %extreme; 0520 } 0521 0522 a.important { 0523 @extend .notice !optional; 0524 } 0525 0526 @media print { 0527 .page { 0528 width: 8in; 0529 @at-root (without: media) { 0530 color: red; 0531 } 0532 } 0533 } 0534 0535 @debug 10em + 12em; 0536 0537 @mixin adjust-location($x, $y) { 0538 @if unitless($x) { 0539 @warn "Assuming #{$x} to be in pixels"; 0540 $x: 1px * $x; 0541 } 0542 @if unitless($y) { 0543 @warn "Assuming #{$y} to be in pixels"; 0544 $y: 1px * $y; 0545 } 0546 position: relative; left: $x; top: $y; 0547 } 0548 0549 @mixin adjust-location($x, $y) { 0550 @if unitless($x) { 0551 @error "$x may not be unitless, was #{$x}."; 0552 } 0553 @if unitless($y) { 0554 @error "$y may not be unitless, was #{$y}."; 0555 } 0556 position: relative; left: $x; top: $y; 0557 } 0558 0559 p { 0560 @if 1 + 1 == 2 { border: 1px solid; } 0561 @if 5 < 3 { border: 2px dotted; } 0562 @if null { border: 3px double; } 0563 } 0564 0565 $type: monster; 0566 p { 0567 @if $type == ocean { 0568 color: blue; 0569 } @else if $type == matador { 0570 color: red; 0571 } @else if $type == monster { 0572 color: green; 0573 } @else { 0574 color: black; 0575 } 0576 } 0577 0578 @for $i from 1 through 3 { 0579 .item-#{$i} { width: 2em * $i; } 0580 } 0581 0582 @each $animal in puma, sea-slug, egret, salamander { 0583 .#{$animal}-icon { 0584 background-image: url('/images/#{$animal}.png'); 0585 } 0586 } 0587 0588 @each $animal, $color, $cursor in (puma, black, default), 0589 (sea-slug, blue, pointer), 0590 (egret, white, move) { 0591 .#{$animal}-icon { 0592 background-image: url('/images/#{$animal}.png'); 0593 border: 2px solid $color; 0594 cursor: $cursor; 0595 } 0596 } 0597 0598 @each $header, $size in (h1: 2em, h2: 1.5em, h3: 1.2em) { 0599 #{$header} { 0600 font-size: $size; 0601 } 0602 } 0603 0604 $i: 6; 0605 @while $i > 0 { 0606 .item-#{$i} { width: 2em * $i; } 0607 $i: $i - 2; 0608 } 0609 0610 @mixin large-text { 0611 font: { 0612 family: Arial; 0613 size: 20px; 0614 weight: bold; 0615 } 0616 color: #ff0000; 0617 } 0618 0619 @mixin clearfix { 0620 display: inline-block; 0621 &:after { 0622 content: "."; 0623 display: block; 0624 height: 0; 0625 clear: both; 0626 visibility: hidden; 0627 } 0628 * html & { height: 1px } 0629 } 0630 0631 .page-title { 0632 @include large-text; 0633 padding: 4px; 0634 margin-top: 10px; 0635 } 0636 0637 @mixin compound { 0638 @include highlighted-background; 0639 @include header-text; 0640 } 0641 0642 @mixin highlighted-background { background-color: #fc0; } 0643 @mixin header-text { font-size: 20px; } 0644 0645 @mixin sexy-border($color, $width) { 0646 border: { 0647 color: $color; 0648 width: $width; 0649 style: dashed; 0650 } 0651 } 0652 0653 p { @include sexy-border(blue, 1in); } 0654 0655 p { @include sexy-border($color: blue); } 0656 h1 { @include sexy-border($color: blue, $width: 2in); } 0657 0658 0659 @mixin colors($text, $background, $border) { 0660 color: $text; 0661 background-color: $background; 0662 border-color: $border; 0663 } 0664 0665 $values: #ff0000, #00ff00, #0000ff; 0666 .primary { 0667 @include colors($values...); 0668 } 0669 0670 $value-map: (text: #00ff00, background: #0000ff, border: #ff0000); 0671 .secondary { 0672 @include colors($value-map...); 0673 } 0674 0675 @mixin apply-to-ie6-only { 0676 * html { 0677 @content; 0678 } 0679 } 0680 @include apply-to-ie6-only { 0681 #logo { 0682 background-image: url(/logo.gif); 0683 } 0684 } 0685 0686 $grid-width: 40px; 0687 $gutter-width: 10px; 0688 0689 @function grid-width($n) { 0690 @return $n * $grid-width + ($n - 1) * $gutter-width; 0691 } 0692 0693 #sidebar { width: grid-width(5); } 0694 0695 @mixin unify-parent($child) { 0696 @at-root #{selector-unify(&, $child)} { 0697 @content; 0698 } 0699 } 0700 0701 :root { 0702 --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 0703 --font-family-monospace: #{inspect($font-family-monospace)}; 0704 } 0705 0706 div { 0707 background-image: url("/icons/#{$name}.svg"); 0708 font: #{"string"}; 0709 0710 .icon-#{$name} { 0711 position: absolute; 0712 #{$top-or-bottom}: 0; 0713 -#{$prefix}-#{$property}: $value; 0714 .icon-#{$name} { 0715 position: absolute; 0716 #{$top-or-bottom}: 0; 0717 -#{$prefix}-#{$property}-image: $value 0718 } 0719 } 0720 0721 /* 0722 * SCSS Syntax Highlight Sample File (Standard) 0723 * 0724 * This file contains most SCSS syntax, CSS3 properties, advanced code structure. 0725 * It is NOT a valid SCSS file that can be compiled by SCSS preprocessors. 0726 * 0727 * @author Guo Yunhe guoyunhebrave@gmail.com 0728 * @date 2016-09-15 0729 */ 0730 0731 /* 0732 * Block comment 0733 * 0734 * Alert keywords: 0735 * TODO BUG FIXME 0736 */ 0737 0738 @charset "UTF-8"; 0739 0740 @import "mixins/button"; 0741 0742 // Variable define 0743 0744 $image-path: "../../static/images"; 0745 $default-text-color: #333 !default; // Default can be overrided 0746 $default-font-size: 16px !default; 0747 $default-font-family: Roboto, "Droid Sans", sans-serif; 0748 $default-font-weight: 400; 0749 $default-line-height: $default-font-size * 1.8; 0750 $shadow-transparence: 0.25; 0751 $box-shadow: 0 0 3px rgba(0,0,0,$shadow-transparence); 0752 $page-width: 100rem; // kabab-case 0753 $gapOfArticle: 20px; // camelCase 0754 $body_background_color: white; // snake_case 0755 0756 // Mixins 0757 0758 @mixin border-radius($radius) { 0759 -webkit-border-radius: $radius; 0760 -moz-border-radius: $radius; 0761 -ms-border-radius: $radius; 0762 border-radius: $radius; 0763 } 0764 0765 .box { @include border-radius(10px); } 0766 0767 // Nesting 0768 0769 #home-page { 0770 0771 header { 0772 width: 80%; 0773 margin: 0 auto; 0774 0775 .cover { 0776 @include border-radius(20px); 0777 max-width: 100%; 0778 0779 &:hover { 0780 background: #ffffff; 0781 } 0782 0783 .like-button { 0784 font-size: $default-font-size * 0.8; 0785 0786 @media (max-width: 300px) and (min-width: 200px) { 0787 font-size: $default-font-size * 0.8; 0788 0789 .icon { 0790 width: 20px; 0791 height: 20px; 0792 } 0793 } 0794 0795 @media print { 0796 display: none; 0797 } 0798 } 0799 } 0800 } 0801 } 0802 0803 // Extend and inheritance 0804 0805 .message { 0806 border: $border-light; 0807 background-color: #f0f0f0; 0808 } 0809 0810 .message-danger { 0811 @extend .message; 0812 } 0813 0814 0815 // Control structures 0816 0817 @mixin does-parent-exist { 0818 @if & { 0819 &:hover { 0820 color: red; 0821 } 0822 } @else { 0823 a { 0824 color: red; 0825 } 0826 } 0827 } 0828 0829 0830 // Operators 0831 0832 .container { width: 100%; } 0833 0834 article[role="main"] { 0835 float: left; 0836 width: 600px / 960px * 100%; 0837 } 0838 0839 aside[role="complementary"] { 0840 float: right; 0841 width: 300px / 960px * 100%; 0842 } 0843 0844 0845 // Functions - see http://sass-lang.com/documentation/Sass/Script/Functions.html 0846 0847 $color1: hsl(120deg, 100%, 50%); 0848 $color2: rgb($red, $green, blue($color1)); 0849 $color3: mix($color1, $color2, [$weight]); 0850 0851 0852 // Properties 0853 0854 html, body { 0855 font-family: "Droid Sans", Arial, sans-serif; 0856 font-size: 11pt; 0857 line-height: 1.5em; 0858 max-width: 300px + $page-width - $gap / 2; 0859 background: $bg_color; 0860 text-shadow: 0 0 2px rgba(0,0,0, $transparence); 0861 box-sizing: border-box; 0862 } 0863 0864 0865 // Selectors 0866 0867 blockquote { 0868 margin: 0; 0869 } 0870 0871 header #logo { 0872 width: 100px; 0873 } 0874 0875 div#footer .link { 0876 color: blue; 0877 } 0878 0879 sidebar #subscribe .subscribe_form input[type="text"] { 0880 font-size: 20px; 0881 } 0882 0883 sidebar #subscribe .subscribe_form:nth-child(2n + 1):hover input[class*="small-"] { 0884 font-weight: bold; 0885 } 0886 0887 0888 // Media Queries 0889 0890 @media print { 0891 .container { 0892 width: 100%; 0893 } 0894 } 0895 0896 @media screen and (min-width: 768px) { 0897 .container { 0898 width: 600px; 0899 } 0900 } 0901 0902 @media screen and (min-width: 768px) and (max-width: 960px) { 0903 .container { 0904 width: 720px; 0905 } 0906 } 0907 0908 0909 // Fontface 0910 0911 @font-face { 0912 font-family: MyHelvetica; 0913 src: local("Helvetica Neue Bold"), 0914 local("HelveticaNeue-Bold"), 0915 url(MgOpenModernaBold.ttf); 0916 font-weight: bold; 0917 } 0918 0919 // Animation (Keyframes) 0920 0921 @keyframes slidein { 0922 from { 0923 margin-left: 100%; 0924 width: 300%; 0925 } 0926 0927 to { 0928 margin-left: 0%; 0929 width: 100%; 0930 } 0931 } 0932 0933 /* 0934 * SCSS Syntax Highlight Sample File (Complex) 0935 * 0936 * This file contains complex SCSS syntax that can test unexpected situations. 0937 * It is NOT a valid SCSS file that can be compiled by SCSS preprocessors. 0938 * 0939 * @author Guo Yunhe guoyunhebrave@gmail.com 0940 * @date 2016-09-16 0941 */ 0942 0943 0944 // Comments with special content 0945 0946 // .class-selector #id "string" 'comment' // comment {} [] () /* comment */ text 0947 0948 /* 0949 * .class-selector #id "string" 'comment' // comment {} [] () /* comment 0950 * TODO BUG DEBUG 0951 * body { 0952 * margin: 0 !important; 0953 * } 0954 */ 0955 0956 // Comments in special positions 0957 0958 $color: black /* comment here */; 0959 0960 header/* comment here */.active /* comment here */ { 0961 /* comment here */ color : /* comment here */ blue/* comment here */; 0962 font-family: Arial /* comment here */, 0963 "Droid Sans", /* comment here */ 0964 sans-serif/* comment here */; 0965 } 0966 0967 @media screen /* comment here */ and (max-width: 300px /* comment here */) /* comment here */ {/* comment here */} 0968 0969 0970 // Strings with special content 0971 0972 @import "{} $variable /* comment */"; 0973 @import "{}"; 0974 0975 // Without extra breaklines and spaces 0976 0977 pre.primary:hover.large:nth-child(2n-1){font-size:$default-font-size;font-family:"Noto Sans";-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.3)} 0978 0979 // With unnecessary breaklines and spaces 0980 0981 blockquote .ref 0982 { 0983 flex : 0 1 30%; 0984 flex-wrap : wrap; 0985 } 0986 0987 .sidebar { 0988 width: 300px; } 0989 @media screen and (orientation: landscape) { 0990 .sidebar { 0991 width: 500px; } } 0992 0993 // Variable interpolation: #{} 0994 0995 $name: foo; 0996 $attr: border; 0997 p.#{$name} { 0998 #{$attr}-color: blue; 0999 } 1000 1001 p { 1002 $font-size: 12px; 1003 $line-height: 30px; 1004 font: #{$font-size}/#{$line-height}; 1005 } 1006 1007 // Special selectors: HTML5 allows user defined tags 1008 1009 header { 1010 flex { 1011 width: 300px; 1012 } 1013 }