Commit 237e28e1 authored by Julie Blanc's avatar Julie Blanc

delete position absolute

parent 06bc3e10
......@@ -81,14 +81,12 @@ First, the script create the baseline:
* calculate the baseline position in fonction of this `p` element
After, each elements are snap to the baseline with the following calculations:
- acces to the metric of the font to calculate the position of the baseline of each font and snap it on the main baseline of the document with position relative
- acces to the metric of the font to calculate the position of the baseline of each font and snap it on the main baseline of the document by adding padding-top (let's call it here the "gap").
- set the new line-height of the element for a superior multiple of the baseline according to the line-height of the element (* see "more about CSS line-height")
- set the new margin top and the new margin bottom in the same way to avoid problem with margin collapse (* see "note about margin collapse")
- set new paddings in two ways:
* if `strict: true`: get the sum of padding top + border top and set a new padding-top so that this sum is equal to a superior multiple of the baseline, same with the sum of padding bottom + border bottom
* if `strict: false`: get the sum of padding top + border top + padding-bottom + border-bottom, calculate superiotr multiple of the baseline, divides the result by 2 and adds the new result to padding-top and padding bottom
* if `strict: true`: get the sum of padding top + border top and set a new padding-top so that this sum is equal to a superior multiple of the baseline + the gap, same with the sum of padding bottom + border bottom
* if `strict: false`: get the sum of padding top + border top + padding-bottom + border-bottom, calculate superiotr multiple of the baseline, divides the result by 2 and adds the new result to padding-top and padding bottom, adds also the gap in padding-top
### (*) Note about margin collapse
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment