Is it possible add CSS at runtime?
Posted: Wed Jan 27, 2021 12:36 am
I noticed DITA and DocBook defines CSS for built-in profiling attributes, for example following is the CSS from DITA for audience
I have a dynamic list of profiling attributes for which I like to add similar CSS. Is it possible to inject CSS into editor at runtime using plugin, perhaps right before loading the document?
Code: Select all
*[audience] {
border: 1px solid green;
}
*[audience]:after(1000003) {
font-size: 0.75em;
content: ' (if audience is ' oxy_label(text, oxy_concat("'", oxy_replace(attr(audience), ' ', "' or '"), "'"), color, #0000ff) ') ';
background-color: #CCFFAA;
}