Skip to content
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 code block color inside a <blockquote> #2378

Merged
merged 2 commits into from
Feb 20, 2023
Merged

Fix code block color inside a <blockquote> #2378

merged 2 commits into from
Feb 20, 2023

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Feb 3, 2023

What are you trying to accomplish?

This fixes https://github.com/github/primer/issues/1778 where code blocks would inherit the subtle text color when inside a blockquote:

Before After
Screen Shot 2023-02-03 at 11 22 07 Screen Shot 2023-02-03 at 11 22 34

Live example:

for (let line = "#"; line.length < 8; line += "#") {
console.log(line)
}

What approach did you choose and why?

Adding color: var(--color-fg-default); to .markdown-body .highlight pre should override the blockquote color.

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2023

🦋 Changeset detected

Latest commit: 642ba6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simurai simurai changed the title Set default color for code blocks Fix code block color inside a <blockquote> Feb 3, 2023
@simurai simurai marked this pull request as ready for review February 3, 2023 02:32
@simurai simurai requested a review from a team as a code owner February 3, 2023 02:32
@github-actions github-actions bot temporarily deployed to Storybook Preview February 3, 2023 02:34 Inactive
@github-actions github-actions bot temporarily deployed to Storybook Preview February 3, 2023 02:39 Inactive
@simurai simurai merged commit 55f35e1 into main Feb 20, 2023
@simurai simurai deleted the fix-code-blocks branch February 20, 2023 07:32
@primer-css primer-css mentioned this pull request Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant