Skip to content

Commit

Permalink
Make sure ProductHero is sticky on scroll (#4952)
Browse files Browse the repository at this point in the history
<!--
PR title: GRW-123 / Feature / Awesome new thing
-->

## Describe your changes
Set minHeight instead of height to allow ProductHero to be sticky

### Before

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/nv8d5VeBPARA7ezh3Od3/3387fb68-f387-4574-95df-7ad480dc9b16.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/nv8d5VeBPARA7ezh3Od3/3387fb68-f387-4574-95df-7ad480dc9b16.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/nv8d5VeBPARA7ezh3Od3/3387fb68-f387-4574-95df-7ad480dc9b16.mov">Screen Recording 2024-11-04 at 13.33.01.mov</video>

### After
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/nv8d5VeBPARA7ezh3Od3/f88d798a-7b09-4b9e-8b1c-d9a8936cf2b7.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/nv8d5VeBPARA7ezh3Od3/f88d798a-7b09-4b9e-8b1c-d9a8936cf2b7.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/nv8d5VeBPARA7ezh3Od3/f88d798a-7b09-4b9e-8b1c-d9a8936cf2b7.mov">Screen Recording 2024-11-04 at 13.48.03.mov</video>

<!--
What changes are made?
If there are many changes, a list might be a good format.
If it makes sense, add screenshots and/or screen recordings here.
-->

## Justify why they are needed

## Checklist before requesting a review

- [ ] I have performed a self-review of my code
  • Loading branch information
gustaveen authored Nov 4, 2024
1 parent f7a2bd9 commit a950246
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const pageGrid = style({
gridTemplateRows: 'min-content 1fr',
columnGap: tokens.space.md,
maxWidth: tokens.width.layoutMax,
height: [`calc(100vh - ${HEADER_HEIGHT_MOBILE})`, `calc(100svh - ${HEADER_HEIGHT_MOBILE})`],
minHeight: [`calc(100vh - ${HEADER_HEIGHT_MOBILE})`, `calc(100svh - ${HEADER_HEIGHT_MOBILE})`],
marginInline: 'auto',
paddingInline: tokens.space.md,
paddingBottom: tokens.space.xl,
Expand All @@ -19,7 +19,10 @@ export const pageGrid = style({
lg: {
gridTemplateRows: 'auto',
gridTemplateColumns: 'repeat(14, 1fr)',
height: [`calc(100vh - ${HEADER_HEIGHT_DESKTOP})`, `calc(100svh - ${HEADER_HEIGHT_DESKTOP})`],
minHeight: [
`calc(100vh - ${HEADER_HEIGHT_DESKTOP})`,
`calc(100svh - ${HEADER_HEIGHT_DESKTOP})`,
],
paddingInline: tokens.space.lg,
},
}),
Expand Down

0 comments on commit a950246

Please sign in to comment.