You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, there is no such thing in the CSSOM; we collect all that into "trivia" (a technique popularized by Roslyn). The ToCss serialization only works on the CSSOM -> so in order to serialize with the comments something else would need to be serialized (or the CSSOM would need to be extended / changed).
Potentially, a flag could be introduced, but even then I am not sure how these comments would be attached. Maybe they would be attached to the stylesheet itself with a reference "where" they should be placed (this "where" is a big problem; in this OM things may be added, removed, changed, ... - I guess any change would then need to reset / remove / alter the comments?).
I realize this is a non-trivial endeavour, in particular the "where" part you mentioned. Unlike in HTML, comments in CSS can be arbitrarily interleaved with other tokens (e.g. background-color: /* black */ #000;) so this would need to be reflected in the OM as well. Feel free to close this.
It seems that CSS comments are not kept in the CSSOM and thus are not preserved when you call
ToCss()
on a previously parsedCssStyleSheet
object.The text was updated successfully, but these errors were encountered: