Skip to content

Commit

Permalink
style(layout): adjust grid and card spacing variables
Browse files Browse the repository at this point in the history
- reduce card gap from 2rem to 1.5rem for better content density
- increase grid gap from 1.5rem to 1.75rem for improved layout spacing
- replace data-flex-grid with data-flex in card stories
- add new data-flex alignment modifiers (start/end)
- remove redundant media query for flex justify-content
  • Loading branch information
shawnsandy committed Oct 25, 2024
1 parent b73011e commit 4717f10
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion libs/react/fpkit/src/components/cards/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
--card-position: relative;
--card-display: flex;
--card-direction: column;
--card-gap: 2rem;
--card-gap: 1.5rem;
--card-w: 33%;
}
[data-card],
Expand Down
2 changes: 1 addition & 1 deletion libs/react/fpkit/src/components/cards/card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const FlexibleContent: Story = {
},
},
render: (args) => (
<div data-flex-grid>
<div data-flex>
<Card {...args}>
<Card.Title>Card Title</Card.Title>
<Card.Content>
Expand Down
16 changes: 12 additions & 4 deletions libs/react/fpkit/src/sass/_grid.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
--gap: 1.5rem;
--gap: 1.75rem;
}

[data-grid] {
Expand Down Expand Up @@ -28,9 +28,17 @@
margin-inline: auto;
justify-content: center;
gap: var(--gap);
@media screen and (max-width: 1080px) {
justify-content: center;
}
// @media screen and (max-width: 1080px) {
// justify-content: center;
// }
}

[data-flex~='start'] {
justify-content: start;
}

[data-flex~='end'] {
justify-content: end;
}

[data-flex-grid] {
Expand Down
2 changes: 1 addition & 1 deletion libs/react/fpkit/src/styles/cards/card.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions libs/react/fpkit/src/styles/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/react/fpkit/src/styles/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4717f10

Please sign in to comment.