Skip to content

Commit 165c86a

Browse files
committed
Fix yellow backgrounds for darkmode
1 parent 4db7e94 commit 165c86a

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/components/common/Diff/DiffSection.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState, useCallback } from 'react'
2+
import { Typography } from 'antd'
23
import styled from '@emotion/styled'
34
import semver from 'semver'
45
import Diff from './Diff'
@@ -7,7 +8,7 @@ export const testIDs = {
78
diffSection: 'diffSection',
89
}
910

10-
const Title = styled.h1`
11+
const Title = styled(Typography.Title)`
1112
margin-top: 0.5em;
1213
`
1314

@@ -46,7 +47,9 @@ const DiffSection = ({
4647
return (
4748
<div data-testid={testIDs.diffSection}>
4849
{title && completedDiffs.length > 0 && (
49-
<Title ref={doneTitleRef}>{title}</Title>
50+
<Title ref={doneTitleRef} level={2}>
51+
{title}
52+
</Title>
5053
)}
5154

5255
{diff.map((diffFile) => {

src/components/common/UsefulContentSection.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import { PACKAGE_NAMES } from '../../constants'
1818
const Container = styled.div`
1919
position: relative;
2020
margin-top: 16px;
21-
color: rgba(0, 0, 0, 0.65);
2221
overflow: hidden;
2322
`
2423

2524
const InnerContainer = styled.div`
26-
color: rgba(0, 0, 0, 0.65);
27-
background-color: #fffbe6;
25+
color: ${({ theme }) =>
26+
theme.text + 'D9'}; // the D9 adds some transparency to the text color
27+
background-color: ${({ theme }) => theme.yellowBackground};
2828
border-width: 1px;
2929
border-left-width: 7px;
3030
border-color: ${({ theme }) => theme.yellowBorder};
@@ -112,16 +112,12 @@ const HideContentButton = styled(
112112
border-width: 0px;
113113
width: 20px;
114114
height: 20px;
115-
color: rgba(0, 0, 0, 0.45);
116-
&:hover,
117-
&:focus {
118-
color: #24292e;
119-
}
115+
color: ${({ theme }) => theme.text + '73'}; // 45% opacity
120116
`
121117

122118
const Separator = styled.hr`
123119
margin: 15px 0;
124-
background-color: #e1e4e8;
120+
background-color: ${({ theme }) => theme.border};
125121
height: 0.25em;
126122
border: 0;
127123
`

src/theme/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const lightTheme = {
77
border: '#e8e8e8',
88
greenBorder: '#bef5cb',
99
yellowBorder: '#ffe58f',
10+
yellowBackground: '#fffbe6',
1011

1112
diff: {
1213
decoration: '#dbedff',
@@ -40,7 +41,8 @@ export const darkTheme = {
4041
textHover: '#999',
4142
border: '#888',
4243
greenBorder: '#bef5cb',
43-
yellowBorder: '#ffe58f',
44+
yellowBorder: '#c69026',
45+
yellowBackground: '#37332A',
4446

4547
diff: {
4648
decoration: '#dbedff',

0 commit comments

Comments
 (0)