Skip to content

Commit

Permalink
chore: add header offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Sep 20, 2024
1 parent 5769472 commit eab4b3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/features/plugin-catalog/src/client/styles/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
--catalog-c-control: var(--vp-c-bg-alt);
--catalog-c-control-hover: var(--vp-c-bg-alt);
--catalog-c-gutter: var(--vp-c-gutter);
--catalog-header-offset: var(--navbar-height, 3.6rem);
--catalog-header-offset: var(--header-offset, 3.6rem);
}
4 changes: 2 additions & 2 deletions themes/theme-default/src/client/styles/content/normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
h4,
h5,
h6 {
margin-top: calc(0.5rem - var(--navbar-height));
margin-top: calc(0.5rem - var(--header-offset));
margin-bottom: 0;
padding-top: calc(1rem + var(--navbar-height));
padding-top: calc(1rem + var(--header-offset));

&:first-child {
margin-bottom: 1rem;
Expand Down
3 changes: 3 additions & 0 deletions themes/theme-default/src/client/styles/vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
--content-width: 740px;
--homepage-width: 960px;

// header offset
--header-offset: var(--navbar-height);

// transition vars
--vp-t-color: 0.3s ease;
--vp-t-transform: 0.3s ease;
Expand Down

0 comments on commit eab4b3c

Please sign in to comment.