Sublime Forum

HTML Syntax with inline CSS color coding

#1

Is there a package that provides a better form of inline color coding rather than just the standard yellow for CSS?

0 Likes

#2

Standard yellow?! Try different themes, and there are other themes available, particularly via PackageControl.

You could also create/modify a theme file to add new rules. Or, of course, use a stylesheet :smiley:

0 Likes

#3

I don’t have the option of using a style sheet. I am writing partial pages that get added into a preexisting document. All of the CSS I use is to override the current style sheets.

Was just a thought. I’m new to sublime and thought I would try it out. If it can’t change, it can’t change.

0 Likes

#4

If you haven’t already, explore Preferences, Color Schemes - some of them may target the inline-styles.

0 Likes

#5

If you mean as in an html tag, as in <div style="color:#f00"> I have never seen a color scheme that colors this.

Someone would have to add to the html language file the ability to detect these, and it’s not trivial.

0 Likes

#6

Inline CSS highlighting is important for all who code email templates. Three and half years have passed since last comment on this thread and nobody haven’t looked into this. I wish inline CSS in HTML was styled properly.

0 Likes

#7

it is and has been for ages…

0 Likes

#8

Sorry, I was talking about Nunjucks-HTML flavour. I forked the Nunjucks syntax https://github.com/mogga/sublime-nunjucks and will try to edit it to be as capable as native HTML.

0 Likes

#9

Nunjucks HTML syntax currently:

0 Likes

#10

syntax definitions for HTML templating languages should really include the default HTML syntax definition, so that they get the standard behavior with no extra effort or maintenance required…

1 Like

#11

yah i had the same, but currently after ST4 its not there, can anyone help ?

0 Likes

#12

Inline CSS syntax is still supported in builtin HTML syntax. What syntax is it not working for?

0 Likes