Wrong CSS highlighting for selector names that can also be value keywords
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtksourceview2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using libgtksourceview2 2.26.0-2ubuntu1 with Ubuntu 10.04.
It seems as if gtk-source-view performs a mere search for strings without regard to context.
In the case of a selector name: if you choose a name that can also be a property value it will be highlighted as if it were a property value and not like any other arbitrary selector name. Examples:
span.class1 { padding: 0; } /* This is the regular highlighting of a selector */
pre.class2 { margin: 0; } /* The keyword 'pre' can also be a property value and thus is highlighted as such */
div.bottom { margin: 0; } /* The keyword 'bottom' can also be a property value and thus is highlighted as such */
div.hover { text-align: left; } /* The keyword 'hover' can also be a name for a pseudo-class */
div.lang { margin: 0; } /* The keyword 'lang' can also be an attribute of a selector */
div.white { padding:0; } /* The keyword 'white' can also be a color value */
Added a screenshot of the issue