Closed Bug 547272 Opened 16 years ago Closed 16 years ago

CSS syntax highlighter

Categories

(Skywriter Graveyard :: Syntax Highlighting, defect, P2)

Other
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dangoor, Unassigned)

Details

We need a new-style syntax highlighter for CSS, plus a change to the HTML highlighter to switch to CSS mode as needed.
Target Milestone: 0.7.0 → 0.6.2
Target Milestone: 0.6.2 → 0.7.1
Target Milestone: 0.7.1 → ---
Started a bare-bones CSS syntax highlighter here: http://bitbucket.org/clmarquart/bespin/ Currently highlights tags, classes, and IDs separately, along with their corresponding styles. It's all contained in one file: http://bitbucket.org/clmarquart/bespin/src/037e4109254b/plugins/supported/stylesheet.js
Thanks, Cody! I'm retargeting this bug for 0.8 so we can take a quick look at your plugin.
Target Milestone: --- → 0.8
I've pushed your highlighter to the tip. Good start! Thanks for kicking this off. A couple of comments: the "tag"s in syntax highlighters should have semantic meaning. In other words, "error" is probably not a good tag for IDs. Looking at the "white theme" plain: '#3D3D3D', comment: '#A8A8A8', directive: '#999999', error: '#ff0000', identifier: '#000000', keyword: '#0000ff', operator: '#88BBFF', string: '#039A0A' those are the currently available tags, but you can really apply any tag that seems sensible. It's important, though, to choose semantics over colors, given Bespin 0.8's support for themes. Oddly, I can't find where the default theme's tag->color mapping is defined. Also, you might want to try opening one of Bespin's .less files with your highlighter and see how it looks. We have a number of classes with "_" in them, for example. Great start! Thanks
I'm closing this bug, because the CSS highlighter is in place. We should, at some point, revisit it to make the tags more semantically meaningful, but that's not critical until we have more themes and start wanting to adjust the colors a little more cleanly.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.