[docs] Fix Safari code font size#34859
Conversation
|
|
|
||
| code[class*='language-'] { | ||
| code[class*='language-'], | ||
| pre[class*='language-'] { |
There was a problem hiding this comment.
I have synced the top of this CSS file with https://unpkg.com/prismjs/themes/prism-okaidia.css. I have also commented what is not necessary.
| // inline code | ||
| '& code': { | ||
| // inline code block | ||
| '& :not(pre) > code': { |
There was a problem hiding this comment.
I use :not(pre) in the selector to avoid the need to reset the styles for code blocks. This selector more accurately selects inline code and ONLY. For example, it matches 1. but doesn't 2.
- A
fooB
<Foo />1f8a463 to
498345b
Compare
| right: `${theme.spacing(1)} /*! @noflip */`, | ||
| fontFamily: 'inherit', | ||
| fontSize: '0.813rem', | ||
| fontSize: theme.typography.pxToRem(13), |
There was a problem hiding this comment.
The correct API
| .token.doctype, | ||
| .token.cdata { | ||
| color: slategray; | ||
| color: #8292a2; |
There was a problem hiding this comment.
| } | ||
|
|
||
| .namespace { | ||
| .token.namespace { |
There was a problem hiding this comment.
7b1900a to
a3e9f19
Compare
300b89e to
56ee07a
Compare
ff7ab46 to
524075d
Compare
| '& pre': { | ||
| fontSize: theme.typography.pxToRem(16), | ||
| }, |
There was a problem hiding this comment.
This has no impacts, e.g. https://mui.com/blog/date-pickers-stable-v5/#integrated-localization. It's dead code.
|
There are many changes unrelated to the Safari code font size in this PR. Could you either split it into multiple PRs or summarize all the changes in the description and rename the PR to better reflect what it's about? |
|
@michaldudak I think that we could create about 10 PRs out of this one, which more or less matches each of the line comments. |
|
IMO it's important to have a description matching the content of the PR. When I do |
dc5fe89 to
b94554f
Compare
b94554f to
1a7686f
Compare
|
@michaldudak Done, I have isolated the changes to different PRs. |
| // Reset for Safari | ||
| // https://github.com/necolas/normalize.css/blob/master/normalize.css#L102 | ||
| fontSize: '1em', |
There was a problem hiding this comment.
The fix for Safari font size is to not apply the custom font size on the <code> but on the <pre> element.
The fix relies on https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
Before
https://6357aef90039260008eccf21--material-ui-docs.netlify.app/material-ui/react-skeleton/#usage
After
https://deploy-preview-34859--material-ui.netlify.app/material-ui/react-skeleton/#usage
Why work on this?
Because iOS & blog posts 🙈: