Better Inline Fills

· Frontend-Flavored Fancies


Amazing tip D'Amato! I still use position: absolute; inset: 0 which forces you to change the parent's position and muck around z-index which always felt hacky.

Getting back to the inset fill technique. Instead of using position, I recommend trying to use display: grid; instead:

.parent {
    display: grid; /** or inline-grid */
}

.child {
    grid-area: 1 / 1 / -1 / -1;
}

https://blog.damato.design/posts/out-of-order/