case.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. // Convention in this test file:
  2. // - The case should be preserved for things prefixed with "Keep".
  3. // - The case should always be preserved for element names and attribute names
  4. // in selectors, as well as function names and property keywords.
  5. // - Other things should mostly be lowercase.
  6. // - The `/*:*/` comments are just to bust the `isLikelySCSS` check.
  7. @IMPORT Keep;
  8. HTML#KeepId.KeepClass,
  9. a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
  10. svg[viewBox] linearGradient,
  11. :Not(:NTH-child(2N+1)) {
  12. COLOR: #AAbbCC;
  13. BACKGROUND-image: URL("KeepString");
  14. Margin: 5PX .2E10Em;
  15. --Keep-custom-Prop: red;
  16. background: Var(--Keep-custom-Prop);
  17. animation-name: KeepAnimationName;
  18. important: something !IMPORTANT;
  19. font-family: INITIAL;
  20. padding: UNSET;
  21. border: INHERIT;
  22. all: REVERT;
  23. -WEBKIT-USER-SELECT: none;
  24. -MOZ-USER-SELECT: none;
  25. -MS-USER-SELECT: none;
  26. USER-SELECT: none;
  27. }
  28. @keyframes KeepAnimationName {
  29. FROM {
  30. prop: val;
  31. }
  32. @{KeepInterpolationVar} {
  33. prop: val;
  34. }
  35. TO {
  36. prop: val;
  37. }
  38. }
  39. @custom-media --KeepCustomMedia screen and (width >= 768px);
  40. @media (--KeepCustomMedia) {}
  41. @KeepDetachedRuleset: /*:*/ {
  42. BACKGROUND: RED;
  43. }
  44. %KeepScssPlaceholderSelector {
  45. prop: val;
  46. }
  47. @KeepTopLevelVar: val;
  48. $KeepScssVar: val;
  49. .Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ {
  50. @KeepVar: KeepName; /*:*/
  51. @{KeepInterpolationVar}: val;
  52. $KeepScssVar: val;
  53. @extend %KeepScssPlaceholderSelector;
  54. @{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} {
  55. prop: val;
  56. }
  57. &Keep & Element {
  58. prop: val;
  59. }
  60. @KeepDetachedRuleset();
  61. &:EXTEND(.Keep ALL);
  62. .Keep;
  63. .Keep();
  64. .Keep(4PX)!IMPORTANT;
  65. .Keep() when (@Keep=Keep);
  66. .Keep() when (@Keep=12PX);
  67. .Keep() when (@Keep=Keep12PX);
  68. }
  69. .Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {}
  70. .Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {}
  71. .Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {}
  72. .Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {}
  73. .Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {}
  74. @MEDIA (MIN-WIDTH: 700PX) /*:*/ {}
  75. @MEDIA (@{Keep}: @{Keep}) {}
  76. @KEYFRAMES identifier {
  77. FROM {
  78. margin-top: 50px;
  79. }
  80. 50% {
  81. margin-top: 150px;
  82. }
  83. TO {
  84. margin-top: 100px;
  85. }
  86. }
  87. @-WEBKIT-KEYFRAMES float-up {
  88. FROM {
  89. margin-top: 50px;
  90. }
  91. 50% {
  92. margin-top: 150px;
  93. }
  94. TO {
  95. margin-top: 100px;
  96. }
  97. }
  98. .foo {
  99. color: hsl(0.75TURN, 60%, 70%);
  100. }
  101. p:FIRST-CHILD {
  102. color: lime;
  103. background-color: black;
  104. padding: 5px;
  105. }
  106. a::AFTER {
  107. content: "→";
  108. }
  109. a:AFTER {
  110. content: "→";
  111. }
  112. ::-WEBKIT-PROGRESS-BAR {
  113. background-color: orange;
  114. }
  115. TABLE {}
  116. .foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\.200 {} }