AH Formatter /
XSL Formatter
XSLT/XSL-FO/SVG/MathML ConformanceXSL-FO |
|
| Q. |
I specified margin-left="0pt" for fo:block enclosed with border. However, its result is not the same as fo:block for which margin-left is not specified. Why?
[No.2005082601]
|
|---|---|
| A. |
In the W3C Recommendation for XSL-FO, it is as follows: ...
XSL modifications to the CSS definition: And, it is written in 5.3.2 Margin, Space, and Indent Properties as follows. 5.3.2 Margin, Space, and Indent Properties ...
start-indent = margin-corresponding + padding-corresponding + border-corresponding-width ...
start-indent = inherited_value_of(start-indent) + margin-corresponding + padding-corresponding + border-corresponding-width ...
margin-corresponding = start-indent - inherited_value_of(start-indent) - padding-corresponding - border-corresponding-width For instance, when margin is specified, <fo:block margin-left="0" margin-right="0" border="5mm double black"> You will obtain the following calculation results. start-indent = inherited_value_of(start-indent) + margin-corresponding + padding-corresponding + border-corresponding-width
= 0 + 0 + 0 + 5mm = 5mm
end-indent = inherited_value_of(end-indent) + margin-corresponding + padding-corresponding + border-corresponding-width
= 0 + 0 + 0 + 5mm = 5mm
If margin is not specified, it is the following results. <fo:block border="5mm double black"> margin-corresponding = start-indent - inherited_value_of(start-indent) - padding-corresponding - border-corresponding-width margin-corresponding = end-indent - inherited_value_of(end-indent) - padding-corresponding - border-corresponding-width Therefore, the result is different because of the presence of margin. margin-left = 0 - 0 - 0 - 5mm = -5mm margin-right = 0 - 0 - 0 - 5mm = -5mm |