Does Less have any support for the Web Components Custom Elements spec? (http://w3c.github.io/webcomponents/spec/custom/ or more accessible http://www.x-tags.org/docs)

有帮助吗?

解决方案

Less does not put any restrictions on used selectors/properties/values as long as they meet the base CSS grammar, e.g. the following Less code:

whatever {
    whatever-else: I dont care;
    &:tlhIngan(Hol)[DaH="mojaq-mey-vam"] {
        color: pitch black #2;
    }
}

results in this CSS:

whatever {
  whatever-else: I dont care;
}
whatever:tlhIngan(Hol)[DaH="mojaq-mey-vam"] {
  color: pitch black #2;
}

Additionally there's special escaping syntax to pass just any characters through (i.e. ~"whatever-'characters'-here//**\@\$^%\n").

So to answer the question: Yes, Less supports custom elements as well as any future standard elements unless they introduce a new incompatible syntax.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top