Render to CSS

50 views
Skip to first unread message

brechtvhb

unread,
Feb 22, 2011, 5:51:48 AM2/22/11
to ModelText
Is it possible to render an ICssDeclaration and an ICssSelector to
it's CSS equivalent?

I was hoping that .ToSTring() would do this but it's rendering the
class as a JSON representation.

Christopher Wells

unread,
Feb 22, 2011, 9:33:05 AM2/22/11
to ModelText, brec...@gmail.com
The original CSS isn't preserved when it's parsed.

Because the software is a parser, I decided that a simple (JSON-like)
representation of its parsed output was the more useful format for the
ToString() result.

I believe you that you could construct CSS from the parsed values (in
the same way that, at the moment, it's constructing JSON-format
output): because no information is lost during the parsing, except
whitespace. However it would be your code that would construct the
CSS, because preserving the original CSS, and/or reconstructing CSS
from the parsed values, is not functionality that's already built-in.

Regards,
Christopher Wells.
Reply all
Reply to author
Forward
0 new messages