xml.padding-to-margin.xpl Maven / Gradle / Ivy
The newest version!
Convert padding into non-collapsing margins
(http://braillespecs.github.io/braille-css/#collapsing-margins).
The input is assumed to be a tree-of-boxes representation of a document, where boxes are
represented by css:box elements. The 'padding' properties of boxes must be declared in
css:padding-left, css:padding-top, css:padding-right and css:padding-bottom attributes.
For each block box with 'padding' properties, the box's content is wrapped in an
anonymous block box. The box's css:padding-* attributes are moved to the anonymous box
and renamed to css:margin-*. A css:collapsing-margins attribute with value 'no' is added
to the anonymous box. Any 'inherit' values of non-inheriting properties (specified in
style attributes) of the box's child boxes are concretized.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy