Page 1 of 1

CSS :before and :after presentation in Author view

Posted: Tue Jun 02, 2020 7:21 pm
by ra0543
When tags are displayed in the Author view of version 22.0 any display text that is added (for presentation) using CSS :before and :after is now appearing inside the tags in question rather than before and after the tags (unlike in at least some previous versions).

E.g. previously

<example>first item</example><element>text</element><element>text</element>

with

element:before {content:", "}

used to look like this:

[example>first item<example], [element>text<element], [element>text<element]

whereas now it looks like this:

[example>first item<example][element>, text<element][element>, text<element]

Is it possible to go back to the previous display option? If not, in which version was this change made (so I can uninstall and look for that previous version)?

Re: CSS :before and :after presentation in Author view

Posted: Wed Jun 03, 2020 3:22 pm
by Radu
Hi,

Indeed we took this decision in Oxygen 21.1 to always display all the element's content (even before and after blocks) inside the tags.
We do not have a setting for this. Maybe if you give me more details about your use case, maybe some screenshots I can add an internal issue to consider adding some setting to control this behavior.

Regards,
Radu

Re: CSS :before and :after presentation in Author view

Posted: Wed Jun 03, 2020 3:54 pm
by ra0543
Thanks for the info. I am thinking of, for instance:

Code: Select all

<Address type="Correspondence"><StreetAddress>Test data</StreetAddress><AddressLine2>Test data</AddressLine2><Town>TEST</Town><Postcode>ABCD 1234</Postcode><Country>ANYWHERE</Country></Address>
with this CSS:

Code: Select all

Address>*:before {content:", "}
Postcode+Town:before {content:" "}
Address:before {content:attr(type)": ";color:#196619;font-weight:bold}
Address>*:first-child:before {content:""}
Address[type='Correspondence']>* {font-style:italic;color:#196619}
I don't remember how to attach the screenshot that I've made, but if you put those two together you'll see the effect is weird, with the :before commas and spaces inside the elements rather than before them.

Re: CSS :before and :after presentation in Author view

Posted: Thu Jun 04, 2020 6:30 am
by Radu
Hi,

If you want you can completely hide inline tags for certain elements like:

Code: Select all

Address {
    -oxy-display-tags:none;
}
and then add some image markers on the before and after content to emulate them.

Regards,
Radu

Re: CSS :before and :after presentation in Author view

Posted: Thu Jun 04, 2020 6:32 am
by Radu
Coming back to this, maybe for such cases our form control text fields may make things look better:

Code: Select all

Address {
    -oxy-display-tags:none;
    content: oxy_textfield(edit, "#text", columns, 10);
    visibility:-oxy-collapse-text;
}
Regards,
Radu

Re: CSS :before and :after presentation in Author view

Posted: Thu Jun 04, 2020 11:35 am
by ra0543
Thanks, but I think I'll go back to an earlier more user-friendly version from before this was implemented, not least because I don't want to have to rewrite hundreds of lines of CSS.

Re: CSS :before and :after presentation in Author view

Posted: Fri Jun 05, 2020 6:33 am
by Radu
Hi,

I will add an internal issue with your problem and we'll discuss about adding a setting to control this behavior.

Regards,
Radu