Skip to content

Commit 3fe7f04

Browse files
authored
docs: replace background with background-color for consistency (#467)
Fixes potential confusion by the tutorial using `background-color` to overwrite `background` and referencing `background-color` instead of the shorthand `background` used by the app.
1 parent 00637a4 commit 3fe7f04

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

content/tutorial/02-advanced-svelte/06-classes-and-styles/04-component-styles/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Inside `Box.svelte`, change `background-color` so that it is determined by a [CS
3737
height: 5em;
3838
border-radius: 0.5em;
3939
margin: 0 0 1em 0;
40-
background: +++var(--color, #ddd)+++;
40+
background-color: +++var(--color, #ddd)+++;
4141
}
4242
</style>
4343
```
@@ -55,4 +55,4 @@ Any parent element (such as `<div class="boxes">`) can set the value of `--color
5555

5656
The values can be dynamic, like any other attribute.
5757

58-
This feature works by wrapping each component in a `<div style="display: contents">`, where needed, and applying the custom properties to it.
58+
This feature works by wrapping each component in a `<div style="display: contents">`, where needed, and applying the custom properties to it.

content/tutorial/02-advanced-svelte/06-classes-and-styles/04-component-styles/app-a/src/lib/Box.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
height: 5em;
77
border-radius: 0.5em;
88
margin: 0 0 1em 0;
9-
background: #ddd;
9+
background-color: #ddd;
1010
}
11-
</style>
11+
</style>

content/tutorial/02-advanced-svelte/06-classes-and-styles/04-component-styles/app-b/src/lib/Box.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
height: 5em;
77
border-radius: 0.5em;
88
margin: 0 0 1em 0;
9-
background: var(--color, #ddd);
9+
background-color: var(--color, #ddd);
1010
}
11-
</style>
11+
</style>

0 commit comments

Comments
 (0)