Skip to content

Commit 65f515e

Browse files
authored
Enforce pseudo element double colon syntax (#13710)
* Update styles to use double colon pseudo element notation * Add pseudo element double colon notation Stylelint rule
1 parent 14efc6e commit 65f515e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+90
-89
lines changed

dotcom-rendering/src/components/ArticleBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const globalOlStyles = () => css`
5858
ol:not([data-ignore='global-ol-styling']) {
5959
counter-reset: li;
6060
61-
> li:before {
61+
> li::before {
6262
${textEgyptian17};
6363
line-height: 1.15;
6464
content: counter(li);

dotcom-rendering/src/components/BackToTop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const link = css`
3434
`;
3535

3636
const icon = css`
37-
:before {
37+
::before {
3838
position: absolute;
3939
top: 6px;
4040
bottom: 0;

dotcom-rendering/src/components/Bio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const bioStyles = css`
3737
display: inline-block;
3838
margin-bottom: 0;
3939
}
40-
ul li:before {
40+
ul li::before {
4141
display: inline-block;
4242
content: '';
4343
border-radius: 0.375rem;

dotcom-rendering/src/components/Blocks.amp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const adStyle = css`
2020
text-align: center;
2121
margin: 0 auto 12px;
2222
23-
:before {
23+
::before {
2424
content: 'Advertisement';
2525
display: block;
2626
${textSans12};

dotcom-rendering/src/components/BodyArticle.amp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const bulletStyle = (pillar: ArticleTheme) => css`
3939
font-size: 1px;
4040
}
4141
42-
.bullet:before {
42+
.bullet::before {
4343
display: inline-block;
4444
content: '';
4545
border-radius: 6px;
@@ -79,7 +79,7 @@ const adStyle = css`
7979
text-align: center;
8080
margin: 4px 0 12px 20px;
8181
82-
:before {
82+
::before {
8383
content: 'Advertisement';
8484
display: block;
8585
${textSans12};

dotcom-rendering/src/components/Card/components/CardWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const sublinkHoverStyles = css`
6363
`;
6464

6565
const topBarStyles = css`
66-
:before {
66+
::before {
6767
border-top: 1px solid ${palette('--card-border-top')};
6868
content: '';
6969
z-index: 2;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const previewStyle = css`
5454
position: relative;
5555
display: flex;
5656
flex-direction: column;
57-
:before {
57+
::before {
5858
content: '';
5959
position: absolute;
6060
border-left: ${arrowSize}px solid

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const firstStyles = css`
8585
const activeStyles = css`
8686
font-weight: bold;
8787
88-
:after {
88+
::after {
8989
content: '';
9090
border: 2px solid ${schemedPalette('--discussion-accent-text')};
9191
border-top: 0px;
@@ -120,12 +120,12 @@ const buttonStyles = css`
120120
text-decoration: none;
121121
122122
:hover {
123-
:after {
123+
::after {
124124
transform: translateY(0) rotate(45deg);
125125
}
126126
}
127127
128-
:after {
128+
::after {
129129
content: '';
130130
display: inline-block;
131131
width: 5px;
@@ -141,10 +141,10 @@ const buttonStyles = css`
141141
`;
142142

143143
const expandedStyles = css`
144-
:hover:after {
144+
:hover::after {
145145
transform: translateY(-1px) rotate(-135deg);
146146
}
147-
:after {
147+
::after {
148148
transform: translateY(1px) rotate(-135deg);
149149
}
150150
`;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const filterBar = css`
2828
const dividerStyles = css`
2929
position: relative;
3030
margin-left: ${space[2]}px;
31-
:after {
31+
::after {
3232
content: '';
3333
display: block;
3434
width: 1px;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const pickBoxStyles = css`
5050
position: relative;
5151
height: 150px;
5252
53-
:before {
53+
::before {
5454
content: '';
5555
margin-left: ${space[6]}px;
5656
position: absolute;

0 commit comments

Comments
 (0)