input.css 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. Preserves orignal formatting
  3. */
  4. /* declarations can exist inside atrules */
  5. @font-face {
  6. font-family: 'Test font';
  7. }
  8. /* comment before rule */
  9. body/* comment after rule name */{
  10. /* comment before decl */
  11. padding /* comment after prop */ : /* comment before val */ 0 /* comment after val */ 1px /* another comment */ 2px /* one more */ 3px /* last one*/;
  12. /* comment after decl */
  13. margin:
  14. 0 /*top*/
  15. 1px /*right
  16. multi-line
  17. comment
  18. */
  19. 2px /*bottom*/
  20. 3px /*left*/;
  21. border-left/* comment after prop */: none;
  22. }
  23. /* should never process variables */
  24. :root {
  25. --left-margin: 10px;
  26. --brightest: blue;
  27. }
  28. div.variable-demo {
  29. margin-left: var(--left-margin);
  30. color: var(--brightest);
  31. }
  32. /* end: should never process variables */
  33. /* empty options forces defaults */
  34. /*rtl:begin:options: {}*/
  35. /* should not process urls - default */
  36. @import url("rtl-right-east.css");
  37. /*rtl:end:options*/
  38. /*rtl:begin:config:
  39. {
  40. "options":{
  41. "autoRename": true,
  42. "stringMap":[
  43. {
  44. "name" : "prev-next",
  45. "search" : ["prev", "Prev", "PREV"],
  46. "replace" : ["next", "Next", "NEXT"],
  47. "options" : {"ignoreCase":false}
  48. }
  49. ]
  50. },
  51. "plugins":[
  52. {
  53. "name": "test",
  54. "directives":{
  55. "control": {},
  56. "value": []
  57. },
  58. "processors": [
  59. {
  60. "name": "content",
  61. "expr": /content/im,
  62. "action": function (prop, value, cxt) {
  63. if (value === '"A"') {
  64. return { 'prop': prop, 'value': '"ABC"' }
  65. } else if (value === '"ABC"') {
  66. return { 'prop': prop, 'value': '"A"' }
  67. }
  68. return { 'prop': prop, 'value': value }
  69. }
  70. }
  71. ]
  72. }
  73. ]
  74. }*/
  75. div:before { content: "A";} div:after { content: "ABC";}
  76. .demo-prev, .demo-Prev, .demo-PREV { content: 'p'; }
  77. .demo-next, .demo-Next, .demo-NEXT { content: 'n'; }
  78. /*rtl:end:config*/
  79. /*!rtl:begin:remove*/
  80. @import url(/test.css);
  81. i {
  82. color: blue;
  83. }
  84. /*rtl:end:remove*/
  85. div {
  86. /*rtl:remove*/
  87. direction: rtl;
  88. text-align: right;
  89. padding: 10px;
  90. }
  91. /*rtl:begin:ignore*/
  92. .sample {
  93. text-align: left;
  94. }
  95. /*rtl:end:ignore*/
  96. /*rtl:begin:options:{"autoRename":false, "clean": false}*/
  97. .right { display:inline;}
  98. /*rtl:begin:options:{"autoRename":true, "greedy": true}*/
  99. .bright { display:inline;}
  100. /*rtl:end:options*/
  101. .brighter { display:inline;}
  102. /*rtl:end:options*/
  103. /* auto rename only if a pair exists */
  104. /*rtl:begin:options:{"autoRename":true, "autoRenameStrict": true}*/
  105. /* The following should not be renamed */
  106. .ltr{ display: inline-flex;}
  107. /* But these should */
  108. .right{ display: inline-flex;}
  109. .left { display: block;}
  110. /*rtl:end:options*/