/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/z-stack/styles.ts
35 строк
733 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { css } from '@emotion/react'; import styled from '@emotion/styled'; export const ZStackChildView = styled.div< { offsetAmount: number; zIndex: number; } >` &:not( :first-of-type ) { ${ ( { offsetAmount } ) => css( { marginInlineStart: offsetAmount, } ) }; } ${ ( { zIndex } ) => css( { zIndex } ) }; `; export const ZStackView = styled.div< { isLayered: boolean; } >` display: inline-grid; grid-auto-flow: column; position: relative; & > ${ ZStackChildView } { position: relative; justify-self: start; ${ ( { isLayered } ) => isLayered ? // When `isLayered` is true, all items overlap in the same grid cell css( { gridRowStart: 1, gridColumnStart: 1 } ) : undefined }; } `;