Skip to content

Commit d3a3905

Browse files
Tidy up border colours (#9840)
* Remove unused text.dynamoMeta * Replace source's deprecated border with source's palette * Remove deprecated (and unused) border.secondary from decidePalette
1 parent 1dd3078 commit d3a3905

20 files changed

+58
-84
lines changed

dotcom-rendering/src/components/Discussion/Comment.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { css } from '@emotion/react';
22
import {
3-
border,
43
from,
54
remSpace,
65
palette as sourcePalette,
@@ -119,7 +118,7 @@ const commentLinkStyling = css`
119118
`;
120119

121120
const commentWrapper = css`
122-
border-top: 1px solid ${border.secondary};
121+
border-top: 1px solid ${sourcePalette.neutral[86]};
123122
display: flex;
124123
padding: ${space[2]}px 0;
125124
`;

dotcom-rendering/src/components/Discussion/CommentContainer.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { css } from '@emotion/react';
2-
import {
3-
border,
4-
palette as sourcePalette,
5-
space,
6-
} from '@guardian/source-foundations';
2+
import { palette as sourcePalette, space } from '@guardian/source-foundations';
73
import { SvgPlus } from '@guardian/source-react-components';
84
import { useEffect, useState } from 'react';
95
import { getMoreResponses } from '../../lib/discussionApi';
@@ -48,7 +44,7 @@ const nestingStyles = css`
4844
`;
4945

5046
const topBorder = css`
51-
border-top: 1px solid ${border.secondary};
47+
border-top: 1px solid ${sourcePalette.neutral[86]};
5248
`;
5349

5450
const commentContainerStyles = css`

dotcom-rendering/src/components/Discussion/Dropdown.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { css } from '@emotion/react';
22
import {
33
background,
4-
border,
54
from,
65
palette as sourcePalette,
76
textSans,
@@ -26,7 +25,7 @@ const containerStyles = css`
2625
const ulStyles = css`
2726
z-index: 2;
2827
list-style: none;
29-
border: 1px solid ${border.secondary};
28+
border: 1px solid ${sourcePalette.neutral[86]};
3029
margin-left: -8px;
3130
padding: 0px;
3231
display: none;

dotcom-rendering/src/components/Discussion/Filters.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css } from '@emotion/react';
2-
import { border, space } from '@guardian/source-foundations';
2+
import { palette as sourcePalette, space } from '@guardian/source-foundations';
33
import type {
44
FilterOptions,
55
OrderByType,
@@ -20,7 +20,7 @@ const filterBar = css`
2020
padding-top: ${space[1]}px;
2121
padding-bottom: ${space[2]}px;
2222
23-
border-top: 1px solid ${border.secondary};
23+
border-top: 1px solid ${sourcePalette.neutral[86]};
2424
2525
display: flex;
2626
flex-direction: row;
@@ -33,7 +33,7 @@ const dividerStyles = css`
3333
content: '';
3434
display: block;
3535
width: 1px;
36-
background-color: ${border.secondary};
36+
background-color: ${sourcePalette.neutral[86]};
3737
position: absolute;
3838
top: -${space[1]}px;
3939
bottom: ${space[1]}px;

dotcom-rendering/src/components/Discussion/Pagination.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { css } from '@emotion/react';
22
import {
3-
border,
43
palette as sourcePalette,
54
space,
65
textSans,
@@ -110,7 +109,7 @@ const wrapperStyles = css`
110109
width: 100%;
111110
padding-top: ${space[2]}px;
112111
padding-bottom: ${space[2]}px;
113-
border-top: 1px solid ${border.secondary};
112+
border-top: 1px solid ${sourcePalette.neutral[86]};
114113
${until.mobileLandscape} {
115114
flex-direction: column;
116115
}

dotcom-rendering/src/components/DividerBlockComponent.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { css } from '@emotion/react';
2-
import { border, from, space } from '@guardian/source-foundations';
2+
import {
3+
from,
4+
palette as sourcePalette,
5+
space,
6+
} from '@guardian/source-foundations';
37

48
type Props = {
59
size?: 'full' | 'partial';
@@ -10,7 +14,7 @@ const baseStyles = css`
1014
height: 1px;
1115
border: 0;
1216
margin-bottom: 3px;
13-
background-color: ${border.secondary};
17+
background-color: ${sourcePalette.neutral[86]};
1418
`;
1519
const sizeFullStyle = css`
1620
width: 100%;

dotcom-rendering/src/components/Dropdown.tsx

+7-12
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ import type { SerializedStyles } from '@emotion/react';
22
import { css } from '@emotion/react';
33
import type { OphanComponent } from '@guardian/libs';
44
import {
5-
border,
6-
brandAlt,
7-
brandText,
85
from,
9-
neutral,
10-
news,
116
palette,
12-
text,
7+
palette as sourcePalette,
138
textSans,
149
until,
1510
visuallyHidden,
@@ -90,7 +85,7 @@ const displayNone = css`
9085

9186
const linkStyles = css`
9287
${textSans.small()};
93-
color: ${text.anchorSecondary};
88+
color: ${sourcePalette.neutral[7]};
9489
position: relative;
9590
transition: color 80ms ease-out;
9691
margin: -1px 0 0 0;
@@ -99,7 +94,7 @@ const linkStyles = css`
9994
padding: 10px 18px 15px 30px;
10095
10196
:hover {
102-
background-color: ${neutral[93]};
97+
background-color: ${sourcePalette.neutral[93]};
10398
text-decoration: none;
10499
}
105100
@@ -109,7 +104,7 @@ const linkStyles = css`
109104
110105
:before {
111106
content: '';
112-
border-top: 1px solid ${border.secondary};
107+
border-top: 1px solid ${sourcePalette.neutral[86]};
113108
display: block;
114109
position: absolute;
115110
top: 0px;
@@ -123,7 +118,7 @@ const linkActive = css`
123118
124119
:after {
125120
content: '';
126-
border: 2px solid ${news[400]};
121+
border: 2px solid ${sourcePalette.news[400]};
127122
border-top: 0px;
128123
border-right: 0px;
129124
position: absolute;
@@ -149,15 +144,15 @@ const buttonStyles = css`
149144
border: none;
150145
/* Design System: The buttons should be components that handle their own layout using primitives */
151146
line-height: 1.2;
152-
color: ${brandText.primary};
147+
color: ${sourcePalette.neutral[100]};
153148
transition: color 80ms ease-out;
154149
padding: 0px 10px 6px 5px;
155150
margin: 1px 0 0;
156151
text-decoration: none;
157152
position: relative;
158153
159154
:hover {
160-
color: ${brandAlt[400]};
155+
color: ${sourcePalette.brandAlt[400]};
161156
162157
:after {
163158
transform: translateY(0) rotate(45deg);

dotcom-rendering/src/components/HeaderAdSlot.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css, Global } from '@emotion/react';
22
import { constants } from '@guardian/commercial';
3-
import { border, neutral, space } from '@guardian/source-foundations';
3+
import { palette as sourcePalette, space } from '@guardian/source-foundations';
44
import { adContainerStyles, AdSlot } from './AdSlot.web';
55
import { Hide } from './Hide';
66

@@ -18,9 +18,9 @@ const headerMinHeight =
1818
const headerAdWrapper = css`
1919
z-index: 1080;
2020
width: 100%;
21-
background-color: ${neutral[97]};
21+
background-color: ${sourcePalette.neutral[97]};
2222
min-height: ${headerMinHeight}px;
23-
border-bottom: ${borderBottomHeight}px solid ${border.secondary};
23+
border-bottom: ${borderBottomHeight}px solid ${sourcePalette.neutral[86]};
2424
padding-bottom: ${padding}px;
2525
2626
display: flex;

dotcom-rendering/src/components/InteractiveContentsBlockComponent.importable.tsx

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { css } from '@emotion/react';
22
import {
3-
border,
43
from,
54
headline,
6-
neutral,
5+
palette as sourcePalette,
76
space,
87
until,
98
} from '@guardian/source-foundations';
@@ -13,21 +12,21 @@ import { getZIndex } from '../lib/getZIndex';
1312
import type { SubheadingBlockElement } from '../types/content';
1413

1514
const liStyles = css`
16-
border-top: 1px solid ${neutral[86]};
15+
border-top: 1px solid ${sourcePalette.neutral[86]};
1716
border-top-width: 1px;
1817
border-top-style: solid;
19-
border-top-color: ${neutral[86]};
18+
border-top-color: ${sourcePalette.neutral[86]};
2019
:hover {
21-
background-color: ${neutral[93]};
20+
background-color: ${sourcePalette.neutral[93]};
2221
}
2322
`;
2423

2524
const borderRightStyles = css`
2625
${from.mobileLandscape} {
27-
border-right: 1px solid ${neutral[86]};
26+
border-right: 1px solid ${sourcePalette.neutral[86]};
2827
border-right-width: 1px;
2928
border-right-style: solid;
30-
border-right-color: ${neutral[86]};
29+
border-right-color: ${sourcePalette.neutral[86]};
3130
}
3231
`;
3332

@@ -62,8 +61,8 @@ const stickyNavBaseStyles = css`
6261
max-width: 650px;
6362
margin-left: ${space[4]}px;
6463
}
65-
background-color: ${neutral[100]};
66-
border: 1px solid ${border.secondary};
64+
background-color: ${sourcePalette.neutral[100]};
65+
border: 1px solid ${sourcePalette.neutral[86]};
6766
top: 0;
6867
${getZIndex('banner')}
6968
`;

dotcom-rendering/src/components/LeftColumn.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { css } from '@emotion/react';
22
import {
33
between,
4-
border,
54
from,
5+
palette as sourcePalette,
66
space,
77
until,
88
} from '@guardian/source-foundations';
@@ -91,7 +91,7 @@ type Props = {
9191
export const LeftColumn = ({
9292
children,
9393
borderType,
94-
borderColour = border.secondary,
94+
borderColour = sourcePalette.neutral[86],
9595
size = 'compact',
9696
verticalMargins = true,
9797
hasPageSkin = false,

dotcom-rendering/src/components/MatchStats.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { css } from '@emotion/react';
22
import { ArticleDesign } from '@guardian/libs';
33
import {
44
between,
5-
border,
65
from,
76
headline,
7+
palette as sourcePalette,
88
space,
99
textSans,
1010
until,
@@ -233,7 +233,7 @@ const RightBorder = ({ children }: { children: React.ReactNode }) => (
233233
<h4
234234
css={css`
235235
${from.phablet} {
236-
border-right: 1px solid ${border.secondary};
236+
border-right: 1px solid ${sourcePalette.neutral[86]};
237237
}
238238
margin-right: 10px;
239239
padding-right: 10px;

dotcom-rendering/src/components/MostViewedFooter.importable.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css } from '@emotion/react';
22
import type { Breakpoint } from '@guardian/source-foundations';
3-
import { border, from } from '@guardian/source-foundations';
3+
import { from, palette as sourcePalette } from '@guardian/source-foundations';
44
import type { TrailTabType, TrailType } from '../types/trails';
55
import { MostViewedFooterGrid } from './MostViewedFooterGrid';
66
import { MostViewedFooterSecondTierItem } from './MostViewedFooterSecondTierItem';
@@ -26,8 +26,8 @@ const stackBelow = (breakpoint: Breakpoint) => css`
2626
`;
2727

2828
const secondTierStyles = css`
29-
border-left: 1px solid ${border.secondary};
30-
border-right: 1px solid ${border.secondary};
29+
border-left: 1px solid ${sourcePalette.neutral[86]};
30+
border-right: 1px solid ${sourcePalette.neutral[86]};
3131
3232
${from.tablet} {
3333
padding-top: 24px;

dotcom-rendering/src/components/MostViewedFooterGrid.tsx

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { css } from '@emotion/react';
22
import {
3-
border,
43
from,
54
headline,
6-
neutral,
5+
palette as sourcePalette,
76
until,
87
visuallyHidden,
98
} from '@guardian/source-foundations';
@@ -12,7 +11,7 @@ import { palette } from '../palette';
1211
import type { TrailTabType, TrailType } from '../types/trails';
1312
import { MostViewedFooterItem } from './MostViewedFooterItem';
1413

15-
const thinGreySolid = `1px solid ${border.secondary}`;
14+
const thinGreySolid = `1px solid ${sourcePalette.neutral[86]}`;
1615

1716
const hidePanel = css`
1817
display: none;
@@ -60,7 +59,7 @@ const selectedListTabStyles = (selectedColour: string) => css`
6059

6160
const unselectedStyles = css`
6261
&:hover {
63-
box-shadow: inset 0px 4px 0px 0px ${neutral[86]};
62+
box-shadow: inset 0px 4px 0px 0px ${sourcePalette.neutral[86]};
6463
transition: box-shadow 0.3s ease-in-out;
6564
}
6665
`;
@@ -100,7 +99,7 @@ const gridContainer = css`
10099
101100
/* We set left border on the grid container, and then right border on
102101
the gridItems to prevent borders doubling up */
103-
border-left: 1px solid ${border.secondary};
102+
border-left: 1px solid ${sourcePalette.neutral[86]};
104103
`;
105104

106105
type Props = {
@@ -133,7 +132,7 @@ const TabHeading = ({ heading }: { heading: string }) => {
133132
export const MostViewedFooterGrid = ({
134133
data,
135134
sectionId = '',
136-
selectedColour = neutral[0],
135+
selectedColour = sourcePalette.neutral[0],
137136
hasPageSkin = false,
138137
}: Props) => {
139138
const [selectedTabIndex, setSelectedTabIndex] = useState<number>(0);

dotcom-rendering/src/components/MostViewedFooterItem.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { SerializedStyles } from '@emotion/react';
22
import { css } from '@emotion/react';
33
import { ArticleDesign } from '@guardian/libs';
44
import {
5-
border,
65
breakpoints,
76
headline,
7+
palette as sourcePalette,
88
until,
99
} from '@guardian/source-foundations';
1010
import { palette } from '../palette';
@@ -21,12 +21,12 @@ const gridItem = (
2121
) => {
2222
const borderTop = hasPageSkin
2323
? css`
24-
border-top: 1px solid ${border.secondary};
24+
border-top: 1px solid ${sourcePalette.neutral[86]};
2525
`
2626
: css`
2727
/* Below leftCol always set top border */
2828
${until.leftCol} {
29-
border-top: 1px solid ${border.secondary};
29+
border-top: 1px solid ${sourcePalette.neutral[86]};
3030
}
3131
`;
3232
return css`
@@ -38,10 +38,10 @@ const gridItem = (
3838
items to prevent double borders */
3939
border-top: ${position !== 1 &&
4040
position !== 6 &&
41-
`1px solid ${border.secondary}`};
41+
`1px solid ${sourcePalette.neutral[86]}`};
4242
4343
/* The left border is set on the container */
44-
border-right: 1px solid ${border.secondary};
44+
border-right: 1px solid ${sourcePalette.neutral[86]};
4545
min-height: ${isWithImage ? '4rem' : '3.25rem'};
4646
4747
&:hover {

0 commit comments

Comments
 (0)