diff --git a/README.md b/README.md index a85211d..c1f2f0c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # CSS Exercises -These exercises are a series of css related tasks intended to complement the HTML and CSS content on The Odin Project. +These exercises are a series of CSS related tasks intended to complement the HTML and CSS content on The Odin Project. These exercises should be done when instructed during the course of the curriculum. -> When doing the following exercises, please use all the documentation and resources you need to accomplish them. You are _not_ intended to have any of this stuff memorized at this point. Check the docs, use google, do what you need to do (besides checking the solutions) to get them done. +> When doing the following exercises, please use all the documentation and resources you need to accomplish them. You are _not_ intended to have any of this stuff memorized at this point. Check the docs, use Google, do what you need to do (besides checking the solutions) to get them done. ## How to use these exercises -1. Fork and copy this repository. Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how [here](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github/cloning-a-repository). +1. Fork and copy this repository. To learn how to fork a repository, see [this link](https://docs.github.com/en/get-started/quickstart/fork-a-repo). Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how [here](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github/cloning-a-repository). 2. Go to an exercise directory and open the HTML file in your browser. You can either open the file directly, or use something like VSCode's Live Server. 3. For each exercise, view the README, and edit the CSS file to make the output in your browser look like the images provided. 4. Each README has a "Self Check" list. Use this to make sure you haven't missed any important details in your implementation. diff --git a/animation/01-button-hover/README.md b/animation/01-button-hover/README.md index e4ee37c..3aa1a1e 100644 --- a/animation/01-button-hover/README.md +++ b/animation/01-button-hover/README.md @@ -1,12 +1,12 @@ # Button Hover -Use a transition to increase the font-size property of the button when you hover your mouse over it. +Use a transition to scale the button when you hover your mouse over it. ## Desired Outcome ![outcome](./desired-outcome.gif) ### Self Check -- Does the font-size property change to increase the size? +- Does the button grow when you hover it? - Do other properties of the button remain unchanged? - Does the `:hover` pseudo-class trigger the transition? diff --git a/animation/01-button-hover/desired-outcome.gif b/animation/01-button-hover/desired-outcome.gif index 23083bb..c087042 100644 Binary files a/animation/01-button-hover/desired-outcome.gif and b/animation/01-button-hover/desired-outcome.gif differ diff --git a/animation/01-button-hover/solution/solution.css b/animation/01-button-hover/solution/solution.css index 5fa39a3..5a90ed7 100644 --- a/animation/01-button-hover/solution/solution.css +++ b/animation/01-button-hover/solution/solution.css @@ -9,28 +9,21 @@ } button { - width: 158px; - height: 55px; - border: 1px solid black; - border-radius: 5px; - background-color: white; - color: black; - font-size: small; + border-radius: 8px; + border: none; + background-color: #2563eb; + color: white; + font-size: 18px; + padding: 16px 24px; text-align: center; } /* SOLUTION */ -/* disclaimer: duplicating the `button` element here isn't best practice. -In your solution you probably put it right inside the existing `button`, -which _is_ the best practice. -We separated it out here to make it extra clear what has changed. */ - button { - transition: font-size 1s ease-out 0.25s; + transition: transform .3s ease-in-out; } button:hover { - font-size: x-large; - cursor: pointer; + transform: scale(1.2) } diff --git a/animation/01-button-hover/style.css b/animation/01-button-hover/style.css index ec65525..2f803fc 100644 --- a/animation/01-button-hover/style.css +++ b/animation/01-button-hover/style.css @@ -9,12 +9,11 @@ } button { - width: 158px; - height: 55px; - border: 1px solid black; - border-radius: 5px; - background-color: white; - color: black; - font-size: small; + border-radius: 8px; + border: none; + background-color: #2563eb; + color: white; + font-size: 18px; + padding: 16px 24px; text-align: center; -} +} \ No newline at end of file diff --git a/animation/02-drop-down/README.md b/animation/02-drop-down/README.md deleted file mode 100644 index cedac0c..0000000 --- a/animation/02-drop-down/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Dropdown - -Here you'll make your very own dropdown menu using pure CSS. - -Animate the appearance of a list so that it slides down when you hover your mouse over the button. This exercise will need multiple CSS selectors to get it working properly. - -## Desired Outcome - -![outcome](./desired-outcome.gif) - -### Self Check -- Does the button's background color change when you hover on it? -- Does the list smoothly slide down underneath the button when the button is hovered over? -- Does the list smoothly slide back up to hiding when the mouse is moved away from the button or a list element? -- Does the list appear and disappear when it is supposed to i.e. only when the mouse is over the button or a list element? \ No newline at end of file diff --git a/animation/02-drop-down/desired-outcome.gif b/animation/02-drop-down/desired-outcome.gif deleted file mode 100644 index 572ad35..0000000 Binary files a/animation/02-drop-down/desired-outcome.gif and /dev/null differ diff --git a/animation/02-drop-down/index.html b/animation/02-drop-down/index.html deleted file mode 100644 index e50c3cc..0000000 --- a/animation/02-drop-down/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - - -I'm a pop up dialog!
+ +