Skip to content

Commit

Permalink
DOP-5133: Dark mode bug on Atlas Admin API docs (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
biancalaube authored Nov 7, 2024
1 parent 04e98ed commit 57dbc7b
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
3 changes: 3 additions & 0 deletions src/common-elements/linkify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export const linkifyMixin = className => css`
height: 15px;
background-size: contain;
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1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C45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');
}
opacity: 0.5;
visibility: hidden;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Markdown/styled.elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const StyledMarkdownBlock = styled(
}
table tr {
background-color: #fff;
background-color: ${({ theme }) => theme.background};
border-top: 1px solid #ccc;
&:nth-child(2n) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -289,7 +290,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -453,6 +454,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -624,7 +626,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -775,6 +777,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -946,7 +949,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -1159,6 +1162,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -1330,7 +1334,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -1506,6 +1510,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -1677,7 +1682,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -1824,6 +1829,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -1995,7 +2001,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -2167,6 +2173,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -2338,7 +2345,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -2540,6 +2547,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -2711,7 +2719,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -2875,6 +2883,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -3046,7 +3055,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down Expand Up @@ -3197,6 +3206,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"sortPropsAlphabetically": false,
"sortTagsAlphabetically": false,
"theme": Object {
"background": "var(--background)",
"badges": Object {
"border": "1px solid",
"borderRadius": "5px",
Expand Down Expand Up @@ -3368,7 +3378,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView
"defaultDetailsWidth": "75%",
"labelsTextSize": "0.9em",
"linesColor": "var(--schema-lines-color)",
"nestedBackground": "#fafafa",
"nestedBackground": "var(--sidebar-bg-color)",
"nestingSpacing": "1em",
"requireLabelColor": "var(--require-label-color)",
"typeNameColor": "var(--type-name-color)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`Components SchemaView OneOf deprecated should match snapshot 1`] = `
<div>
<div
class="sc-iJCRrE sc-ciSkZP dTVIxT farBIW"
class="sc-iJCRrE sc-ciSkZP dTVIxT lcgkhz"
/>
</div>
</div>
Expand Down
Loading

0 comments on commit 57dbc7b

Please sign in to comment.