textmate / css.tmbundle

TextMate support for CSS
54 stars 36 forks source link

Some tags are not highlighted in CSS #17

Open bobrovnikov opened 9 years ago

bobrovnikov commented 9 years ago

While reading through CSS file I noticed that svg tag was not colored as others: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css#L58 screenshot from 2014-12-23 15 07 25

It seems that svg is missing in this regular expression: https://github.com/textmate/css.tmbundle/blob/master/Syntaxes/CSS.plist#L711, unlike audio and canvas, which are present there and are colored green as well.

It would be good to compare existing regular expression against a credible list like this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element

However, HTML5 allows the creation of custom elements: http://www.html5rocks.com/en/tutorials/webcomponents/customelements/. In this case shall we have a discussion of whether to:

carlsmith commented 8 years ago

The same issue comes up with main. There's an example here.

dstorey commented 8 years ago

I have a fix for this and other properties in a PR for VS Code. Once that is merged, I'll look to doing a PR here to keep in sync.

hausofwong commented 8 years ago

I'm happy to have a look at this.

If we're adding svg to the element list, do we need to add all the SVG elements as well? I do a lot of SVG styling through my CSS stylesheets and it would be nice, but not too sure if it's overkill.

Full list can be found here: https://developer.mozilla.org/en-US/docs/Web/SVG/Element