Home Forums XMetaL Tips and Tricks CSS: Hiding Specific PIs and Styling Selected PIs Differently Reply To: CSS: Hiding Specific PIs and Styling Selected PIs Differently

edporterIII

Reply to: CSS: Hiding Specific PIs and Styling Selected PIs Differently

I discovered that I could force it to recognize my PI as having been inserted by refreshing the CSS. Now, I have another question regarding PI CSS.

I gather that your change tracking PIs function by tracking added or deleted text and inserting that into the “data” pseudo-attribute, and then displaying that data with the selected CSS styling.

Would it be possible to mimic that with my own PI? So, a user selects some text, right-clicks to bring up a context window, selects “Mark Added text”. The macro would then capture the selected text, replace it with a PI containing the text in a data pseudo-attribute. The resulting PI would only display the selected text as inline underlined text.

My experiments with PIs haven't worked like I'd like in that respect. I tried the following CSS to test some functionality like this, but simply nothing displayed. I assume the more general display: none is overriding my :before content.

[code]$procins[xm-pi-target=”revision-add-start”]{
display: none;
}

$procins[xm-pi-target=”revision-add-start”]:after{
content: 'ADD: ';
display: inline;
font-weight: bold;
color: red;
}[/code]

Reply

Products
Downloads
Support