Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lizkaufman authored May 10, 2022
1 parent aeaca51 commit 35032a3
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

## Task 1

Make a set of CSS variables at the root level of your CSS.
Open index.html and see what the page looks like in the browser.
You're now going to refactor so that the CSS colors and values are
CSS variables instead of hard-coded.

Make a set of CSS variables at the root level of your CSS file.
Give them the following names and values:

- primary-colour: green
- primary-colour: rgb(197, 231, 147)
- secondary-colour: antiquewhite
- text-colour: black
- header-size: 24px
Expand All @@ -16,7 +20,11 @@ Give them the following names and values:

Now use the variables you've just made in the following places
in your CSS (the appearance of the website in the browser should
still look the same after you've swapped in the variables):
still look the same after you've swapped in the variables).

For example, for any element with the class .plant-listing, the value
of their background should now use the CSS variable rather than the
hard-coded rgb value for the color.

- primary-colour: .plant-listing background
- secondary-colour: body background
Expand Down Expand Up @@ -47,6 +55,9 @@ class, reassign some of the CSS variables you made earlier like so:
- secondary-colour: black
- text-colour: white

Remember to Google for more information on CSS variables and how to
use/reassign them!

b) In your JavaScript file, create a function that uses this button
(with id "dark-mode-button") to toggle this class on and off of the
body of your webpage. Now you have a snazzy dark mode button, thanks
Expand Down

0 comments on commit 35032a3

Please sign in to comment.