-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[docs] Redesign on markdown page #27860
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
27793a1
Use branding design tokens & components on the docs
mnajdova f46a580
AppBar updates
mnajdova 26ed248
fix wrong prop value
mnajdova f88811a
lint & prettier
mnajdova 060171d
fixed some dark mode colors
mnajdova 2b64020
design tweaks
danilo-leal 78cd9c7
Buttons width fixed
mnajdova 241e76e
Resolve comments
mnajdova 0aeb791
prettier
mnajdova 8d56ec0
Update demo toolbar, header, table of content
mnajdova 4281c6b
Merge branch 'next' into docs/redesign-second-iteration
mnajdova 2025bbc
scrollbar
mnajdova 8983c4b
improve contrast on API links
mnajdova f890527
table of contents and scrollbar tweaks
danilo-leal bd081cf
Merge branch 'docs/redesign-second-iteration' of https://github.com/m…
danilo-leal 96f6c44
adjust colors
mnajdova 92a15a1
demo toolbar tweaks
danilo-leal 986da86
language toggle button tweaks
danilo-leal 3dd1ad7
demo toolbar icons tweak
danilo-leal 3f134ae
Merge branch 'docs/redesign-second-iteration' of https://github.com/m…
danilo-leal 085d0a2
Fix rtl on the demos
mnajdova c58ac81
blockquote and other small overall tweaks
danilo-leal b6ffd37
Merge branch 'docs/redesign-second-iteration' of https://github.com/m…
danilo-leal b1ada6e
table paddings
danilo-leal b37d055
divider color
danilo-leal f35676c
headings and link colors
danilo-leal 7bd43d2
Revert darkScrollbar changes, lint & prettier fixes
mnajdova 99b47ec
more fixes
mnajdova 68212a1
Merge branch 'next' into docs/redesign-second-iteration
mnajdova 367273c
fix border radiuses on demos
mnajdova b2dcfa0
Fix misaligmend on the demos and the content of the page
mnajdova 01f3bf6
Merge branch 'next' into docs/redesign-second-iteration
mnajdova 5f3a240
Update docs/src/modules/components/MarkdownElement.js
siriwatknp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,12 @@ const Nav = styled('nav')(({ theme }) => { | |
top: 70, | ||
// Fix IE11 position sticky issue. | ||
marginTop: 70, | ||
width: 175, | ||
width: 200, | ||
flexShrink: 0, | ||
position: 'sticky', | ||
height: 'calc(100vh - 70px)', | ||
overflowY: 'auto', | ||
padding: theme.spacing(2, 2, 2, 0), | ||
padding: theme.spacing(2, 5, 2, 0), | ||
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. Are you sure about this? that will reduce the space of text. |
||
display: 'none', | ||
[theme.breakpoints.up('sm')]: { | ||
display: 'block', | ||
|
@@ -29,7 +29,10 @@ const Nav = styled('nav')(({ theme }) => { | |
const NavLabel = styled(Typography)(({ theme }) => { | ||
return { | ||
marginTop: theme.spacing(2), | ||
paddingLeft: theme.spacing(1), | ||
paddingLeft: theme.spacing(1.5), | ||
fontSize: '.75rem', | ||
fontWeight: 600, | ||
color: theme.palette.mode === 'dark' ? theme.palette.grey[800] : theme.palette.grey[500], | ||
}; | ||
}); | ||
|
||
|
@@ -45,17 +48,22 @@ const NavItem = styled(Link, { | |
const activeStyles = { | ||
borderLeftColor: | ||
theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800], | ||
color: theme.palette.mode === 'dark' ? theme.palette.grey[400] : theme.palette.grey[800], | ||
}; | ||
|
||
return { | ||
fontSize: '.8125rem', | ||
padding: theme.spacing(0.5, 0, 0.5, secondary ? 2.5 : '5px'), | ||
borderLeft: `3px solid transparent`, | ||
padding: theme.spacing(0.5, 0, 1, secondary ? 3 : '10px'), | ||
borderLeft: `2px solid transparent`, | ||
boxSizing: 'border-box', | ||
'&:hover': { | ||
borderLeftColor: | ||
theme.palette.mode === 'light' ? theme.palette.grey[200] : theme.palette.grey[900], | ||
theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900], | ||
color: theme.palette.grey[700], | ||
}, | ||
...(!active && { | ||
color: theme.palette.mode === 'dark' ? theme.palette.grey[500] : theme.palette.grey[900], | ||
}), | ||
// TODO: We probably want `aria-current="location"` instead. | ||
// If so, are we sure "current" and "active" states should have the same styles? | ||
...(active && activeStyles), | ||
|
@@ -193,7 +201,6 @@ export default function AppTableOfContents(props) { | |
const itemLink = (item, secondary) => ( | ||
<NavItem | ||
display="block" | ||
color={activeState === item.hash ? 'textPrimary' : 'textSecondary'} | ||
href={`${activePage.linkProps?.as ?? activePage.pathname}#${item.hash}`} | ||
underline="none" | ||
onClick={handleClick(item.hash)} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think it should be lighter than
700
. So far,700, 800, 900
are background.