mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
21 lines
524 B
TypeScript
21 lines
524 B
TypeScript
import styled from '@emotion/styled';
|
|
|
|
/**
|
|
* Render all child elements directly on top of each other.
|
|
*
|
|
* This implementation does not remove the stack of elements from the document
|
|
* flow, so width/height is reserved.
|
|
*
|
|
* An alternative would be to use `position:absolute;` in which case the size
|
|
* would not be part of document flow and other elements could render behind.
|
|
*/
|
|
const Stacked = styled('div')`
|
|
display: grid;
|
|
grid-template: 1fr / 1fr;
|
|
> * {
|
|
grid-area: 1 / 1;
|
|
}
|
|
`;
|
|
|
|
export default Stacked;
|