Skip to content

Commit bfaa417

Browse files
committed
Twenty Twenty-One: Fix link color inheritance in paragraph blocks
1 parent adf6443 commit bfaa417

5 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/wp-content/themes/twentytwentyone/assets/css/style-editor.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,10 @@ p.has-background {
14461446
padding: var(--global--spacing-unit);
14471447
}
14481448

1449+
p.has-text-color:not(.has-link-color) a {
1450+
color: currentColor;
1451+
}
1452+
14491453
pre.wp-block-preformatted {
14501454
overflow-x: auto;
14511455
white-space: pre !important;

src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_editor.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ p {
44
&.has-background {
55
padding: var(--global--spacing-unit);
66
}
7+
8+
&.has-text-color:not(.has-link-color) a {
9+
color: currentColor;
10+
}
711
}

src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_style.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ p {
77
padding: var(--global--spacing-unit);
88
}
99

10-
// Override `color: inherit` from Core styles.
11-
&.has-text-color a {
12-
color: var(--wp--style--color--link, var(--global--color-primary));
10+
11+
&.has-text-color:not(.has-link-color) a {
12+
color: currentColor;
1313
}
1414
}

src/wp-content/themes/twentytwentyone/style-rtl.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,8 +2792,8 @@ p.has-background {
27922792
padding: var(--global--spacing-unit);
27932793
}
27942794

2795-
p.has-text-color a {
2796-
color: var(--wp--style--color--link, var(--global--color-primary));
2795+
p.has-text-color:not(.has-link-color) a {
2796+
color: currentColor;
27972797
}
27982798

27992799
pre.wp-block-preformatted {

src/wp-content/themes/twentytwentyone/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,8 +2814,8 @@ p.has-background {
28142814
padding: var(--global--spacing-unit);
28152815
}
28162816

2817-
p.has-text-color a {
2818-
color: var(--wp--style--color--link, var(--global--color-primary));
2817+
p.has-text-color:not(.has-link-color) a {
2818+
color: currentColor;
28192819
}
28202820

28212821
pre.wp-block-preformatted {

0 commit comments

Comments
 (0)