First step towards actual style-naming
This commit is contained in:
parent
6cb8a9a94a
commit
04a4900cc6
@ -6,7 +6,11 @@ tree.Element = function (combinator, value) {
|
||||
this.value = value.toCSS ? value.toCSS() : value.trim();
|
||||
};
|
||||
tree.Element.prototype.toCSS = function (env) {
|
||||
return this.combinator.toCSS(env || {}) + this.value;
|
||||
// make names XML-safe in a dreadfully simple manner
|
||||
|
||||
return this.combinator.toCSS(env || {}) + this.value
|
||||
.replace('#', 'id-')
|
||||
.replace('.', 'class-');
|
||||
};
|
||||
tree.Combinator = function (value) {
|
||||
if (value === ' ') {
|
||||
|
@ -183,6 +183,7 @@ tree.Ruleset.prototype = {
|
||||
return out;
|
||||
})(symbolizers);
|
||||
}
|
||||
console.log(selector);
|
||||
css.push('<Style>\n' +
|
||||
selector +
|
||||
'\n<Rule>\n' +
|
||||
|
Loading…
Reference in New Issue
Block a user