cheat/dev

inset (top/right/bottom/left)

Atalho para top, right, bottom e left de uma vez.

Sintaxe

inset: 0;
inset: 10px 20px;
inset: 0 0 auto 0;

inset: 0 em um elemento absolute faz ele cobrir todo o pai (overlay). Funciona com position absolute, fixed e sticky.

Exemplo

.overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.barra-topo { position: fixed; inset: 0 0 auto 0; }