-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Refactor markup code block styles #30294
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
Conversation
f7f969c
to
ac1b49f
Compare
Root of the problem is that We should tread careful around this markup CSS, we should stay as close as possible to GH CSS. What were you targeting with BTW, I already did a different fix for this in #30282, but am not happy with it either. .markup .highlight pre > code,
.markup pre > code {
background: none !important;
} |
@silverwind I believe is good enough and it is a right fix. It clearly defines the styles for different Update:
It would just introduce more overridings, and make the styles more difficult to maintain.
|
font-size: 85%; | ||
white-space: break-spaces; | ||
background-color: var(--color-markup-code-block); | ||
border-radius: var(--border-radius); | ||
} |
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 disagree with this selector list. what about blockquote > code
etc, you can't possibly list every single element here.
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.
Would like to see .markup code:not(.code-inner)
being reverted to .markup code
. This is too hacky.
I don't see anything hacky. The existing code is more hacky and will cause more problems. |
If we really have to we, can use I will continue the fix in #30282 where I will revert the |
I have no interesting for playing style overriding games, as always. |
-> Fix code block style for code preview #30298 I think it is better than overriding unnecessary styles. |
Close #30292