File tree Expand file tree Collapse file tree
znai-docs/znai/release-notes/1.90 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ * Add: [ Page Tabs] ( layout/page-tabs ) now have a breathing room for headers and footnotes below the tabs row
Original file line number Diff line number Diff line change 11.page-content mark {
22 background-color : var (--znai-search-preview-result-highlight-background-color );
33 color : var (--znai-search-preview-result-highlight-color );
4+ }
5+
6+ .page-content .with-page-tabs [id ] {
7+ scroll-margin-top : 32px ;
48}
Original file line number Diff line number Diff line change @@ -35,21 +35,22 @@ class Page extends Component {
3535 const { tocItem } = this . props ;
3636
3737 const PageBottomPadding = pageTypesRegistry . pageBottomPaddingComponent ( tocItem ) ;
38+ const tabIds = extractTabIds ( this . props . content ) ;
39+ const className = "page-content" + ( tabIds . length > 0 ? " with-page-tabs" : "" ) ;
3840
3941 return (
4042 < React . Fragment >
41- < div className = "page-content" ref = { this . contentRootDomRef } >
42- { this . renderPageContent ( ) }
43+ < div className = { className } ref = { this . contentRootDomRef } >
44+ { this . renderPageContent ( tabIds ) }
4345 </ div >
4446 < PageBottomPadding />
4547 </ React . Fragment >
4648 ) ;
4749 }
4850
49- renderPageContent ( ) {
51+ renderPageContent ( tabIds ) {
5052 const { tocItem } = this . props ;
5153 const contentRootDom = this . contentRootDomRef . current ;
52- const tabIds = extractTabIds ( this . props . content ) ;
5354
5455 if ( tabIds . length > 0 ) {
5556 return < PageTabsPageContent key = { tocItem . pageTitle } { ...this . props } tabIds = { tabIds } contentRootDom = { contentRootDom } /> ;
Original file line number Diff line number Diff line change 5151
5252 overflow-y : scroll;
5353 -webkit-overflow-scrolling : touch;
54+
55+ scroll-padding-top : 24px ;
5456}
5557
5658.znai-main-panel : focus {
You can’t perform that action at this time.
0 commit comments