Skip to content

Commit

Permalink
feat: Allow long text in AppHighlightAlert
Browse files Browse the repository at this point in the history
I had to play with margin-bottom on AppHighlightAlert and grid-gap to
counterbalance the removal of auto-fit.
  • Loading branch information
zatteo committed Oct 27, 2023
1 parent bd63bd6 commit da990e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/components/AppHighlightAlert/AppHighlightAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const AppHighlightAlert = ({
gridRow: rowIndex,
gridColumn: '1 / -1',
paddingTop: 0,
paddingBottom: 0
paddingBottom: 0,
marginBottom: '1.25rem' // to correspond to the margin of SquareAppIcon name in the CSS Grid
}}
>
<span
Expand Down
2 changes: 1 addition & 1 deletion src/components/Applications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const Applications = ({ onAppsFetched }) => {
<div className="app-list-wrapper u-m-auto u-w-100">
<Divider className="u-mv-0" />

<div className="app-list u-w-100 u-mv-3 u-mv-2-t u-mh-auto u-flex-justify-center">
<div className="app-list u-w-100 u-mv-3 u-mt-2-t u-mb-1-t u-mh-auto u-flex-justify-center">
{getApplicationsList(data)}

{shortcuts.map((shortcut, index) => (
Expand Down
10 changes: 4 additions & 6 deletions src/styles/lists.styl
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@
max-width 'calc(%s * 8 + %s * 7 + 4rem)' % (appTileSize appGridGutter) // 8 columns + 7 column gaps + border gaps
display grid
grid-template-columns repeat(auto-fill, appTileWithGutter)
grid-template-rows rem(91) repeat(auto-fit, rem(91)) // first row is for the divider
grid-auto-rows rem(91)
grid-gap rem(35) 0
grid-auto-rows minmax(rem(91), auto)
grid-gap rem(10) 0
justify-content center

+small-screen()
grid-template-columns repeat(auto-fill, mobileTileWithGutter)
grid-template-rows rem(68) repeat(auto-fit, rem(68)) // first row is for the divider
grid-auto-rows rem(68)
grid-gap rem(20) 0
grid-auto-rows minmax(rem(68), auto)
grid-gap rem(5) 0

.item-grid-icon
width rem(16)
Expand Down

0 comments on commit da990e6

Please sign in to comment.