Packages: (feature request) highlight LESS in HTML

Created on 2 Jan 2018  路  2Comments  路  Source: sublimehq/Packages

using LESS (and another CSS preprocessor) syntax hightight if <style> tag attribute type value is not default (text/css). for example:

<style type="text/x-less">
...
body {
  #content {
    ...
  }
}
...
</style>

thanks!

(sory for my english)

Most helpful comment

I'm ambivalent about this. It's not a standard HTML feature, and we don't generally like adding nonstandard features to core syntaxes. In this case, there's no LESS syntax in core, so the feature wouldn't even work without a third-party syntax. I think that's a compelling reason not to implement it in core.

On the other hand, I can definitely see that it would be nice if third-party syntaxes could more easily provide extensions like this. I've been thinking about improving the language-determination functionality for <script> and <style> tags in the core HTML syntax. Improving that mechanism might also make it easier for third-party syntaxes to "hook into" it.

All 2 comments

I'm ambivalent about this. It's not a standard HTML feature, and we don't generally like adding nonstandard features to core syntaxes. In this case, there's no LESS syntax in core, so the feature wouldn't even work without a third-party syntax. I think that's a compelling reason not to implement it in core.

On the other hand, I can definitely see that it would be nice if third-party syntaxes could more easily provide extensions like this. I've been thinking about improving the language-determination functionality for <script> and <style> tags in the core HTML syntax. Improving that mechanism might also make it easier for third-party syntaxes to "hook into" it.

Sounds like a job for a third-party package with extends.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamntz picture iamntz  路  4Comments

jfcherng picture jfcherng  路  3Comments

jcberquist picture jcberquist  路  4Comments

philipbordallo picture philipbordallo  路  3Comments

mouse07410 picture mouse07410  路  3Comments