Skip to content

Commit 451c6b5

Browse files
authored
Lint: use named color if possible (1) (mdn#40622)
* Lint: use named color if possible (1) * Fix one
1 parent 861dc1b commit 451c6b5

File tree

62 files changed

+267
-306
lines changed

Some content is hidden

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

62 files changed

+267
-306
lines changed

files/en-us/games/techniques/3d_on_the_web/building_up_a_basic_demo_with_a-frame/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ We've also defined a cursor for the given camera, using the `cursor-*` attribute
135135
The basic light types in A-Frame are directional and ambient. The first type is a directional light placed somewhere on the scene while the second one reflects the light from the first type, so it looks more natural; this can be set globally. Add the new code below your previous additions — this uses the standard `<a-light>` element:
136136

137137
```html
138-
<a-light type="directional" color="#FFF" intensity="0.5" position="-1 1 2">
138+
<a-light type="directional" color="white" intensity="0.5" position="-1 1 2">
139139
</a-light>
140-
<a-light type="ambient" color="#FFF"></a-light>
140+
<a-light type="ambient" color="white"></a-light>
141141
```
142142

143143
The directional light has a white color, its intensity is set to `0.5`, and it is placed at position `-1 1 2`. The ambient light only needs a color, which is also white.
@@ -261,10 +261,10 @@ Everything is rendered properly and animating — congratulations on building yo
261261

262262
<a-light
263263
type="directional"
264-
color="#FFF"
264+
color="white"
265265
intensity="0.5"
266266
position="-1 1 2"></a-light>
267-
<a-light type="ambient" color="#FFF"></a-light>
267+
<a-light type="ambient" color="white"></a-light>
268268

269269
<a-camera position="0 1 4">
270270
<a-cursor color="#0095DD" opacity="0.5" scale="2 2 2"> </a-cursor>

files/en-us/games/tutorials/2d_breakout_game_pure_javascript/create_the_canvas_and_draw_on_it/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Let's see an example piece of code that prints a red square on the canvas. Add t
6161
```js
6262
ctx.beginPath();
6363
ctx.rect(20, 40, 50, 50);
64-
ctx.fillStyle = "#FF0000";
64+
ctx.fillStyle = "red";
6565
ctx.fill();
6666
ctx.closePath();
6767
```
@@ -119,7 +119,7 @@ const ctx = canvas.getContext("2d");
119119

120120
ctx.beginPath();
121121
ctx.rect(20, 40, 50, 50);
122-
ctx.fillStyle = "#FF0000";
122+
ctx.fillStyle = "red";
123123
ctx.fill();
124124
ctx.closePath();
125125

files/en-us/learn_web_development/core/accessibility/css_and_javascript/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Some very simple link styling is shown below:
142142

143143
```css
144144
a {
145-
color: #ff0000;
145+
color: red;
146146
}
147147

148148
a:hover,
@@ -153,7 +153,7 @@ a:focus {
153153
}
154154

155155
a:active {
156-
color: #000000;
156+
color: black;
157157
background-color: #a60000;
158158
}
159159
```

files/en-us/learn_web_development/core/accessibility/test_your_skills/css_and_javascript/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To complete the task, create new rules to make the links look and behave like li
2121

2222
```css hidden live-sample___css-js-ally-1 live-sample___css-js-ally-2 live-sample___css-js-ally-3
2323
body {
24-
background-color: #fff;
24+
background-color: white;
2525
color: #333;
2626
font:
2727
1em / 1.4 Helvetica Neue,
@@ -81,7 +81,7 @@ li a {
8181
li a:hover,
8282
li a:focus {
8383
text-decoration: none;
84-
color: rgb(255 0 0);
84+
color: red;
8585
}
8686
```
8787

files/en-us/learn_web_development/core/accessibility/test_your_skills/html/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To complete the task, update the markup to use appropriate semantic HTML. You do
2121

2222
```css hidden live-sample___html-ally-1 live-sample___html-ally-2 live-sample___html-ally-3 live-sample___html-ally-4
2323
body {
24-
background-color: #fff;
24+
background-color: white;
2525
color: #333;
2626
font:
2727
1em / 1.4 Helvetica Neue,

files/en-us/learn_web_development/core/accessibility/test_your_skills/wai-aria/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To complete the task, add some WAI-ARIA semantics to make screen readers recogni
2121

2222
```css hidden live-sample___aria-1 live-sample___aria-2 live-sample___aria-3
2323
body {
24-
background-color: #fff;
24+
background-color: white;
2525
color: #333;
2626
font:
2727
1em / 1.4 Helvetica Neue,

files/en-us/learn_web_development/core/accessibility/wai-aria_basics/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ body {
203203

204204
html {
205205
font-size: 10px;
206-
background-color: #a9a9a9;
206+
background-color: darkgrey;
207207
}
208208

209209
body {
@@ -456,7 +456,7 @@ body {
456456

457457
html {
458458
font-size: 10px;
459-
background-color: #a9a9a9;
459+
background-color: darkgrey;
460460
}
461461

462462
body {
@@ -855,7 +855,7 @@ function toggleMusician(bool) {
855855
const instrument = formItems[formItems.length - 1];
856856
if (bool) {
857857
instrument.input.disabled = false;
858-
instrument.label.style.color = "#000";
858+
instrument.label.style.color = "black";
859859
instrument.input.setAttribute("aria-disabled", "false");
860860
hiddenAlert.textContent =
861861
"Instruments played field now enabled; use it to tell us what you play.";

files/en-us/learn_web_development/core/css_layout/responsive_design/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ body {
163163

164164
.col1,
165165
.col2 {
166-
background-color: #fff;
166+
background-color: white;
167167
}
168168
```
169169

@@ -241,7 +241,7 @@ body {
241241

242242
.col1,
243243
.col2 {
244-
background-color: #fff;
244+
background-color: white;
245245
}
246246
```
247247

@@ -361,7 +361,7 @@ h1 {
361361

362362
.col1,
363363
.col2 {
364-
background-color: #fff;
364+
background-color: white;
365365
}
366366

367367
@media screen and (width >= 600px) {
@@ -447,7 +447,7 @@ h1 {
447447

448448
.col1,
449449
.col2 {
450-
background-color: #fff;
450+
background-color: white;
451451
}
452452

453453
@media screen and (width >= 600px) {

files/en-us/learn_web_development/core/css_layout/test_your_skills/flexbox/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ nav a:visited {
5353
background-color: #4d7298;
5454
border: 2px solid #77a6b6;
5555
border-radius: 0.5em;
56-
color: #fff;
56+
color: white;
5757
padding: 0.5em;
5858
display: inline-block;
5959
text-decoration: none;
@@ -117,7 +117,7 @@ li {
117117
background-color: #4d7298;
118118
border: 2px solid #77a6b6;
119119
border-radius: 0.5em;
120-
color: #fff;
120+
color: white;
121121
padding: 0.5em;
122122
}
123123

@@ -193,7 +193,7 @@ li {
193193
background-color: #4d7298;
194194
border: 2px solid #77a6b6;
195195
border-radius: 0.5em;
196-
color: #fff;
196+
color: white;
197197
padding: 0.5em;
198198
margin: 0.5em;
199199
}

files/en-us/learn_web_development/core/css_layout/test_your_skills/floats/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ body {
4444
height: 150px;
4545
border-radius: 5px;
4646
background-color: rebeccapurple;
47-
color: #fff;
47+
color: white;
4848
padding: 1em;
4949
}
5050

@@ -114,7 +114,7 @@ body {
114114
height: 150px;
115115
border-radius: 5px;
116116
background-color: rebeccapurple;
117-
color: #fff;
117+
color: white;
118118
padding: 1em;
119119
}
120120

@@ -181,13 +181,13 @@ body {
181181
border-radius: 5px;
182182
background-color: rgb(207 232 220);
183183
padding: 1em;
184-
color: #fff;
184+
color: white;
185185
}
186186

187187
.box {
188188
background-color: rebeccapurple;
189189
padding: 10px;
190-
color: #fff;
190+
color: white;
191191
}
192192

193193
.float {

0 commit comments

Comments
 (0)