-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nav to take full width in the docs page #935
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ class DocsLayout extends React.Component { | |
metadata={metadata}> | ||
<div className="docMainWrapper wrapper"> | ||
<DocsSidebar metadata={metadata} /> | ||
<Container className="mainContainer"> | ||
<Container className="mainContainer docMainContainer"> | ||
<DocComponent | ||
metadata={metadata} | ||
content={content} | ||
|
@@ -116,7 +116,7 @@ class DocsLayout extends React.Component { | |
)} | ||
</Container> | ||
{hasOnPageNav && ( | ||
<nav className="onPageNav"> | ||
<nav className="onPageNav docOnPageNav"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question regarding this line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because the class is used in other page, like blog so it may break the other page if i modify it directly |
||
<OnPageNav rawContent={content} /> | ||
</nav> | ||
)} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -712,6 +712,11 @@ blockquote { | |
.mainContainer .wrapper .posts .post { | ||
width: 100%; | ||
} | ||
|
||
.docMainContainer { | ||
flex-basis: 920px !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we avoid using |
||
flex-grow: 0 !important; | ||
} | ||
} | ||
/* End of Main Container */ | ||
|
||
|
@@ -1489,7 +1494,8 @@ input::placeholder { | |
|
||
@media only screen and (min-width: 1024px) { | ||
.docMainWrapper { | ||
width: 100%; | ||
max-width:100% !important ; | ||
margin: 0; | ||
} | ||
|
||
.docMainWrapper > * { | ||
|
@@ -1564,7 +1570,9 @@ input::placeholder { | |
|
||
@media only screen and (min-width: 1024px) { | ||
.docsNavContainer { | ||
flex: 0 0 240px; | ||
flex: 1 0 240px; | ||
display: flex; | ||
justify-content: flex-end; | ||
height: calc(100vh - 50px); | ||
position: -webkit-sticky; | ||
position: sticky; | ||
|
@@ -1607,7 +1615,7 @@ input::placeholder { | |
} | ||
|
||
.separateOnPageNav .docsNavContainer { | ||
flex: 0 0 240px; | ||
flex: 1 0 240px; | ||
} | ||
} | ||
|
||
|
@@ -1969,6 +1977,10 @@ input::placeholder { | |
top: 90px; | ||
} | ||
|
||
.docOnPageNav { | ||
flex: 1 0 240px; | ||
} | ||
|
||
.onPageNav > .toc-headings { | ||
border-left: 1px solid #e0e0e0; | ||
padding: 10px 0 2px 15px; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not directly add the rules within
docMainContainer
intomainContainer
? Is there a need for a new class?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the class is used in other page, like blog so it may break the other page if i modify it directly