Hi!
I have this idea, the user defines set of css rules with some comments (comments are simple annotations):
/* @name Page style */
body {
font: 16px/1.5 Arial; /* @editable */
backgorund-color: #fff; /* @editable */
}
/* @name Section header */
h1 {
font: 20px/1.2 Arial; /* @editable */
color: #c44
}
I can apply this stylesheet to my page but I also want to parse this rules with the comments and provide some forms to edit these styles and let the user change the styles on the fly. These comments will indicate which rules/properties are editable.
I was looking for some browser or server solution. The easiest serwer solution would be to parse this css with some java css parser, convert it to ex. json and then make use of this json in the browser: http://www.featureblend.com/css-json.html
The problem is I haven't found any Java css parser which will be able to handle comments.
The same is in the browser, no suitable css parser. Any ideas how to do this?