Skip to content

Commit

Permalink
docs: replace background with background-color for consistency (#467
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
baderj authored Aug 11, 2023
1 parent 00637a4 commit 3fe7f04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Inside `Box.svelte`, change `background-color` so that it is determined by a [CS
height: 5em;
border-radius: 0.5em;
margin: 0 0 1em 0;
background: +++var(--color, #ddd)+++;
background-color: +++var(--color, #ddd)+++;
}
</style>
```
Expand All @@ -55,4 +55,4 @@ Any parent element (such as `<div class="boxes">`) can set the value of `--color

The values can be dynamic, like any other attribute.

This feature works by wrapping each component in a `<div style="display: contents">`, where needed, and applying the custom properties to it.
This feature works by wrapping each component in a `<div style="display: contents">`, where needed, and applying the custom properties to it.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
height: 5em;
border-radius: 0.5em;
margin: 0 0 1em 0;
background: #ddd;
background-color: #ddd;
}
</style>
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
height: 5em;
border-radius: 0.5em;
margin: 0 0 1em 0;
background: var(--color, #ddd);
background-color: var(--color, #ddd);
}
</style>
</style>

1 comment on commit 3fe7f04

@vercel
Copy link

@vercel vercel bot commented on 3fe7f04 Aug 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.