xml.parse-stylesheet.xpl Maven / Gradle / Ivy
The newest version!
Extract pseudo rules and at-rules from style sheets.
Style sheets of elements in the input must be declared in style attributes, which must
conform to http://braillespecs.github.io/braille-css/#style-attribute.
Elements in the output will get a css:* attribute for every pseudo-element, pseudo-class
or at-rule in the element's style attribute, with the exception of ::table-by(),
::list-item and ::list-header pseudo-elements. Rules with the same keyword but different
pseudo-classes are combined into a single attribute. For example, the rule `@page {
size: 40 25 }' becomes the attribute css:page="size: 40 25", the rules `@volume {
max-length: 100 } @volume:first { max-length: 50 }` become the attribute css:volume="{
max-length: 100 } :first { max-length: 50 }", the rule `::before { content: '⠶' }'
becomes the attribute css:before="content: '⠶'", and the rule `@text-transform foo
{...}` becomes the attribute css:text-transform-foo="...". Any attributes in the input
with the same name will be overwritten. Only properties defined on the element itself
will be retained in the style attribute, as a simple declaration list. The style
attribute is dropped when empty.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy