You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ldearn): Improve note text on text shadow page (mdn#40435)
* improve note text
* Apply suggestions from code review
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
---------
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Copy file name to clipboardExpand all lines: files/en-us/learn_web_development/howto/solve_css_problems/add_a_text_shadow/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ page-type: learn-faq
6
6
sidebar: learn-how-to
7
7
---
8
8
9
-
In this guide you can find out how to add a shadow to any text on your page.
9
+
In this guide, you'll learn how to add a shadow to any text on your page.
10
10
11
11
## Adding shadows to text
12
12
13
-
In our [guide to adding a shadow to boxes](/en-US/docs/Learn_web_development/Howto/Solve_CSS_problems/Add_a_shadow), you can find out how to add a shadow to any element on your page. However, that technique only adds shadows to the element's surrounding box. To add a drop shadow to the text inside the box you need a different CSS property — {{cssxref("text-shadow")}}.
13
+
Our [guide to adding a shadow to boxes](/en-US/docs/Learn_web_development/Howto/Solve_CSS_problems/Add_a_shadow) explains how to add a shadow to any element on your page. However, that technique only adds shadows to the element's surrounding box. To add a drop shadow to the text itself, you need a different CSS property: {{cssxref("text-shadow")}}.
14
14
15
15
The `text-shadow` property takes a number of values:
16
16
@@ -19,7 +19,7 @@ The `text-shadow` property takes a number of values:
19
19
- A blur radius
20
20
- A color
21
21
22
-
In the example below we have set the x-axis offset to 2px, the y-axis offset to 4px, the blur radius to 4px, and the color to a semi-transparent blue. Play with the different values to see how they change the shadow.
22
+
In the example below, we have set the x-axis offset to `2px`, the y-axis offset to `4px`, the blur radius to `4px`, and the color to a semi-transparent blue. Play with the different values to see how they change the shadow effect.
23
23
24
24
```html live-sample___text-shadow
25
25
<divclass="wrapper">
@@ -34,7 +34,7 @@ h1 {
34
34
}
35
35
```
36
36
37
-
{{EmbedLiveSample("text-shadow")}}
37
+
{{EmbedLiveSample("Text_shadow")}}
38
38
39
39
> [!NOTE]
40
-
> It can be quite easy to make text hard to read with text shadows. Make sure that the choices you make still leave your text readable and provide enough [color contrast](/en-US/docs/Web/Accessibility/Guides/Understanding_WCAG/Perceivable/Color_contrast)for visitors who have difficulty with low-contrast text.
40
+
> When adding text shadows, you might unintentionally make the text difficult to read. Ensure that your choices offer sufficient [color contrast](/en-US/docs/Web/Accessibility/Guides/Understanding_WCAG/Perceivable/Color_contrast)to keep your text readable.
0 commit comments