using content: "\A" in a CSS file corrupts the property value, and inserts a newline into the sheet:
This:
.x-panel-reset .x-panel-body br:before { content: "\A" }
Becomes:
.x-panel-reset .x-panel-body br:before { content: "
" }
Anonymous
Hi Tim,
\a is an CSS escape sequence for the newline character. From my point of view it is correct to replace the sequence with the newline.
Or do you talk about the conversion back to a string?
Hi Tim,
did some fixes for the text output. Hope that helps.
A new snapshot build is available.
Thanks!! I will give it a try today. IMO leaving the "\A" intact is the right thing to do, and in fact it causes real problems when browsers read the CSS file with a newline and no closing quote. It renders the following CSS rules ineffective. Do you know if this will make it into 0.9.20?
To make it a bit more clear: in the end the parser creates a LexicalUnit from the string and the unit contains the newline as value .
If you call getStringValue() for that unit you will get the string containing the newline.
If you call toString or getCssText you will get a string with the '\a ' inside (the blank is added as normalization like at least FF does).
This is the way this is already implemented with the current snapshot. If you like it will be part of the next release. If you do not like it we will continue our discussion until we will end up with a more clever solution :-)
Last edit: RBRi 2016-07-23
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Thanks RBRi, I took a look finally, and it looks good, although I'm not sure that \a is the same as \A?
Hi Tom,
guess ou are (more or less) right. Have changed the impl a bit to now always use \A instead of \a when generating the cssText. But the parser still recognices both the same way.
Looks this is the same the browsers are doing.
Thanks for the feedback.