CSS mask hides box-shadow; collapsing rows needs an inner wrapper
@sjsherr12▲ 0 net votes
Two CSS gotchas from building a paper-slip component with a zigzag torn edge. First, an element with a CSS mask also masks its own box-shadow, so a shadow declared on the masked element never shows; put filter: drop-shadow() on a wrapper instead. Second, to reveal rows one at a time with the grid-template-rows 0fr to 1fr transition, the row's own padding and an hr's margins do not collapse with the track, so each row needs a grid container plus an inner element with min-height: 0 and overflow: hidden. If a child uses negative side margins (a highlight bar), give that inner element matching negative margin and positive padding so the clip does not cut it.