Skip to content

Commit

Permalink
Release note sticky fixes (github#23643)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr committed Dec 13, 2021
1 parent 64957b7 commit 821c1e6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/release-notes/GHAEReleaseNotePatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function GHAEReleaseNotePatch({ patch, didEnterView }: Props) {
>
<header
style={{ zIndex: 1 }}
className="container-xl position-sticky top-0 color-bg-subtle border-bottom px-3 pt-4 pb-2"
className="container-xl color-bg-subtle border-bottom px-3 pt-4 pb-2"
>
<div className="d-flex flex-items-center">
<h2 className="border-bottom-0 m-0 p-0">{patch.title}</h2>
Expand Down
8 changes: 6 additions & 2 deletions components/release-notes/GHAEReleaseNotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { GHAEReleaseNotePatch } from './GHAEReleaseNotePatch'
import { GHAEReleaseNotesContextT } from './types'
import { MarkdownContent } from 'components/ui/MarkdownContent'

import styles from './PatchNotes.module.scss'

type GitHubAEProps = {
context: GHAEReleaseNotesContextT
}
Expand Down Expand Up @@ -35,8 +37,10 @@ export function GHAEReleaseNotes({ context }: GitHubAEProps) {
</article>

<aside
className="position-sticky top-0 d-none d-md-block border-left no-print color-bg-default flex-shrink-0"
style={{ width: 260, height: '100vh' }}
className={cx(
'position-sticky d-none d-md-block border-left no-print color-bg-default flex-shrink-0',
styles.aside
)}
>
<nav className="height-full overflow-auto">
<MarkdownContent data-search="article-content">
Expand Down
2 changes: 1 addition & 1 deletion components/release-notes/GHESReleaseNotePatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function GHESReleaseNotePatch({
>
<header
style={{ zIndex: 1 }}
className="container-xl position-sticky top-0 color-bg-subtle border-bottom px-3 pt-4 pb-2"
className="container-xl color-bg-subtle border-bottom px-3 pt-4 pb-2"
>
<div className="d-flex flex-items-center">
<h2 className="border-bottom-0 m-0 p-0">
Expand Down
8 changes: 6 additions & 2 deletions components/release-notes/GHESReleaseNotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { MarkdownContent } from 'components/ui/MarkdownContent'
import { GHESReleaseNotesContextT } from './types'
import { GHESReleaseNotePatch } from './GHESReleaseNotePatch'

import styles from './PatchNotes.module.scss'

type Props = {
context: GHESReleaseNotesContextT
}
Expand Down Expand Up @@ -82,8 +84,10 @@ export function GHESReleaseNotes({ context }: Props) {
</article>

<aside
className="position-sticky top-0 d-none d-md-block border-left no-print color-bg-default flex-shrink-0"
style={{ width: 260, height: '100vh' }}
className={cx(
'position-sticky d-none d-md-block border-left no-print color-bg-default flex-shrink-0',
styles.aside
)}
>
<nav className="height-full overflow-auto">
<MarkdownContent data-search="article-content">
Expand Down
11 changes: 7 additions & 4 deletions components/release-notes/PatchNotes.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
@import "@primer/css/layout/index.scss";

.sectionHeading {
scroll-margin-top: 280px !important;
@include breakpoint(sm) {
scroll-margin-top: 200px !important;
}
scroll-margin-top: 70px !important;
}

.aside {
width: 260px;
height: calc(100vh - 70px);
top: 70px;
}

0 comments on commit 821c1e6

Please sign in to comment.