Skip to content

Commit

Permalink
fix(clayui.com): Data Provider Network Status link should scroll to c…
Browse files Browse the repository at this point in the history
…orrect spot

fix(clayui.com): Data Provider Advance link should scoll to correct spot. Renames tab id advanced to advanceTab and advancedTab to advancedTabs

fix(clayui.com): Navigation covers text when navigating to HTML fragment id

feat(clayui.com): Adds smooth-scroll for modern browsers when navigating to HTML fragment id

fixes #2815
  • Loading branch information
pat270 committed Jan 23, 2020
1 parent c57d995 commit 6ab2e30
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clayui.com/content/docs/components/data-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
- [useResource hook](#useresource-hook)
- [Features](#features)
- [Retry](#retry)
- [Network Status](#network-Status)
- [Network Status](#network-status)
- [Variables change](#variables-change)
- [Caching data](#caching-data)
- [Advanced](#advanced)
Expand Down
10 changes: 10 additions & 0 deletions clayui.com/src/styles/site/_content-site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
margin-bottom: $base-size;
margin-top: $base-size;
}

&[id] {
margin-top: calc(-81px + #{$base-size});
padding-top: 81px;

@media (min-width: $grid-float-breakpoint) {
margin-top: calc(-66px + #{$base-size});
padding-top: 66px;
}
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions clayui.com/src/styles/site/_site.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html {
scroll-behavior: smooth;
}

body {
background-color: $bg-color;
font-size: 1rem;
Expand Down
8 changes: 4 additions & 4 deletions clayui.com/src/templates/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export default props => {
aria-expanded="true"
className="active nav-link"
data-toggle="tab"
href="#advanced"
id="advancedTab"
href="#advancedTab"
id="advancedTabs"
role="tab"
>
{'React Component'}
Expand Down Expand Up @@ -140,9 +140,9 @@ export default props => {
<div className="col-12">
<div className="tab-content">
<div
aria-labelledby="advancedTab"
aria-labelledby="advancedTabs"
className="active fade show tab-pane"
id="advanced"
id="advancedTab"
role="tabpanel"
>
{fields &&
Expand Down

0 comments on commit 6ab2e30

Please sign in to comment.