{"id":50,"date":"2024-01-28T20:30:44","date_gmt":"2024-01-28T20:30:44","guid":{"rendered":"http:\/\/development.abcplayers.org\/index.php\/css\/less\/"},"modified":"2024-01-28T20:30:44","modified_gmt":"2024-01-28T20:30:44","slug":"less","status":"publish","type":"page","link":"https:\/\/development.abcplayers.org\/index.php\/css\/less\/","title":{"rendered":"CodeMirror: LESS mode"},"content":{"rendered":"<p><body><\/p>\n<div id=\"nav\">\n  <a href=\"http:\/\/codemirror.net\"><\/p>\n<h1>CodeMirror<\/h1>\n<p><img decoding=\"async\" id=\"logo\" src=\"..\/..\/doc\/logo.png\"\/><\/a><\/p>\n<ul>\n<li><a href=\"..\/..\/index.html\">Home<\/a>\n    <\/li>\n<li><a href=\"..\/..\/doc\/manual.html\">Manual<\/a>\n    <\/li>\n<li><a href=\"https:\/\/github.com\/codemirror\/codemirror\">Code<\/a>\n  <\/li>\n<\/ul>\n<ul>\n<li><a href=\"..\/index.html\">Language modes<\/a>\n    <\/li>\n<li><a class=\"active\" href=\"#\">LESS<\/a>\n  <\/li>\n<\/ul>\n<\/div>\n<article>\n<h2>LESS mode<\/h2>\n<form><textarea id=\"code\" name=\"code\">@media screen and (device-aspect-ratio: 16\/9) { \u2026 }<br \/>\n@media screen and (device-aspect-ratio: 1280\/720) { \u2026 }<br \/>\n@media screen and (device-aspect-ratio: 2560\/1440) { \u2026 }<\/p>\n<p>html:lang(fr-be)<\/p>\n<p>tr:nth-child(2n+1) \/* represents every odd row of an HTML table *\/<\/p>\n<p>img:nth-of-type(2n+1) { float: right; }<br \/>\nimg:nth-of-type(2n) { float: left; }<\/p>\n<p>body &gt; h2:not(:first-of-type):not(:last-of-type)<\/p>\n<p>html|*:not(:link):not(:visited)<br \/>\n*|*:not(:hover)<br \/>\np::first-line { text-transform: uppercase }<\/p>\n<p>@namespace foo url(http:\/\/www.example.com);<br \/>\nfoo|h1 { color: blue }  \/* first rule *\/<\/p>\n<p>span[hello=&#8221;Ocean&#8221;][goodbye=&#8221;Land&#8221;]<\/p>\n<p>E[foo]{<br \/>\n  padding:65px;<br \/>\n}<\/p>\n<p>input[type=&#8221;search&#8221;]::-webkit-search-decoration,<br \/>\ninput[type=&#8221;search&#8221;]::-webkit-search-cancel-button {<br \/>\n  -webkit-appearance: none; \/\/ Inner-padding issues in Chrome OSX, Safari 5<br \/>\n}<br \/>\nbutton::-moz-focus-inner,<br \/>\ninput::-moz-focus-inner { \/\/ Inner padding and border oddities in FF3\/4<br \/>\n  padding: 0;<br \/>\n  border: 0;<br \/>\n}<br \/>\n.btn {<br \/>\n  \/\/ reset here as of 2.0.3 due to Recess property order<br \/>\n  border-color: #ccc;<br \/>\n  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);<br \/>\n}<br \/>\nfieldset span button, fieldset span input[type=&#8221;file&#8221;] {<br \/>\n  font-size:12px;<br \/>\n\tfont-family:Arial, Helvetica, sans-serif;<br \/>\n}<\/p>\n<p>.rounded-corners (@radius: 5px) {<br \/>\n  border-radius: @radius;<br \/>\n  -webkit-border-radius: @radius;<br \/>\n  -moz-border-radius: @radius;<br \/>\n}<\/p>\n<p>@import url(&#8220;something.css&#8221;);<\/p>\n<p>@light-blue:   hsl(190, 50%, 65%);<\/p>\n<p>#menu {<br \/>\n  position: absolute;<br \/>\n  width: 100%;<br \/>\n  z-index: 3;<br \/>\n  clear: both;<br \/>\n  display: block;<br \/>\n  background-color: @blue;<br \/>\n  height: 42px;<br \/>\n  border-top: 2px solid lighten(@alpha-blue, 20%);<br \/>\n  border-bottom: 2px solid darken(@alpha-blue, 25%);<br \/>\n  .box-shadow(0, 1px, 8px, 0.6);<br \/>\n  -moz-box-shadow: 0 0 0 #000; \/\/ Because firefox sucks.<\/p>\n<p>  &amp;.docked {<br \/>\n    background-color: hsla(210, 60%, 40%, 0.4);<br \/>\n  }<br \/>\n  &amp;:hover {<br \/>\n    background-color: @blue;<br \/>\n  }<\/p>\n<p>  #dropdown {<br \/>\n    margin: 0 0 0 117px;<br \/>\n    padding: 0;<br \/>\n    padding-top: 5px;<br \/>\n    display: none;<br \/>\n    width: 190px;<br \/>\n    border-top: 2px solid @medium;<br \/>\n    color: @highlight;<br \/>\n    border: 2px solid darken(@medium, 25%);<br \/>\n    border-left-color: darken(@medium, 15%);<br \/>\n    border-right-color: darken(@medium, 15%);<br \/>\n    border-top-width: 0;<br \/>\n    background-color: darken(@medium, 10%);<br \/>\n    ul {<br \/>\n      padding: 0px;<br \/>\n    }<br \/>\n    li {<br \/>\n      font-size: 14px;<br \/>\n      display: block;<br \/>\n      text-align: left;<br \/>\n      padding: 0;<br \/>\n      border: 0;<br \/>\n      a {<br \/>\n        display: block;<br \/>\n        padding: 0px 15px;<br \/>\n        text-decoration: none;<br \/>\n        color: white;<br \/>\n        &amp;:hover {<br \/>\n          background-color: darken(@medium, 15%);<br \/>\n          text-decoration: none;<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n    .border-radius(5px, bottom);<br \/>\n    .box-shadow(0, 6px, 8px, 0.5);<br \/>\n  }<br \/>\n}<br \/>\n<\/textarea><\/form>\n<p>    <script><![CDATA[\n      var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n        lineNumbers : true,\n        matchBrackets : true,\n        mode: \"text\/x-less\"\n      });\n    ]]><\/script><\/p>\n<p>The LESS mode is a sub-mode of the <a href=\"index.html\">CSS mode<\/a> (defined in <code>css.js<\/code>).<\/p>\n<p><strong>Parsing\/Highlighting Tests:<\/strong> <a href=\"..\/..\/test\/index.html#less_*\">normal<\/a>,  <a href=\"..\/..\/test\/index.html#verbose,less_*\">verbose<\/a>.<\/p>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CodeMirror Home Manual Code Language modes LESS LESS mode @media screen and (device-aspect-ratio: 16\/9) { \u2026 } @media screen and (device-aspect-ratio: 1280\/720) { \u2026 } @media screen and (device-aspect-ratio: 2560\/1440) { \u2026 } html:lang(fr-be) tr:nth-child(2n+1) \/* represents every odd row of an HTML table *\/ img:nth-of-type(2n+1) { float: right; } img:nth-of-type(2n) { float: left; } [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":47,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-50","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/pages\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":0,"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/pages\/50\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/pages\/47"}],"wp:attachment":[{"href":"https:\/\/development.abcplayers.org\/index.php\/wp-json\/wp\/v2\/media?parent=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}