Repository navigation
@chassis-ui/react v0.4.0
Minor Changes
-
daf128c:
RowandColare removed with the flexbox grid of@chassis-ui/css0.7.GridandGridItem
take what the grid of css 0.7 adds: row counts as a class, the flow, end lines and the container
breakpoints. The layout components have noresponsiveprop: each of their props takes its own
value per breakpoint.Breaking:
@chassis-ui/css0.7 is required (the peer range is>=0.7.0 <0.8.0), and a project
that compiles its Sass needs@chassis-ui/tokens0.7. css 0.7 changes how a page looks with no
change of markup: the gap of a grid with nogapis 1rem, and 1.5rem frommd, where it went from
0.5rem to 3rem; the padding of aContaineris 1rem, and 1.5rem frommd, where it was 0.75rem;
subtle text is less faint, and the context colors of the dark theme are lighter. The changelog of
@chassis-ui/css0.7.0 has the full list.- Breaking:
Row,Col,RowPropsandColPropsare removed. They were deprecated in 0.3.0, and
css 0.7 has none of the classes they rendered. The Grid page of the docs maps each of their props
toGridandGridItem(Migrating from Row/Col). - Breaking: the
responsiveprop ofFlex,Stack,Grid,GridItem,Card,CardBody,
CardImageandSkeletonis removed. Each prop it held takes the breakpoints itself: one value
for every width, or an object withbasefor the narrowest width and a key per breakpoint.
<GridItem span="full" responsive={{ md: { span: 6 } }}>is
<GridItem span={{ base: 'full', md: 6 }}>,
<Flex direction="column" responsive={{ md: { direction: 'row', gap: 'md' } }}>is
<Flex direction={{ base: 'column', md: 'row' }} gap={{ md: 'md' }}>, and
<Stack direction="vertical" responsive={{ md: 'horizontal' }}>is
<Stack direction={{ base: 'vertical', md: 'horizontal' }}>. The classes they render are the
same. With TypeScript, aresponsiveleft behind is a type error; without it, the prop reaches
the element as an attribute and the breakpoint classes are gone. TheResponsivetype is
exported, and theGridLayoutandGridItemLayouttypes are removed.responsiveofTable,
StaticTableandDraweris another prop, and stays. - Breaking:
rowsofGrid, and of asubgridGridItem, renders thegrid-rows-{n}class for a
count from 1 to 6, and setsgrid-template-rowsinline for any other. It set--cx-grid-rows,
which css 0.7 removed, so on css 0.7 the prop of 0.3 does nothing. A grid with norowsno longer
has one template row: its rows are as tall as their content. A grid nested in a grid withrows
no longer takes that row count. - Breaking:
<Grid fill>with nominwraps. Its columns are at least 12rem wide in css 0.7, where
every child shared one row. Setminfor another width. - Breaking:
start={13}androwStart={7}have no class in css 0.7, which stops the start lines
at the last track. Place an item against the end edge withend:span={3} end={13}. GridItemtakesendandrowEnd, a line number or'auto'(col-end-{n},row-end-{n}), for
every width or per breakpoint.Gridtakesflow:'row','column','dense','row-dense'or'column-dense', the values
of CSSgrid-auto-flow, rendered as thegrid-flow-*classes.flow="column"fills therows
of a column before it starts the next.flowandrowstake a value per breakpoint, as
columnsandgapdo. TheGridFlowtype is exported.- The props of
GridandGridItemtake the container keys'@sm'to'@2xl'beside the
breakpoint keys:span={{ '@md': 4 }}renders@md:col-span-4, which follows
the width of the nearest query container (an ancestor with thecontains-inlineclass) where
mdfollows the viewport. A container key wins over a breakpoint key where both apply. The
ContainerBreakpointtype is exported. Gridtakescontained(thecontainedclass): its default gutter and column count follow the
query container too.Skeleton: aspanof12or'auto'at a breakpoint works. It rendersmd:w-100and
md:w-auto, which css 0.7 has and css 0.6 lacked.
- Breaking: