diff --git a/.vscode/dictionaries/code-entities.txt b/.vscode/dictionaries/code-entities.txt index 130887e71dfba34..75646f977b16598 100644 --- a/.vscode/dictionaries/code-entities.txt +++ b/.vscode/dictionaries/code-entities.txt @@ -802,6 +802,7 @@ veryverythickmathspace veryverythinmathspace vfprintf videooutput +viewbox viewsource.css VIRTUALENVWRAPPER virtualkeyboardpolicy diff --git a/files/en-us/learn_web_development/core/styling_basics/debugging_css/index.md b/files/en-us/learn_web_development/core/styling_basics/debugging_css/index.md index 5dd3077cea07960..e305b712c05670b 100644 --- a/files/en-us/learn_web_development/core/styling_basics/debugging_css/index.md +++ b/files/en-us/learn_web_development/core/styling_basics/debugging_css/index.md @@ -5,7 +5,7 @@ page-type: learn-module-chapter sidebar: learnsidebar --- -{{PreviousMenuNext("Learn_web_development/Core/Styling_basics/Tables", "Learn_web_development/Core/Text_styling", "Learn_web_development/Core/Styling_basics")}} +{{PreviousMenuNext("Learn_web_development/Core/Styling_basics/Home_color_scheme_search", "Learn_web_development/Core/Text_styling", "Learn_web_development/Core/Styling_basics")}} Sometimes when writing CSS you will encounter an issue where your CSS doesn't seem to be doing what you expect. Perhaps you believe that a certain selector should match an element, but nothing happens, or a box is a different size than you expected. This article will give you guidance on how to go about debugging a CSS problem, and show you how the DevTools included in all modern browsers can help you to find out what is going on. @@ -185,4 +185,4 @@ That's it for all the lessons in this module. To finish it off, we'll test your - [Firefox > Examine and edit CSS](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_and_edit_css/index.html), Firefox Source Docs - [Chrome > View and change CSS](https://developer.chrome.com/docs/devtools/css/), developer.chrome.com -{{PreviousMenuNext("Learn_web_development/Core/Styling_basics/Tables", "Learn_web_development/Core/Text_styling", "Learn_web_development/Core/Styling_basics")}} +{{PreviousMenuNext("Learn_web_development/Core/Styling_basics/Home_color_scheme_search", "Learn_web_development/Core/Text_styling", "Learn_web_development/Core/Styling_basics")}} diff --git a/files/en-us/learn_web_development/core/styling_basics/home_color_scheme_search/index.md b/files/en-us/learn_web_development/core/styling_basics/home_color_scheme_search/index.md new file mode 100644 index 000000000000000..1ad77c25735afcb --- /dev/null +++ b/files/en-us/learn_web_development/core/styling_basics/home_color_scheme_search/index.md @@ -0,0 +1,387 @@ +--- +title: "Challenge: Styling a home color scheme search app" +short-title: "Challenge: Styling color scheme search" +slug: Learn_web_development/Core/Styling_basics/Home_color_scheme_search +page-type: learn-module-assessment +sidebar: learnsidebar +--- + +{{PreviousMenuNext("Learn_web_development/Core/Styling_basics/Tables", "Learn_web_development/Core/Styling_basics/Debugging_CSS", "Learn_web_development/Core/Styling_basics")}} + +The final challenge of our [styling basics](/en-US/docs/Learn_web_development/Core/Styling_basics) module features a mockup of a "Home color search app" UI, the idea being to let users input a color and retrieve a range of variations along with sample color scheme ideas. Your task is to style the provided form, table, and button controls, and make sure the images display as expected. + +> [!NOTE] +> The tinted images used in this challenge have been adapted from the original available on Flickr: [Chic Living Room](https://flickr.com/photos/145464578@N08/28362250492/), published by [Houseology Interiors](https://flickr.com/photos/145464578@N08/) under [CC BY-NC 2.0](https://creativecommons.org/licenses/by-nc/2.0/deed.en). + +## Starting point + +To begin, click the **Play** button in one of the code panels below to open the provided example in the MDN Playground. You'll then follow the instructions in the [Project brief](#project_brief) section to style the page appropriately. + +```html live-sample___app-start live-sample___app-finish +
+

Home color search

+
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+

Search results

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Sample colors and color schemes +
ColorRaw colorTagsSample color scheme
Pinkrgb(255 192 203)pink, pale, light + Image of living room in a pink color scheme +
Baker-Miller pinkrgb(255 145 175)pink, pale, bright + Image of living room in a Baker-Miller pink color scheme +
Hotpinkrgb(255 105 180)pink, bright, vivid + Image of living room in a hotpink color scheme +
Fuchsiargb(255 0 255)pink, medium, bright + Image of living room in a fuchsia color scheme +
+
+ +

Showing page 1 of 20

+ +
+
+``` + +```css live-sample___app-start +* { + box-sizing: border-box; +} + +html { + font-family: Arial, Helvetica, sans-serif; +} + +body { + margin: 0 10px; +} + +hr { + margin: 3em 0; +} + +h2 { + margin-top: 0; +} + +/* Prev/next control layout */ + +.controls { + display: flex; + padding: 10px 0; + justify-content: space-between; + align-items: center; +} + +/* Form and button styling */ + +form div { + display: flex; + align-items: center; + gap: 2em; + margin-bottom: 1em; +} + +label { + text-align: right; + flex: 1; +} + +input { + flex: 3; +} + +/* Table styling */ + +table img { + width: 100%; + height: 150px; +} +``` + +{{embedlivesample("app-start", "100%", 650)}} + +## Project brief + +Follow the steps below to complete the project, sizing the content pane appropriately and adding the required decorations. + +### Add a form reset + +First of all, add some "reset" styles to the `