Skip to content

Commit

Permalink
Don't set color for code samples (#221)
Browse files Browse the repository at this point in the history
* don't set color for code samples

* docs(changeset): Fix code samples background color

* update lockfile
  • Loading branch information
rohit-gohri committed Jul 12, 2022
1 parent 8a1db8a commit 1a13230
Show file tree
Hide file tree
Showing 3 changed files with 1,559 additions and 1,550 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-dryers-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'docusaurus-theme-redoc': patch
---

Fix code samples background color
8 changes: 6 additions & 2 deletions packages/docusaurus-theme-redoc/src/theme/Redoc/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,18 @@ html[data-theme='dark']
margin-bottom: 10px;
}

/* Code Samples */
/*
* Code Samples
* @see https://github.com/rohit-gohri/redocusaurus/issues/217
*/
html:not([data-theme='dark'])
.redocusaurus
div[id^='react-tabs']
> div:nth-child(1)
> pre:nth-child(2) {
background-color: var(--ifm-background-color);
background-color: transparent;
}

/** https://github.com/rohit-gohri/redocusaurus/issues/45 */
html:not([data-theme='dark']) .redocusaurus div[id^='react-tabs'] code {
color: var(--ifm-color-emphasis-0);
Expand Down
Loading

1 comment on commit 1a13230

@vercel
Copy link

@vercel vercel bot commented on 1a13230 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.