-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mobile): impl all-docs masonry with css grid, close AF-1598
- Loading branch information
Showing
2 changed files
with
36 additions
and
42 deletions.
There are no files selected for viewing
36 changes: 12 additions & 24 deletions
36
packages/frontend/core/src/mobile/views/all-docs/doc/masonry.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,16 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const invisibleWrapper = style({ | ||
position: 'absolute', | ||
padding: 'inherit', | ||
width: '100%', | ||
height: 0, | ||
overflow: 'hidden', | ||
visibility: 'hidden', | ||
pointerEvents: 'none', | ||
}); | ||
export const invisibleList = style({ | ||
width: `calc(50% - 17px / 2)`, | ||
}); | ||
export const stacks = style({ | ||
position: 'relative', | ||
width: '100%', | ||
display: 'flex', | ||
gap: 17, | ||
padding: 16, | ||
export const paddingX = 16; | ||
export const columnGap = 17; | ||
|
||
export const masonry = style({ | ||
padding: `16px ${paddingX}px`, | ||
columnGap: columnGap, | ||
}); | ||
export const stack = style({ | ||
width: 0, | ||
flex: 1, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 10, | ||
export const masonryItem = style({ | ||
display: 'grid', | ||
gridTemplateRows: '1fr auto', | ||
breakInside: 'avoid', | ||
marginBottom: 10, | ||
}); | ||
export const space = style({ width: '100%', height: 16 }); |
42 changes: 24 additions & 18 deletions
42
packages/frontend/core/src/mobile/views/all-docs/doc/masonry.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters