CKTIS / CSS
Vlastnosť CSS `margin-inline-end`
`margin-inline-end` nastaví vonkajší okraj na logickom konci riadkovej osi; fyzickú stranu určuje režim písania a smer textu.
Verzia: CSS modules; captured CSSWG editor index includes draft and obsolete features requiring review
Syntax
<'margin-top'>margin-inline-end nastaví vonkajší okraj na logickom konci riadkovej osi; fyzickú stranu určuje režim písania a smer textu.
Príklad ukazuje tri hranice: vo vodorovnom RTL je inline-end vľavo a 10 % z riadkového rozmeru 200 px vytvorí medzeru 20 px; vo zvislom LTR je dole a 10 % zo 100 px dá 10 px; -6px prekryje susedné položky.
Gramatika: <'margin-top'>.
Percento sa počíta z riadkového rozmeru obsahujúceho bloku. Záporné hodnoty sú povolené, okraje na riadkovej osi nesplývajú a auto pohltí voľné miesto len v rozložení, ktoré ho rozdeľuje.
Príklady
<!doctype html><meta charset="utf-8"><div id="h"><i></i><i></i></div><div id="v"><i></i><i></i></div><div id="n"><i></i><i></i></div><pre id="result"></pre><script>
const setup=(box,css,value)=>{box.style.cssText='display:flex;'+css;for(const item of box.children)item.style.cssText='display:block;width:20px;height:20px';box.firstElementChild.style.marginInlineEnd=value};setup(h,'direction:rtl;width:200px;height:30px','10%');setup(v,'writing-mode:vertical-rl;direction:ltr;width:30px;height:100px','10%');setup(n,'direction:ltr;width:100px;height:30px','-6px');const [ha,hb]=[...h.children].map(x=>x.getBoundingClientRect()),[va,vb]=[...v.children].map(x=>x.getBoundingClientRect()),[na,nb]=[...n.children].map(x=>x.getBoundingClientRect()),hs=getComputedStyle(h.firstElementChild),vs=getComputedStyle(v.firstElementChild);result.textContent='rtl-left-gap='+Math.round(ha.left-hb.right)+'; rtl-physical='+hs.marginLeft+'; vertical-bottom-gap='+Math.round(vb.top-va.bottom)+'; vertical-physical='+vs.marginBottom+'; negative-gap='+Math.round(nb.left-na.right);
</script>Výsledok
rtl-left-gap=20; rtl-physical=20px; vertical-bottom-gap=10; vertical-physical=10px; negative-gap=-6
Príklad bol spustený lokálne v izolovanej relácii Chrome bez siete; výsledok pochádza z CSS API prehliadača.