From 60151c9533a50a3d761babe79fdf0ceabcf994bd Mon Sep 17 00:00:00 2001 From: Lorenagubaira Date: Thu, 19 May 2022 12:52:51 +0000 Subject: [PATCH 001/407] spelling errors have been corrected --- exercises/00-Welcome/README.es.md | 1 + exercises/00-Welcome/README.md | 1 + exercises/02-Separate-Stylesheet/README.es.md | 4 ++-- exercises/02.1-Background/README.md | 2 +- exercises/03-Inline-Styles/README.md | 2 +- exercises/04.1-Combined-Rules/README.md | 4 ++-- exercises/04.2-Apply-several-classes/README.es.md | 4 ++-- exercises/05-Specificity/README.md | 4 ++-- exercises/06-Practicing-Rules/README.md | 2 +- exercises/07-Very-Specific-Rules/README.md | 2 +- exercises/09-Anchor-Styles/README.es.md | 2 +- 11 files changed, 15 insertions(+), 13 deletions(-) diff --git a/exercises/00-Welcome/README.es.md b/exercises/00-Welcome/README.es.md index bed6d3a1..0e97862a 100644 --- a/exercises/00-Welcome/README.es.md +++ b/exercises/00-Welcome/README.es.md @@ -5,6 +5,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # ¡¡Bienvenido a los ejercicios de CSS!! Mi nombre es Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr) ¡Estoy muy contento de que estén aquí! 🎉 😂 + Aprender a programar es dificil ¡Probablemente necesitarás coaching! Envíame un DM vía Twitter si tienes alguna duda. Durante este curso aprenderás los siguientes conceptos: diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 7ff64cf1..177fbeba 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -5,6 +5,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # Welcome to CSS Exercises!! My name is Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr). I'm really excited to have you here !! 🎉 😂 + Learning to code is hard, you will problably need coaching! DM me on twitter if you have any question. During this course you will be learning the following concepts: diff --git a/exercises/02-Separate-Stylesheet/README.es.md b/exercises/02-Separate-Stylesheet/README.es.md index 67e731d5..58eca7ef 100644 --- a/exercises/02-Separate-Stylesheet/README.es.md +++ b/exercises/02-Separate-Stylesheet/README.es.md @@ -2,11 +2,11 @@ Si usas la etiqueta html ``, puedes tener tus estilos en un archivo separado que normalmente se llama `styles.css`. -Esa es una mejor práctica porque te permite tener un sitio web a sin diseño, puedes cambiar el CSS después y hacer que tu sitio web se vea 100% diferente, pero teniendo exactamente el mismo HTML. +Esa es una mejor práctica porque te permite tener un sitio web sin diseño, puedes cambiar el CSS después y hacer que tu sitio web se vea 100% diferente, pero teniendo exactamente el mismo HTML. ## 📝 Instrucciones: -LLena el `styles.css` con el contenido necesario para que el body del sitio web azul (blue). +LLena el `styles.css` con el contenido necesario para que el body del sitio web sea azul (blue). ## 💡 Pista: diff --git a/exercises/02.1-Background/README.md b/exercises/02.1-Background/README.md index d81d440a..b77e9de9 100644 --- a/exercises/02.1-Background/README.md +++ b/exercises/02.1-Background/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=MJI0-sFmTe8" The `background` CSS rule allows us to assign and work with the background of any container. The background values can be a `color` or an `image`. -If it is an image, you can specify if you want the image to be repeated horizontally, vertically, or both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified. +If it is an image, you can specify if you want the image to be repeated horizontally, vertically, or both, or not at all, and you can also specify if you want it to resize and fit the whole container where it is being applied, among other properties that can be modified. ## 📝 Instructions: diff --git a/exercises/03-Inline-Styles/README.md b/exercises/03-Inline-Styles/README.md index 32e0e565..f7600770 100644 --- a/exercises/03-Inline-Styles/README.md +++ b/exercises/03-Inline-Styles/README.md @@ -4,7 +4,7 @@ tutorial: "https://www.youtube.com/watch?v=jIMPLzpryuI" # `03` Inline Styles -Inline styles are a very bad idea unless you have no other choice (and that's a very uncommon situation). Sadly, we have to teach you how to do it because you may need to use them at some point. +`Inline` styles are a very bad idea unless you have no other choice (and that's a very uncommon situation). Sadly, we have to teach you how to do it because you may need to use them at some point. To use inline styles, instead of declaring a `; let cssArray=document.styleSheets[0].cssRules; - let orangeHoverSelector=""; for (let i=0; i li") { + if (cssArray[i].selectorText==="ul li" || cssArray[i].selectorText==="ul > li") { orangeHoverSelector=cssArray[i].style.color; - } expect(orangeHoverSelector).toBe("red"); } - - }); it("The ul second element background should be green", function () { document.querySelector( @@ -44,7 +37,7 @@ describe("All the styles should be applied", function () { let orangeHoverSelector=""; for (let i=0; i li:nth-child(2)" ) { + if (cssArray[i].selectorText==="ol li:nth-child(2)" || cssArray[i].selectorText==="ol > li:nth-child(2)" ) { orangeHoverSelector=cssArray[i].style['background-color']; } @@ -90,9 +83,4 @@ describe("All the styles should be applied", function () { let title = head.querySelector('title') expect(title).not.toBe(null) }) - - - - - }); \ No newline at end of file diff --git a/learn.json b/learn.json index e11a82b6..6574dcef 100644 --- a/learn.json +++ b/learn.json @@ -11,10 +11,8 @@ "difficulty": "easy", "video-solutions": true, "graded": true, - - "disableGrading": false, - "editor": { - "version": "1.0.73" - } - + "disableGrading": false, + "editor": { + "version": "1.0.73" + } } From aa84d1182fcebac776106e3789b45084478338f6 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Thu, 9 Jun 2022 21:26:05 +0000 Subject: [PATCH 007/407] disableGrading set to true --- learn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/learn.json b/learn.json index 6574dcef..3c17442e 100644 --- a/learn.json +++ b/learn.json @@ -11,6 +11,7 @@ "difficulty": "easy", "video-solutions": true, "graded": true, + "disabledActions": ["test"], "disableGrading": false, "editor": { "version": "1.0.73" From 0811f988c1e96f60c271644bf9e536d19e5d411a Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Tue, 14 Jun 2022 17:29:53 -0400 Subject: [PATCH 008/407] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index 3c17442e..709ede73 100644 --- a/learn.json +++ b/learn.json @@ -12,7 +12,7 @@ "video-solutions": true, "graded": true, "disabledActions": ["test"], - "disableGrading": false, + "disableGrading": true, "editor": { "version": "1.0.73" } From ce353cfa37b6431829591db9312f53b671f2d502 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Wed, 15 Jun 2022 18:17:53 +0000 Subject: [PATCH 009/407] fontawesome link updated --- exercises/11-Font-Awesome-Icons/index.html | 4 ++-- exercises/11-Font-Awesome-Icons/solution.hide.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/index.html b/exercises/11-Font-Awesome-Icons/index.html index b3533f72..1401d5da 100644 --- a/exercises/11-Font-Awesome-Icons/index.html +++ b/exercises/11-Font-Awesome-Icons/index.html @@ -4,12 +4,12 @@ - + 11 Font Awesome
    -
  • Hello
  • +
  • Hello
diff --git a/exercises/11-Font-Awesome-Icons/solution.hide.html b/exercises/11-Font-Awesome-Icons/solution.hide.html index 84c2eb9e..bd68c2a7 100644 --- a/exercises/11-Font-Awesome-Icons/solution.hide.html +++ b/exercises/11-Font-Awesome-Icons/solution.hide.html @@ -4,7 +4,7 @@ - + 11 Font Awesome @@ -14,4 +14,4 @@
  • Heart
  • - \ No newline at end of file + From d67022ace3cc04e14ec4859fa6e02bfca7f107db Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Thu, 16 Jun 2022 15:18:18 +0000 Subject: [PATCH 010/407] changed #myTitle to .myTitle --- exercises/10-Your-Own-Font/README.es.md | 2 +- exercises/10-Your-Own-Font/README.md | 2 +- exercises/10-Your-Own-Font/tests.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/10-Your-Own-Font/README.es.md b/exercises/10-Your-Own-Font/README.es.md index eab36187..16e4ab9a 100644 --- a/exercises/10-Your-Own-Font/README.es.md +++ b/exercises/10-Your-Own-Font/README.es.md @@ -14,5 +14,5 @@ Después de vincular tu fuente, debes asignar la regla CSS `font-family` a lo qu 1. Enlaza cualquier fuente de google que desee en el sitio web. -2. Aplica esa `font-family` (familia de fuentes) específica a `#myTitle`. +2. Aplica esa `font-family` (familia de fuentes) específica a `.myTitle`. diff --git a/exercises/10-Your-Own-Font/README.md b/exercises/10-Your-Own-Font/README.md index 8c1dfa92..63c24dc3 100644 --- a/exercises/10-Your-Own-Font/README.md +++ b/exercises/10-Your-Own-Font/README.md @@ -14,5 +14,5 @@ After your font is linked you need to assign the `font-family` CSS rule to whate 1. Link any google-font that you like into the website. -2. Apply that specific `font-family` to `#myTitle`. +2. Apply that specific `font-family` to `.myTitle`. diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js index 6109a451..dd13147d 100644 --- a/exercises/10-Your-Own-Font/tests.js +++ b/exercises/10-Your-Own-Font/tests.js @@ -19,7 +19,7 @@ describe("All the styles should be applied", function () { jest.resetModules(); }); - it("the font-family in the #myTitle should exists", function () { + it("the font-family in the .myTitle should exists", function () { // get computed styles of any element you like let cssArray=document.styleSheets[0].cssRules; // console.log("%%% ", cssArray) From b2e1cfe62f0be2ba030acc57a1903d1275cc50ce Mon Sep 17 00:00:00 2001 From: Rodrigo Cabrera <107075433+Hayder10@users.noreply.github.com> Date: Thu, 16 Jun 2022 21:47:22 -0400 Subject: [PATCH 011/407] Spelling error corrected --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b127fe6b..cd220aea 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really ## You'll be learning the following concepts: -1. Using how to apply CSS to your website in 3 different ways: Inline, by grouping them together inside a ` diff --git a/exercises/01-Hello-World/README.md b/exercises/01-Hello-World/README.md index 9510cd81..35efc390 100644 --- a/exercises/01-Hello-World/README.md +++ b/exercises/01-Hello-World/README.md @@ -18,7 +18,6 @@ Look at this example: ```HTML From 94723357baa5c2e634f78a2991e0af729d600915 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:22:23 +0000 Subject: [PATCH 022/407] added solution file --- exercises/01-Hello-World/solution.hide.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 exercises/01-Hello-World/solution.hide.html diff --git a/exercises/01-Hello-World/solution.hide.html b/exercises/01-Hello-World/solution.hide.html new file mode 100644 index 00000000..ce422661 --- /dev/null +++ b/exercises/01-Hello-World/solution.hide.html @@ -0,0 +1,7 @@ + + +Click me to open google.com \ No newline at end of file From fbc9af20a17b4911bde9348ef04a147446ae9208 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:23:37 +0000 Subject: [PATCH 023/407] added solution file --- exercises/01.1-The-Style-Tag/solution.hide.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 exercises/01.1-The-Style-Tag/solution.hide.html diff --git a/exercises/01.1-The-Style-Tag/solution.hide.html b/exercises/01.1-The-Style-Tag/solution.hide.html new file mode 100644 index 00000000..659b76b3 --- /dev/null +++ b/exercises/01.1-The-Style-Tag/solution.hide.html @@ -0,0 +1,12 @@ + + +

    + Coding is a basic literacy in the digital age, and it is important for kids to understand and be able to work with and understand the technology + around them. Having children learn coding at a young age prepares them for the future. Coding helps children with communication, creativity, + math,writing, and confidence. +

    \ No newline at end of file From 52891964f87a80c4beb51eb461a759a5035c33ff Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:24:28 +0000 Subject: [PATCH 024/407] added solution file --- exercises/01.2-Your-First-Style/solution.hide.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 exercises/01.2-Your-First-Style/solution.hide.html diff --git a/exercises/01.2-Your-First-Style/solution.hide.html b/exercises/01.2-Your-First-Style/solution.hide.html new file mode 100644 index 00000000..3907bb3c --- /dev/null +++ b/exercises/01.2-Your-First-Style/solution.hide.html @@ -0,0 +1,14 @@ + + + + + + + Hello! I am an anchor in red, change my color to yellow + + From 2576920fba4fc84caa335091106c9d3a98a74041 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:26:00 +0000 Subject: [PATCH 025/407] added solution file --- .../01.3-Your-Second-Style/solution.hide.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 exercises/01.3-Your-Second-Style/solution.hide.html diff --git a/exercises/01.3-Your-Second-Style/solution.hide.html b/exercises/01.3-Your-Second-Style/solution.hide.html new file mode 100644 index 00000000..9b239409 --- /dev/null +++ b/exercises/01.3-Your-Second-Style/solution.hide.html @@ -0,0 +1,14 @@ + + + + + + + Hello! My background should be blue! + + From b6f1b26813408d04a1806748a78cedb404e95f98 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:55:01 +0000 Subject: [PATCH 026/407] added solution file --- exercises/02-Separate-Stylesheet/solution.hide.css | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 exercises/02-Separate-Stylesheet/solution.hide.css diff --git a/exercises/02-Separate-Stylesheet/solution.hide.css b/exercises/02-Separate-Stylesheet/solution.hide.css new file mode 100644 index 00000000..779c2c33 --- /dev/null +++ b/exercises/02-Separate-Stylesheet/solution.hide.css @@ -0,0 +1,9 @@ +/* your styles here: + 1. Select the body tag. + 2. Add the background rule equal to blue. + */ + body { + background: blue; + background-size: contain; + background-repeat: inherit; +} \ No newline at end of file From 12c623fc13a695900f690c8a38e071a83d77c7c0 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 02:56:03 +0000 Subject: [PATCH 027/407] improved tests and cghecks for background color blue --- exercises/02-Separate-Stylesheet/tests.js | 59 ++++++----------------- 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/exercises/02-Separate-Stylesheet/tests.js b/exercises/02-Separate-Stylesheet/tests.js index a583e81e..d07034b6 100644 --- a/exercises/02-Separate-Stylesheet/tests.js +++ b/exercises/02-Separate-Stylesheet/tests.js @@ -1,64 +1,33 @@ const fs=require("fs"); const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - //apply the styles from the stylesheet if needed - - - - }); - afterEach(() => { - jest.resetModules(); - }); - it("The body tag should not contains any inline style", function () { +describe("All the styles should be applied", ()=>{ + const link = document.querySelector("link"); + const body = document.querySelector("body") + test("The body tag should not contains any inline style", ()=>{ document.querySelector( "head" ).innerHTML=``; - let bodyInlineStyle=document.getElementsByTagName("body"); let emptyBodyInlineStyle={}; - expect(bodyInlineStyle[0].style._values).toEqual(emptyBodyInlineStyle); - // expect(bodyInlineStyle[0].style._values.background - repeat).toBe( - // undefined - // ); - - console.log(bodyInlineStyle[0].style._values); + expect(body.style._values).toEqual(emptyBodyInlineStyle) }); - - it("the background-size should be 'contain' without quotes", function () { - document.querySelector( - "head" - ).innerHTML=``; - // get computed styles of any element you like - const body=document.querySelector("body"); - let styles=window.getComputedStyle(body); - expect(styles["background-size"]).toBe("contain"); - }); - - it("the background-repeat should be 'inherit' without quotes", function () { - document.querySelector( - "head" - ).innerHTML=``; - - const body=document.querySelector("body"); - let styles=window.getComputedStyle(body); - expect(styles["background-repeat"]).toBe("inherit"); - }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() let meta = head.querySelector("meta") expect(meta).toBe(null) - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') + let href = link.getAttribute("href") + expect(href).toEqual('./styles.css') + }); + test("Your body tag background color should be blue", ()=>{ + let styles = window.getComputedStyle(body) + expect(styles["background-color"]).toBe("blue") }) }); From 9710f495b9e79966184e840776098520f5af75ac Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:08:20 +0000 Subject: [PATCH 028/407] added solution file --- exercises/02.1-Background/solution.hide.css | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 exercises/02.1-Background/solution.hide.css diff --git a/exercises/02.1-Background/solution.hide.css b/exercises/02.1-Background/solution.hide.css new file mode 100644 index 00000000..8c72a684 --- /dev/null +++ b/exercises/02.1-Background/solution.hide.css @@ -0,0 +1,5 @@ +body { + background-image: url(https://4geeksacademy.github.io/exercise-assets/img/bg/small-mosaic.jpg); + background-size: contain; + background-repeat: inherit; +} \ No newline at end of file From 708ce0dd5633e6880e3f08c2a0ec84b62e393788 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:09:19 +0000 Subject: [PATCH 029/407] Upgraded test to modern stanndards and made it less repetitive --- exercises/02.1-Background/tests.js | 69 ++++++++++++------------------ 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js index cfde6b1f..375aa45c 100644 --- a/exercises/02.1-Background/tests.js +++ b/exercises/02.1-Background/tests.js @@ -1,67 +1,52 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require("fs"); +const path = require("path"); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - //apply the styles from the stylesheet if needed - - - - }); - afterEach(() => { - jest.resetModules(); - }); - it("The body tag should not contains any inline style", function () { +describe("All the styles should be applied", ()=>{ + const body = document.querySelector("body"); + const link = document.querySelector("link"); + const title = document.querySelector('title'); + + test("The body tag should not contains any inline style", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let bodyInlineStyle=document.getElementsByTagName("body"); - let emptyBodyInlineStyle={}; - expect(bodyInlineStyle[0].style._values).toEqual(emptyBodyInlineStyle); - // expect(bodyInlineStyle[0].style._values.background - repeat).toBe( - // undefined - // ); - - console.log(bodyInlineStyle[0].style._values); + ).innerHTML = ``; + let emptyBodyInlineStyle = {}; + expect(body.style._values).toEqual(emptyBodyInlineStyle); }); - it("the background-size should be 'contain' without quotes", function () { + test("the background-size should be 'contain' without quotes", ()=>{ document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; // get computed styles of any element you like - const body=document.querySelector("body"); - let styles=window.getComputedStyle(body); + let styles = window.getComputedStyle(body); expect(styles["background-size"]).toBe("contain"); }); - it("the background-repeat should be 'inherit' without quotes", function () { + test("the background-repeat should be 'inherit' without quotes", ()=>{ document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - const body=document.querySelector("body"); - let styles=window.getComputedStyle(body); + let styles = window.getComputedStyle(body); expect(styles["background-repeat"]).toBe("inherit"); }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - + let meta = head.querySelector("meta") expect(meta).toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - let title = head.querySelector('title').innerHTML - expect(title).toBe('02 Background') + const href = link.getAttribute("href") + expect(href).toBe('./styles.css') + + let titleInner = title.innerHTML + expect(titleInner).toBe('02 Background') }) }); From f6cd29ab05b8114d7c795561d4c2b1e5096ab887 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:17:38 +0000 Subject: [PATCH 030/407] added solution file --- exercises/03-Inline-Styles/solution.hide.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 exercises/03-Inline-Styles/solution.hide.html diff --git a/exercises/03-Inline-Styles/solution.hide.html b/exercises/03-Inline-Styles/solution.hide.html new file mode 100644 index 00000000..1c3a3828 --- /dev/null +++ b/exercises/03-Inline-Styles/solution.hide.html @@ -0,0 +1,17 @@ + + + + 03 Inline Styles + + + + + + + + + + +
    Hello
    My brother
    + + \ No newline at end of file From c6107db9f77cd6e34d78ba5e82072e7b2f07760a Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:18:05 +0000 Subject: [PATCH 031/407] upgraded tests to mre modern standard --- exercises/03-Inline-Styles/tests.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/exercises/03-Inline-Styles/tests.js b/exercises/03-Inline-Styles/tests.js index 3de572dd..04593d63 100644 --- a/exercises/03-Inline-Styles/tests.js +++ b/exercises/03-Inline-Styles/tests.js @@ -1,24 +1,16 @@ - const fs = require("fs"); const path = require("path"); -const html = fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); - +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("The Table tag should contain inline style background: green", function() { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML = html.toString(); - }); - afterEach(() => { - jest.resetModules(); - }); +describe("The Table tag should contain inline style background: green", ()=>{ - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - + let meta = head.querySelector("meta") expect(meta).toBe(null) @@ -26,7 +18,7 @@ describe("The Table tag should contain inline style background: green", function expect(title).toBe('03 Inline Styles') }) - it("The background should be green", function() { + test("The background should be green", ()=>{ const table = document.querySelector("table"); // expect(table.style.background === "green").toBeTruthy(); var styles = window.getComputedStyle(table); From 2c3450b2a0ec52a842b06cba491aae4ce18bfdb5 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:36:53 +0000 Subject: [PATCH 032/407] exchanged var for let --- exercises/03-Inline-Styles/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Inline-Styles/tests.js b/exercises/03-Inline-Styles/tests.js index 04593d63..b0b7b629 100644 --- a/exercises/03-Inline-Styles/tests.js +++ b/exercises/03-Inline-Styles/tests.js @@ -21,7 +21,7 @@ describe("The Table tag should contain inline style background: green", ()=>{ test("The background should be green", ()=>{ const table = document.querySelector("table"); // expect(table.style.background === "green").toBeTruthy(); - var styles = window.getComputedStyle(table); + let styles = window.getComputedStyle(table); expect(styles["background"]).toBe("green"); }); }); From a6039f493660a39d9f68dff5950d6971b04d2cc5 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:37:28 +0000 Subject: [PATCH 033/407] Added test --- exercises/04-Class-Selector/test.js | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 exercises/04-Class-Selector/test.js diff --git a/exercises/04-Class-Selector/test.js b/exercises/04-Class-Selector/test.js new file mode 100644 index 00000000..58c20d17 --- /dev/null +++ b/exercises/04-Class-Selector/test.js @@ -0,0 +1,40 @@ +const fs = require("fs"); +const path = require("path"); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); + +jest.dontMock("fs"); + +describe("Both p tags should have a blue background", () => { + const body = document.querySelector("body") + const p = document.querySelectorAll("p"); + test("You should not change the existing head tag elements", () => { + let head = document.querySelector('head') + expect(head).toBeTruthy() + + let meta = head.querySelector("meta") + expect(meta).toBe(null) + + let title = head.querySelector('title').innerHTML + expect(title).toBe('04 Class selector') + }); + + test("The body tag should not contains any inline style", () => { + document.querySelector( + "head" + ).innerHTML = ``; + let emptyBodyInlineStyle = {}; + expect(body.style._values).toEqual(emptyBodyInlineStyle) + }); + + test("There should be two p tags", () => { + expect(p.length).toBe(2) + }); + test("Both p tags should have a class name 'b-blue' without the quotation marks", () => { + p.forEach(e=>{ + let eClass = e.getAttribute("class"); + expect(eClass).toBe("b-blue") + }) + }); +}); From bd04bceac091b354fa7740258a1ff22b93580ca9 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:42:15 +0000 Subject: [PATCH 034/407] added solution file --- exercises/04-Class-Selector/index.html | 4 +--- exercises/04-Class-Selector/solution.hide.html | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 exercises/04-Class-Selector/solution.hide.html diff --git a/exercises/04-Class-Selector/index.html b/exercises/04-Class-Selector/index.html index e3abd1bd..45709afb 100644 --- a/exercises/04-Class-Selector/index.html +++ b/exercises/04-Class-Selector/index.html @@ -2,9 +2,7 @@ - - 04 Class selector - + 04 Class selector diff --git a/exercises/04-Class-Selector/solution.hide.html b/exercises/04-Class-Selector/solution.hide.html new file mode 100644 index 00000000..60e1d67f --- /dev/null +++ b/exercises/04-Class-Selector/solution.hide.html @@ -0,0 +1,12 @@ + + + + + 04 Class selector + + + +

    Hello!

    +

    World!

    + + From a55c1f87deb4fa31967428e93e3586125da8670c Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:52:54 +0000 Subject: [PATCH 035/407] added solution file --- exercises/04.1-Combined-Rules/solution.hide.css | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 exercises/04.1-Combined-Rules/solution.hide.css diff --git a/exercises/04.1-Combined-Rules/solution.hide.css b/exercises/04.1-Combined-Rules/solution.hide.css new file mode 100644 index 00000000..e9d46fd5 --- /dev/null +++ b/exercises/04.1-Combined-Rules/solution.hide.css @@ -0,0 +1,8 @@ +.myBox { + width: 50px; + height: 50px; + padding: 10px 190px 50px 30px; + + background: rgb(189, 189, 189) url(https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/3a2d1dd03f58167a5a4894155af2d3aa4d41d647/.learn/assets/baby.jpg?raw=true) no-repeat 100px; + background-size: contain; +} \ No newline at end of file From dcbb8369f218d6436c9147abab85f9d0c3027902 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 03:53:26 +0000 Subject: [PATCH 036/407] improved format and minar issue with header --- exercises/04.1-Combined-Rules/tests.js | 170 ++++++++++--------------- 1 file changed, 67 insertions(+), 103 deletions(-) diff --git a/exercises/04.1-Combined-Rules/tests.js b/exercises/04.1-Combined-Rules/tests.js index 16c3296a..d3540732 100644 --- a/exercises/04.1-Combined-Rules/tests.js +++ b/exercises/04.1-Combined-Rules/tests.js @@ -1,126 +1,91 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require("fs"); +const path = require("path"); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - //apply the styles from the stylesheet if needed - // document.querySelector( - // "head" - // ).innerHTML = ``; - }); - afterEach(() => { - jest.resetModules(); - }); - - // it("The styles.css file should be empty", function () { - // console.log(css); - // expect(css.toString()==="").toBeTruthy(); - // }); - // it("The Head tag should includes a Style tag", function () { - // expect(html.toString().indexOf(`-1).toBeTruthy(); - // }); - it("The body tag should not contains any inline style", function () { +describe("All the styles should be applied", ()=> { + const body = document.querySelector("body"); + const link = document.querySelector("link"); + const title = document.querySelector('title') + test("The body tag should not contains any inline style", ()=> { document.querySelector( "head" - ).innerHTML=``; - let bodyInlineStyle=document.getElementsByTagName("style"); - let emptyBodyInlineStyle={}; - expect(bodyInlineStyle[0].style._values).toEqual(emptyBodyInlineStyle); - console.log("sty: ", bodyInlineStyle[0]); + ).innerHTML = ``; + let emptyBodyInlineStyle = {}; + expect(body.style._values).toEqual(emptyBodyInlineStyle); }); - it("the width should be '50px'", function () { + test("the width should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; // console.log("$$$:", cssArray) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myBox") { + orangeHoverSelector = cssArray[i].style.width; } } expect(orangeHoverSelector).toBe('50px'); }); - it("the height should be '50px'", function () { + test("the height should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; // console.log("$$$:", cssArray) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myBox") { + orangeHoverSelector = cssArray[i].style.height; } } expect(orangeHoverSelector).toBe('50px'); }); - // it("the background should be in rgb code rgb(189, 189, 189)", function() { - // // get computed styles of any element you like - // const body = document.querySelector(".myBox"); - // var styles = window.getComputedStyle(body); - // expect(styles["background"]).toBe("rgb(189, 189, 189)"); - // }); - - // it("the padding-top should be deleted", function () { - // // get computed styles of any element you like - // const body=document.querySelector(".myBox"); - // var styles=window.getComputedStyle(body); - // expect(styles["padding-top"]).toBeFalsy(); - // expect(styles["padding-bottom"]).toBeFalsy(); - // expect(styles["padding-right"]).toBeFalsy(); - // expect(styles["padding-left"]).toBeFalsy(); - // }); - - it("the background-size should be contain", function () { + test("the background-size should be contain", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; // console.log("$$$:", cssArray) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myBox") { + orangeHoverSelector = cssArray[i].style['background-size']; } } expect(orangeHoverSelector).toBe('contain'); }); - it("the background should include the shorthand property", function () { + test("the background should include the shorthand property", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; console.log("$$$:", cssArray) - let orangeHoverSelector=""; + let orangeHoverSelector = ""; let backImg = ""; let backColor = ""; let backPos = ""; let backRepeat = ""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myBox") { + orangeHoverSelector = cssArray[i].style.background; + backImg = cssArray[i].style['background-image']; + backColor = cssArray[i].style['background-color']; + backPos = cssArray[i].style['background-position-x']; + backRepeat = cssArray[i].style['background-repeat']; } } expect(backColor).toBeFalsy(); @@ -133,25 +98,25 @@ describe("All the styles should be applied", function () { expect(orangeHoverSelector).toContain('url(https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/3a2d1dd03f58167a5a4894155af2d3aa4d41d647/.learn/assets/baby.jpg?raw=true)'); }); - it("the padding should include the shorthand property in the right order (top, right, bottom, left)", function () { + test("the padding should include the shorthand property in the right order (top, right, bottom, left)", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; // console.log("$$$:", cssArray) - let orangeHoverSelector=""; - let padTop= ""; - let padRight= ""; - let padBottom= ""; - let padLeft= ""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myBox") { + orangeHoverSelector = cssArray[i].style.padding; + padTop = cssArray[i].style['padding-top'] + padRight = cssArray[i].style['padding-right'] + padBottom = cssArray[i].style['padding-bottom'] + padLeft = cssArray[i].style['padding-left'] } } expect(orangeHoverSelector).toBe('10px 190px 50px 30px'); @@ -160,17 +125,16 @@ describe("All the styles should be applied", function () { expect(padBottom).toBeFalsy(); expect(padLeft).toBeFalsy(); }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=> { let head = document.querySelector('head') expect(head).toBeTruthy() - + let meta = head.querySelector("meta") expect(meta).toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + const href = link.getAttribute("href") + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From ada8f1038cd20d2e8a697855e8672c48214c3e19 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 04:05:42 +0000 Subject: [PATCH 037/407] fixed titles --- exercises/04.1-Combined-Rules/index.html | 4 +--- exercises/04.2-Apply-several-classes/index.html | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/exercises/04.1-Combined-Rules/index.html b/exercises/04.1-Combined-Rules/index.html index 2af5a24c..1525b6cf 100644 --- a/exercises/04.1-Combined-Rules/index.html +++ b/exercises/04.1-Combined-Rules/index.html @@ -2,9 +2,7 @@ - - 04 Combined Rules - + 04.1 Combined Rules diff --git a/exercises/04.2-Apply-several-classes/index.html b/exercises/04.2-Apply-several-classes/index.html index a64723af..3a293815 100644 --- a/exercises/04.2-Apply-several-classes/index.html +++ b/exercises/04.2-Apply-several-classes/index.html @@ -2,9 +2,7 @@ - - 04 Class selector - + 04.2 Apply several classes From e88ac6cefae7c94702a5ae240777af07fbfae8a7 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 04:06:08 +0000 Subject: [PATCH 038/407] added test to check if the div exists and if it contains the proper classes --- exercises/04.2-Apply-several-classes/test.js | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 exercises/04.2-Apply-several-classes/test.js diff --git a/exercises/04.2-Apply-several-classes/test.js b/exercises/04.2-Apply-several-classes/test.js new file mode 100644 index 00000000..2c6ed0d1 --- /dev/null +++ b/exercises/04.2-Apply-several-classes/test.js @@ -0,0 +1,24 @@ +const fs = require("fs"); +const path = require("path"); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +document.documentElement.innerHTML = html.toString(); + +jest.dontMock("fs"); + +describe("You should change the class on the div tag", () => { + const div = document.querySelectorAll("div") + test("There should only be 1 div tag", () => { + expect(div.length).toBe(1) + }); + + test("The div class should NOT have the spades class", () => { + div.forEach(e=>{ + expect(e.classList.contains("spade")).toBe(false) + }) + }); + test("The div class should have the heart class", () => { + div.forEach(e=>{ + expect(e.classList.contains("heart")).toBe(true) + }) + }); +}); From 201f86355bbe0f46a664e1b5347d290fe83c1dbf Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 04:07:31 +0000 Subject: [PATCH 039/407] added solution file --- .../04.2-Apply-several-classes/solution.hide.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 exercises/04.2-Apply-several-classes/solution.hide.html diff --git a/exercises/04.2-Apply-several-classes/solution.hide.html b/exercises/04.2-Apply-several-classes/solution.hide.html new file mode 100644 index 00000000..95de441b --- /dev/null +++ b/exercises/04.2-Apply-several-classes/solution.hide.html @@ -0,0 +1,11 @@ + + + + + 04.2 Apply several classes + + + +
    9
    + + From 683104fc758e7e94aefa9091ac4593aa57e6600e Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 22:37:51 +0000 Subject: [PATCH 040/407] added missing solution and test files --- exercises/04.3-id-Selector/solution.hide.html | 0 exercises/04.3-id-Selector/test.js | 0 exercises/05-Specificity/solution.hide.css | 0 exercises/06-Practicing-Rules/solution.hide.css | 0 exercises/07-Very-Specific-Rules/solution.hide.css | 0 exercises/08-Rounded-Image/solution.hide.css | 0 exercises/09-Anchor-Styles/solution.hide.css | 0 exercises/10-Your-Own-Font/solution.hide.css | 0 exercises/12-Relative-Length-EM-REM/solution.hide.css | 0 exercises/13-Anchor-Like-Button/solution.hide.css | 0 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 exercises/04.3-id-Selector/solution.hide.html create mode 100644 exercises/04.3-id-Selector/test.js create mode 100644 exercises/05-Specificity/solution.hide.css create mode 100644 exercises/06-Practicing-Rules/solution.hide.css create mode 100644 exercises/07-Very-Specific-Rules/solution.hide.css create mode 100644 exercises/08-Rounded-Image/solution.hide.css create mode 100644 exercises/09-Anchor-Styles/solution.hide.css create mode 100644 exercises/10-Your-Own-Font/solution.hide.css create mode 100644 exercises/12-Relative-Length-EM-REM/solution.hide.css create mode 100644 exercises/13-Anchor-Like-Button/solution.hide.css diff --git a/exercises/04.3-id-Selector/solution.hide.html b/exercises/04.3-id-Selector/solution.hide.html new file mode 100644 index 00000000..e69de29b diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js new file mode 100644 index 00000000..e69de29b diff --git a/exercises/05-Specificity/solution.hide.css b/exercises/05-Specificity/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/06-Practicing-Rules/solution.hide.css b/exercises/06-Practicing-Rules/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/07-Very-Specific-Rules/solution.hide.css b/exercises/07-Very-Specific-Rules/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/08-Rounded-Image/solution.hide.css b/exercises/08-Rounded-Image/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/09-Anchor-Styles/solution.hide.css b/exercises/09-Anchor-Styles/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/10-Your-Own-Font/solution.hide.css b/exercises/10-Your-Own-Font/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/12-Relative-Length-EM-REM/solution.hide.css b/exercises/12-Relative-Length-EM-REM/solution.hide.css new file mode 100644 index 00000000..e69de29b diff --git a/exercises/13-Anchor-Like-Button/solution.hide.css b/exercises/13-Anchor-Like-Button/solution.hide.css new file mode 100644 index 00000000..e69de29b From dbbb23158c97950124093004a6a4596978f476cc Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 22:53:08 +0000 Subject: [PATCH 041/407] added solution to file --- exercises/04.3-id-Selector/solution.hide.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/04.3-id-Selector/solution.hide.html b/exercises/04.3-id-Selector/solution.hide.html index e69de29b..a7964559 100644 --- a/exercises/04.3-id-Selector/solution.hide.html +++ b/exercises/04.3-id-Selector/solution.hide.html @@ -0,0 +1,13 @@ + + + + + + 04.3 ID selector + + + + + I should look like a button + + From e2ab5947dda428539cbae8a6d33f7ff7544c54d7 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 22:53:39 +0000 Subject: [PATCH 042/407] added tests to file to check for id name and if span exists --- exercises/04.3-id-Selector/test.js | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js index e69de29b..9277e129 100644 --- a/exercises/04.3-id-Selector/test.js +++ b/exercises/04.3-id-Selector/test.js @@ -0,0 +1,32 @@ +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +document.documentElement.innerHTML = html.toString(); + +jest.dontMock('fs'); + +const span = document.querySelector("span"); +const link = document.querySelector("link"); + +test("There should be a span tag", ()=>{ + expect(span).toBeTruthy() +}) +test("The span tag should have id 'button1'", ()=>{ + let id = span.id + expect(id).toBe('button1') +}); +test("The span tag should not contain any inline style", ()=>{ + let emptyBodyInlineStyle = {}; + expect(span.style._values).toEqual(emptyBodyInlineStyle); +}); + +test("You should not change the existing head tag elements", ()=>{ + let head = document.querySelector('head') + expect(head).toBeTruthy() + + let meta = head.querySelector("meta") + expect(meta).toBe(null) + + const href = link.getAttribute("href") + expect(href).toBe('./styles.css') + }); \ No newline at end of file From 76db85ea49b2baa961ae1665be4a0f5aaff4e7d6 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 23:48:34 +0000 Subject: [PATCH 043/407] added solution file --- exercises/05-Specificity/solution.hide.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/exercises/05-Specificity/solution.hide.css b/exercises/05-Specificity/solution.hide.css index e69de29b..13374f70 100644 --- a/exercises/05-Specificity/solution.hide.css +++ b/exercises/05-Specificity/solution.hide.css @@ -0,0 +1,11 @@ +ul li { + background: blue; +} + +#thirditem { + background: yellow; +} +/****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ +#thirditem { + background: green !important; +} From 1d99ba2853293078fc211db05c4d85aab8d3282a Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 3 Aug 2022 23:48:49 +0000 Subject: [PATCH 044/407] improved tests --- exercises/05-Specificity/tests.js | 57 +++++++++++++------------------ 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js index e58651a4..9e6d52d6 100644 --- a/exercises/05-Specificity/tests.js +++ b/exercises/05-Specificity/tests.js @@ -1,61 +1,52 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - }); - afterEach(() => { - jest.resetModules(); - }); - - - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", function () { let head = document.querySelector('head') expect(head).toBeTruthy() - + let meta = head.querySelector("meta") expect(meta).not.toBe(null) - + const pathname = new URL(document.querySelector('link').href).pathname expect(pathname).toBe('/styles.css') - + let title = head.querySelector('title') expect(title).not.toBe(null) }) - it("You should not delete or edit the existing code", function () { + + test("You should not delete or edit the existing code", function () { document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules[0].selectorText; - // console.log("cssArray:",cssArray) - let cssArrayBackground= document.styleSheets[0].cssRules[0].style.background - console.log("back:",cssArrayBackground) - let thirdItSelector=document.styleSheets[0].cssRules[1].selectorText; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules[0].selectorText; + let cssArrayBackground = document.styleSheets[0].cssRules[0].style.background + console.log("back:", cssArrayBackground) + let thirdItSelector = document.styleSheets[0].cssRules[1].selectorText; let thirdItBackground = document.styleSheets[0].cssRules[1].style.background expect(thirdItSelector).toBe("#thirditem"); expect(thirdItBackground).toBe("yellow"); expect(cssArray).toBe("ul li"); expect(cssArrayBackground).toBe("blue"); }) - it("You should use a more specific rule using the !important annotation ", function () { + test("You should use a more specific rule using the !important annotation ", function () { document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; - // console.log("NEW", cssArray[2].style._importants) - let orangeHoverSelector=""; - for (let i=0; i${css.toString()}`; + let cssArray = document.styleSheets[0].cssRules; + let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { + if (cssArray[i].selectorText === "#thirditem" && cssArray[i].style._importants.background === "important") { + orangeHoverSelector = cssArray[i].style.background; } } From dcfad06eb9a790990b6bdbf3af59d7280cdcdbcf Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 00:40:23 +0000 Subject: [PATCH 045/407] added solution --- .../06-Practicing-Rules/solution.hide.css | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/exercises/06-Practicing-Rules/solution.hide.css b/exercises/06-Practicing-Rules/solution.hide.css index e69de29b..d1e24e3c 100644 --- a/exercises/06-Practicing-Rules/solution.hide.css +++ b/exercises/06-Practicing-Rules/solution.hide.css @@ -0,0 +1,26 @@ +/* add your styles here */ +body { + background: url("../../.learn/assets/background-vertical.jpg?raw=true") repeat-y; + font-family: "Times New Roman"; + padding-left: 20px; +} + +#id1 { + background: rgba(255, 255, 255, 0.2); + padding: 5px; +} + +h1 { + font-family: "Courier"; + color: red; + text-align: center; +} + +h2 { + text-decoration: underline; +} + +a:hover { + color: green; + text-decoration: none; +} From 7cc4d9fa49e24a6af25b401d09e4e77cf3478ea1 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 00:43:00 +0000 Subject: [PATCH 046/407] improved tests and fixed minor issues --- exercises/06-Practicing-Rules/tests.js | 150 ++++++++++++------------- 1 file changed, 70 insertions(+), 80 deletions(-) diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js index ae40b996..5c2e9903 100644 --- a/exercises/06-Practicing-Rules/tests.js +++ b/exercises/06-Practicing-Rules/tests.js @@ -1,148 +1,138 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); +describe("All the styles should be applied", ()=> { + let meta = document.querySelector("meta") + let link = document.querySelector("link") + let title = document.querySelector('title') - // apply the styles from the stylesheet if needed - - }); - afterEach(() => { - jest.resetModules(); - }); - - - - it("the background should match", function () { + test("the background should match", ()=> { document.querySelector( "head" - ).innerHTML=``; - let body=document.querySelector("body"); - let styles=window.getComputedStyle(body); + ).innerHTML = ``; + let body = document.querySelector("body"); + let styles = window.getComputedStyle(body); expect(styles["background"]).toBe( `url(../../.learn/assets/background-vertical.jpg?raw=true) repeat-y` ); }); - it("the font-family should be 'Times New Roman'", function () { + test("the font-family should be 'Times New Roman'", ()=> { document.querySelector( "head" - ).innerHTML=``; - let body=document.querySelector("body"); - let styles=window.getComputedStyle(body); - expect(styles["font-family"]).toBe("Times New Roman"); + ).innerHTML = ``; + let body = document.querySelector("body"); + let styles = window.getComputedStyle(body); + expect(styles["font-family"]).toBe("\"Times New Roman\""); }); - it("the padding-left should be '20px'", function () { + test("the padding-left should be '20px'", ()=> { document.querySelector( "head" - ).innerHTML=``; - let body=document.querySelector("body"); - let styles=window.getComputedStyle(body); + ).innerHTML = ``; + let body = document.querySelector("body"); + let styles = window.getComputedStyle(body); expect(styles["padding-left"]).toBe("20px"); }); - it("the font-family in the H1 Tag should be 'Courier'", function () { + test("the font-family in the H1 Tag should be 'Courier'", ()=> { document.querySelector( "head" - ).innerHTML=``; - let h1Tag=document.querySelector("h1"); - let h1TagStyles=window.getComputedStyle(h1Tag); + ).innerHTML = ``; + let h1Tag = document.querySelector("h1"); + let h1TagStyles = window.getComputedStyle(h1Tag); // get computed styles of any element you like - expect(h1TagStyles["font-family"]).toBe("Courier"); + expect(h1TagStyles["font-family"]).toBe("\"Courier\""); }); - it("the color in the H1 Tag should be 'red'", function () { + test("the color in the H1 Tag should be 'red'", ()=> { document.querySelector( "head" - ).innerHTML=``; - let h1Tag=document.querySelector("h1"); - let h1TagStyles=window.getComputedStyle(h1Tag); + ).innerHTML = ``; + let h1Tag = document.querySelector("h1"); + let h1TagStyles = window.getComputedStyle(h1Tag); // get computed styles of any element you like expect(h1TagStyles["color"]).toBe("red"); }); - it("the text-align in the H1 Tag should be 'center'", function () { + test("the text-align in the H1 Tag should be 'center'", ()=> { document.querySelector( "head" - ).innerHTML=``; - let h1Tag=document.querySelector("h1"); - let h1TagStyles=window.getComputedStyle(h1Tag); + ).innerHTML = ``; + let h1Tag = document.querySelector("h1"); + let h1TagStyles = window.getComputedStyle(h1Tag); // get computed styles of any element you like expect(h1TagStyles["text-align"]).toBe("center"); }); - it("the text-decoration in the H2 Tag should be 'underline'", function () { + test("the text-decoration in the H2 Tag should be 'underline'", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; // get computed styles of any element you like - const h2Tag=document.querySelector("h2"); - let h2TagStyles=window.getComputedStyle(h2Tag); + const h2Tag = document.querySelector("h2"); + let h2TagStyles = window.getComputedStyle(h2Tag); expect(h2TagStyles["text-decoration"]).toBe("underline"); }); - it("the padding in the #id1 Tag should be '5px'", function () { + test("the padding in the #id1 Tag should be '5px'", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; // get computed styles of any element you like - const idTag=document.querySelector("#id1"); - let idTagStyles=window.getComputedStyle(idTag); + const idTag = document.querySelector("#id1"); + let idTagStyles = window.getComputedStyle(idTag); expect(idTagStyles["padding"]).toBe("5px"); }); - it("the background-color in the #id1 Tag should be 'semi transparent white'", function () { + test("the background-color in the #id1 Tag should be 'semi transparent white'", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; // get computed styles of any element you like - const idTag=document.querySelector("#id1"); - let idTagStyles=window.getComputedStyle(idTag); + const idTag = document.querySelector("#id1"); + let idTagStyles = window.getComputedStyle(idTag); console.log("$$$:", idTagStyles) expect(idTagStyles["background-color"]).toBe("rgba(255, 255, 255, 0.2)"); }); - it("The a hover underline should be removed", function () { + test("The a hover underline should be removed", ()=> { document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; // console.log("$$$:", cssArray) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === "a:hover") { + orangeHoverSelector = cssArray[i].style['text-decoration']; console.log("$$$:", orangeHoverSelector) } } expect(orangeHoverSelector).toBe("none"); }); - it("The a hover color should be green", function () { + test("The a hover color should be green", ()=> { document.querySelector( "head" - ).innerHTML=``; + ).innerHTML = ``; - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; console.log("$$$:", cssArray[0]) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === "a:hover") { + orangeHoverSelector = cssArray[i].style.color; } } expect(orangeHoverSelector).toBe('green'); }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=> { let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let pathname = link.getAttribute("href") + expect(pathname).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From 9e629d73d45ff2eb032dc390aede164a584cfbf0 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 15:29:26 +0000 Subject: [PATCH 047/407] added solution --- .../07-Very-Specific-Rules/solution.hide.css | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/exercises/07-Very-Specific-Rules/solution.hide.css b/exercises/07-Very-Specific-Rules/solution.hide.css index e69de29b..eb60fcfa 100644 --- a/exercises/07-Very-Specific-Rules/solution.hide.css +++ b/exercises/07-Very-Specific-Rules/solution.hide.css @@ -0,0 +1,25 @@ +/** Insert your code here **/ +ul li { + color: red; +} + +ol li:nth-child(2) { + background-color: green; +} + +tr:nth-child(odd) { + background: yellow; +} +/*********** READ ONLY BLOCK ****** +You CANNOT UPDATE anything from here on, +only add lines of code on top of this lines +**/ + +body { + color: blue; +} + +ul li, +ol li { + color: green; +} From 67b25638673e82fb8c220c2b1a34ef256e4b6a84 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 15:30:01 +0000 Subject: [PATCH 048/407] fixed minor errors and improved test format --- exercises/07-Very-Specific-Rules/tests.js | 101 ++++++++++------------ 1 file changed, 47 insertions(+), 54 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 9cdd774c..10b24a7e 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -1,86 +1,79 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - //apply the styles from the stylesheet if needed - }); - afterEach(() => { - jest.resetModules(); - }); - - - it("The ul li color has to be red", function () { +describe("All the styles should be applied", ()=>{ + const meta = document.querySelector("meta") + const title = document.querySelector('title') + const link = document.querySelector('link') + + test("The ul li color has to be red", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; - let orangeHoverSelector=""; - for (let i=0; i li") { - orangeHoverSelector=cssArray[i].style.color; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; + let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { + if (cssArray[i].selectorText === "ul li" || cssArray[i].selectorText === "ul > li") { + orangeHoverSelector = cssArray[i].style["color"]; } - expect(orangeHoverSelector).toBe("red"); } + expect(orangeHoverSelector).toBe("red"); }); - it("The ul second element background should be green", function () { + test("The ul second element background should be green", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector=""; - for (let i=0; i li:nth-child(2)" ) { - orangeHoverSelector=cssArray[i].style['background-color']; + let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { + if (cssArray[i].selectorText === "ol li:nth-child(2)" || cssArray[i].selectorText === "ol > li:nth-child(2)") { + orangeHoverSelector = cssArray[i].style['background-color']; } - }expect(orangeHoverSelector).toBe("green"); + } expect(orangeHoverSelector).toBe("green"); }) - it("The odd rows of the table should have yellow background", function () { + test("The odd rows of the table should have yellow background", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === "tr:nth-child(odd)") { + orangeHoverSelector = cssArray[i].style['background']; } - }expect(orangeHoverSelector).toBe("yellow"); + } expect(orangeHoverSelector).toBe("yellow"); }) - it("Write all your rules above the existing code", function () { + test("Write all your rules above the existing code", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssBody=document.styleSheets[0].cssRules[3].selectorText; - let cssArray=document.styleSheets[0].cssRules[4].selectorText; + ).innerHTML = ``; + let cssBody = document.styleSheets[0].cssRules[3].selectorText; + let cssArray = document.styleSheets[0].cssRules[4].selectorText; expect(cssArray).toBe("ul li,\nol li"); expect(cssBody).toBe("body"); } ) - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let href = link.getAttribute('href') + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); \ No newline at end of file From 62a29ac6547049d730d99ef45a94f293acb5ce3a Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 17:12:02 +0000 Subject: [PATCH 049/407] added solution --- exercises/08-Rounded-Image/solution.hide.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/08-Rounded-Image/solution.hide.css b/exercises/08-Rounded-Image/solution.hide.css index e69de29b..56819f66 100644 --- a/exercises/08-Rounded-Image/solution.hide.css +++ b/exercises/08-Rounded-Image/solution.hide.css @@ -0,0 +1,13 @@ +body { + background: #bdbdbd; +} +.rounded { + border-radius: 100%; + background-image: url("https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/master/.learn/assets/einstein.png?raw=true"); + background-position-x: center; + background-position-y: center; + background-size: contain; + object-fit: cover; + width: 200px; + height: 200px; +} From d62d736175aeceae5e670bb3f8990f1920a5ca02 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 17:13:17 +0000 Subject: [PATCH 050/407] fix minor issues and improved format --- exercises/08-Rounded-Image/tests.js | 58 +++++++++++++---------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js index fc2abaa5..c03d1580 100644 --- a/exercises/08-Rounded-Image/tests.js +++ b/exercises/08-Rounded-Image/tests.js @@ -1,35 +1,29 @@ -const fs = require("fs"); -const path = require("path"); -const html = fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); -describe("All the styles should be applied", function() { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML = html.toString(); +describe("All the styles should be applied", () => { + const meta = document.querySelector("meta") + const title = document.querySelector('title') + const link = document.querySelector('link') - //apply the styles from the stylesheet if needed - - }); - afterEach(() => { - jest.resetModules(); - }); - - it("The tag has to be removed", function() { + test("The tag has to be removed", () => { document.querySelector( "head" ).innerHTML = ``; expect(document.querySelector("img")).toBeFalsy(); }); - it("The
    tag should exists", function() { + test("The
    tag should exists", () => { document.querySelector( "head" ).innerHTML = ``; expect(document.querySelector("div")).toBeTruthy(); }); - it("the width in the div Tag should be '200px'", function() { + test("the width in the div Tag should be '200px'", () => { // get computed styles of any element you like document.querySelector( "head" @@ -38,7 +32,7 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["width"]).toBe("200px"); }); - it("the height in the div Tag should be '200px'", function() { + test("the height in the div Tag should be '200px'", () => { // get computed styles of any element you like document.querySelector( "head" @@ -47,7 +41,7 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["height"]).toBe("200px"); }); - it("the border radius in the div Tag should be '100%'", function() { + test("the border radius in the div Tag should be '100%'", () => { // get computed styles of any element you like document.querySelector( "head" @@ -56,7 +50,7 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["border-radius"]).toBe("100%"); }); - it("the background position x in the div Tag should be 'center'", function() { + test("the background position x in the div Tag should be 'center'", () => { // get computed styles of any element you like document.querySelector( "head" @@ -65,7 +59,7 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["background-position-x"]).toBe("center"); }); - it("the background position y in the div Tag should be 'center'", function() { + test("the background position y in the div Tag should be 'center'", () => { // get computed styles of any element you like document.querySelector( "head" @@ -74,7 +68,7 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["background-position-y"]).toBe("center"); }); - it("the background image in the div Tag should exists", function() { + test("the background image in the div Tag should exists", () => { // get computed styles of any element you like document.querySelector( "head" @@ -83,17 +77,15 @@ describe("All the styles should be applied", function() { let idTagStyles = window.getComputedStyle(divTag); expect(idTagStyles["background-image"]).toBeTruthy(); }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let href = link.getAttribute('href') + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From 2ff5fcafa6d3e0bb1426504ba16b627236da6831 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 17:37:26 +0000 Subject: [PATCH 051/407] added solution --- exercises/09-Anchor-Styles/solution.hide.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exercises/09-Anchor-Styles/solution.hide.css b/exercises/09-Anchor-Styles/solution.hide.css index e69de29b..b3e6a36b 100644 --- a/exercises/09-Anchor-Styles/solution.hide.css +++ b/exercises/09-Anchor-Styles/solution.hide.css @@ -0,0 +1,15 @@ +.threeDimension { + display: block; + border: 1px solid; + border-color: #aaa #000 #000 #aaa; + width: 8em; + background: #fc0; + text-decoration: none; + text-align: center; + color: black; +} + +a.threeDimension:active { + /* your code here*/ + border-color: #000 #aaa #aaa #000; +} \ No newline at end of file From e5ae3f25e771f0ce5d39970048b612e2c4f306aa Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 17:37:58 +0000 Subject: [PATCH 052/407] added test to prevent user from changing default styles plus minor improvements --- exercises/09-Anchor-Styles/tests.js | 98 +++++++++++++++++------------ 1 file changed, 58 insertions(+), 40 deletions(-) diff --git a/exercises/09-Anchor-Styles/tests.js b/exercises/09-Anchor-Styles/tests.js index cab43954..73192e4f 100644 --- a/exercises/09-Anchor-Styles/tests.js +++ b/exercises/09-Anchor-Styles/tests.js @@ -1,68 +1,86 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); -let cssArray=null; -jest.dontMock("fs"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); +jest.dontMock('fs'); - //apply the styles from the stylesheet if needed +let cssArray = null; - - }); - afterEach(() => { - jest.resetModules(); - }); - - it("You should not add your rules above the existing code", function () { +describe("All the styles should be applied", () => { + const meta = document.querySelector("meta") + const title = document.querySelector('title') + const link = document.querySelector('link') + test("You should not add your rules above the existing code", () => { document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules[0].selectorText; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules[0].selectorText; expect(cssArray).toBe(".threeDimension"); }) - it("the 'a' tag in the index.html should not be deleted", function () { + test("the 'a' tag in the index.html should not be deleted", () => { // we can read from the source code // console.log(html.toString()); - expect(html.toString().indexOf(`-1).toBeTruthy(); + expect(html.toString().indexOf(` -1).toBeTruthy(); }); - it("The border-color rule for the 'threeDimension active ' property should match the instruction color", function () { + test("The border-color rule for the 'threeDimension active ' property should match the instruction color", () => { // get computed styles of any element you like // let cssArray=document.styleSheets[0].cssRules; document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === "a.threeDimension:active") { + orangeHoverSelector = cssArray[i].style['border-color']; } } - expect(orangeHoverSelector).toBe("#000 #aaa #aaa #000"); + + }); + test("You should not change the default styles", () => { + // get computed styles of any element you like + // let cssArray=document.styleSheets[0].cssRules; + document.querySelector( + "head" + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; + + let borderColor = ""; + let color = ""; + let background = ""; + let width = ""; + for (let i = 0; i < cssArray.length; i++) { + if (cssArray[i].selectorText === ".threeDimension") { + borderColor = cssArray[i].style["border-color"]; + color = cssArray[i].style['color']; + background = cssArray[i].style['background']; + width = cssArray[i].style['width']; + expect(borderColor).toBe("#aaa #000 #000 #aaa"); + expect(color).toBe("black"); + expect(background).toBe("#fc0"); + expect(width).toBe("8em"); + } + } + }); - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let href = link.getAttribute('href') + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From b512f717377fe13c5b66cfab03336c81531a4c51 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 19:22:40 +0000 Subject: [PATCH 053/407] added solutions for html and css --- exercises/10-Your-Own-Font/solution.hide.css | 4 ++++ exercises/10-Your-Own-Font/solution.hide.html | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 exercises/10-Your-Own-Font/solution.hide.html diff --git a/exercises/10-Your-Own-Font/solution.hide.css b/exercises/10-Your-Own-Font/solution.hide.css index e69de29b..371e026b 100644 --- a/exercises/10-Your-Own-Font/solution.hide.css +++ b/exercises/10-Your-Own-Font/solution.hide.css @@ -0,0 +1,4 @@ +.myTitle { + /*your code here*/ + font-family: 'Roboto'; /*Varies depending on the font you chose*/ +} diff --git a/exercises/10-Your-Own-Font/solution.hide.html b/exercises/10-Your-Own-Font/solution.hide.html new file mode 100644 index 00000000..b2268633 --- /dev/null +++ b/exercises/10-Your-Own-Font/solution.hide.html @@ -0,0 +1,20 @@ + + + + + + + + + + + 10 Your Own Font + + + +

    My unique font

    + + + \ No newline at end of file From e4452cc9bc10c0beeb41aadd3cb757c5300d9b3b Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 19:23:45 +0000 Subject: [PATCH 054/407] fixed issue with CSS rules, improved tests --- exercises/10-Your-Own-Font/tests.js | 60 +++++++++++++---------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js index dd13147d..52e13aa6 100644 --- a/exercises/10-Your-Own-Font/tests.js +++ b/exercises/10-Your-Own-Font/tests.js @@ -1,53 +1,47 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); - -jest.dontMock("fs"); - -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - //apply the styles from the stylesheet if needed - // document.querySelector( - // "head" - // ).innerHTML=``; - }); - afterEach(() => { - jest.resetModules(); - }); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); + +jest.dontMock('fs'); + +let cssArray = null; + +describe("All the styles should be applied", ()=>{ + const link = document.querySelectorAll("link") + test("the font-family in the .myTitle should exists", ()=>{ + document.querySelector( + "head" + ).innerHTML = ``; - it("the font-family in the .myTitle should exists", function () { // get computed styles of any element you like - let cssArray=document.styleSheets[0].cssRules; + let cssArray = document.styleSheets[0].cssRules; // console.log("%%% ", cssArray) - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".myTitle") { // console.log("%%% ", cssArray[i].selectorText) - orangeHoverSelector=cssArray[i].style['font-family']; + orangeHoverSelector = cssArray[i].style['font-family']; } } expect(orangeHoverSelector).toBeTruthy(); }); - it('the h1 tag should have a class "myTitle"', function () { + test('the h1 tag should have a class "myTitle"', ()=>{ //or use query selector to compare hoy mane scriptags do we have - const h=document.querySelector("h1"); + const h = document.querySelector("h1"); expect(h.classList.contains("myTitle")).toBeTruthy(); }); - it("The link should be included in the head tag", function () { + test("The link should be included in the head tag", ()=>{ // let headContent=document.getElementsByTagName("*") // console.log("###", headContent[1].innerHTML) - console.log("###", document.head.childNodes) - expect(document.querySelectorAll("link").length).toBe(2); + expect(link.length).toBe(2); }); - it("The Head tag should not includes a Style tag", function () { - expect(html.toString().indexOf(`-1).toBeFalsy(); + test("The Head tag should not includes a Style tag", ()=>{ + expect(html.toString().indexOf(` -1).toBeFalsy(); }); }); From a01e4bf84c31401661d13f72b9f7a0d3e0f2703f Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 19:38:45 +0000 Subject: [PATCH 055/407] added solution --- exercises/11-Font-Awesome-Icons/solution.hide.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/solution.hide.html b/exercises/11-Font-Awesome-Icons/solution.hide.html index bd68c2a7..e9778b12 100644 --- a/exercises/11-Font-Awesome-Icons/solution.hide.html +++ b/exercises/11-Font-Awesome-Icons/solution.hide.html @@ -9,9 +9,9 @@
      -
    • Hello
    • -
    • Flag
    • -
    • Heart
    • +
    • Hello
    • +
    • Hello
    • +
    • Hello
    From b62745c734e3cc8d7a67ede1ab83b7f662b8c60a Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 19:40:47 +0000 Subject: [PATCH 056/407] fixed test checking for the wrong class, improved tests overall --- exercises/11-Font-Awesome-Icons/tests.js | 46 ++++++++++-------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 3fa966cb..f7d8cf6e 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -1,46 +1,38 @@ -const fs = require("fs"); -const path = require("path"); -const html = fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); -describe("All the styles should be applied", function() { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML = html.toString(); +let cssArray = null; - //apply the styles from the stylesheet if needed - document.querySelector( - "head" - ).innerHTML = ``; - }); - afterEach(() => { - jest.resetModules(); - }); - - it("ul tag should exists", function() { +describe("All the styles should be applied", ()=>{ + const icons = document.querySelectorAll("i"); + test("ul tag should exists", ()=>{ expect(document.querySelector("ul")).toBeTruthy(); }); - it("At least 3 li tags should exist", function() { + test("At least 3 li tags should exist", ()=>{ expect(document.querySelectorAll("li").length).toBe(3); }); - it("At least 3 i tags should exist", function() { + test("At least 3 i tags should exist", ()=>{ expect(document.querySelectorAll("i").length).toBe(3); }); - it(" LI innerHTML exist", function() { + test(" LI innerHTML exist", ()=>{ const li = document.querySelectorAll("li"); expect(document.querySelector("li")).toBeTruthy(); for (let i = 0; i < li.length; i++) { expect(li[i].innerHTML).toBeTruthy(); } }); - it('the i tag should have a class "fas"', function() { + test('the i tag should have a class "fas"', ()=>{ //or use query selector to compare hoy mane scriptags do we have - const icon = document.querySelectorAll("i"); - expect(document.querySelector("i")).toBeTruthy(); - for (let i = 0; i < icon.length; i++) { - expect(icon[i].classList.contains("fa")).toBeTruthy(); - } + expect(icons).toBeTruthy(); + + icons.forEach(icon=>{ + let hasFas = icon.classList.contains("fas") + expect(hasFas).toBe(true); + }) }); }); From 247b554390c32b901f751e7bed8bb900665364b1 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 20:29:44 +0000 Subject: [PATCH 057/407] added solution --- .../12-Relative-Length-EM-REM/solution.hide.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exercises/12-Relative-Length-EM-REM/solution.hide.css b/exercises/12-Relative-Length-EM-REM/solution.hide.css index e69de29b..eeb04334 100644 --- a/exercises/12-Relative-Length-EM-REM/solution.hide.css +++ b/exercises/12-Relative-Length-EM-REM/solution.hide.css @@ -0,0 +1,15 @@ +#my-first-div { + font-size: 15px; +} +#the-second-one { + font-size: 25px; +} + +/* YOUR CODE BELOW THIS LINE */ +h2{ + font-size: 0.8em; +} + +h3{ + font-size: 0.8rem; +} \ No newline at end of file From cb10a77a787282c93cdc6dc09da99320004fe00f Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 4 Aug 2022 20:29:57 +0000 Subject: [PATCH 058/407] fixed and cleaned up tests --- exercises/12-Relative-Length-EM-REM/tests.js | 73 +++++++++----------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/exercises/12-Relative-Length-EM-REM/tests.js b/exercises/12-Relative-Length-EM-REM/tests.js index 2f884753..2752a78d 100644 --- a/exercises/12-Relative-Length-EM-REM/tests.js +++ b/exercises/12-Relative-Length-EM-REM/tests.js @@ -1,69 +1,60 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); -jest.dontMock("fs"); +jest.dontMock('fs'); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - //apply the styles from the stylesheet if needed - - }); - afterEach(() => { - jest.resetModules(); - }); - - it("The H2 Tag should have a font-size: 0.8em", function () { +describe("All the styles should be applied", ()=>{ + const meta = document.querySelector("meta") + const title = document.querySelector('title') + const link = document.querySelector('link') + test("The H2 Tag should have a font-size: 0.8em", ()=>{ // get computed styles of any element you like document.querySelector( "head" - ).innerHTML=``; - const h2Tag=document.querySelector("h2"); - var styles=window.getComputedStyle(h2Tag); + ).innerHTML = ``; + const h2Tag = document.querySelector("h2"); + var styles = window.getComputedStyle(h2Tag); expect(styles["font-size"]).toBe("0.8em"); }); - it("The H3 Tag should haave a font-size: 0.8rem", function () { + test("The H3 Tag should haave a font-size: 0.8rem", ()=>{ // get computed styles of any element you like document.querySelector( "head" - ).innerHTML=``; - const h3Tag=document.querySelector("h3"); - var styles=window.getComputedStyle(h3Tag); + ).innerHTML = ``; + const h3Tag = document.querySelector("h3"); + var styles = window.getComputedStyle(h3Tag); expect(styles["font-size"]).toBe("0.8rem"); }); - it("You should add your rules below the existing code", function () { + test("You should add your rules below the existing code", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules[0].selectorText; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules[0].selectorText; expect(cssArray).toBe("#my-first-div"); } ) - it("You should add your rules below the existing code", function () { + test("You should add your rules below the existing code", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules[1].selectorText; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules[1].selectorText; expect(cssArray).toBe("#the-second-one"); } ) - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let href = link.getAttribute('href') + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From fdaa2df10b8c994347f5cb23c6f7af73f7090460 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Sat, 6 Aug 2022 02:54:50 +0000 Subject: [PATCH 059/407] changed colors color requirements to orange and dark orange --- exercises/13-Anchor-Like-Button/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/13-Anchor-Like-Button/tests.js b/exercises/13-Anchor-Like-Button/tests.js index 32f0c21e..bddebed7 100644 --- a/exercises/13-Anchor-Like-Button/tests.js +++ b/exercises/13-Anchor-Like-Button/tests.js @@ -54,7 +54,7 @@ describe("All the styles should be applied", function () { ).innerHTML=``; let divTag=document.querySelector(".orange-btn"); let classTagStyles=window.getComputedStyle(divTag); - expect(classTagStyles["background"]).toBe("rgb(255, 153, 51)"); + expect(classTagStyles["background"]).toBe("orange"); }); it("the underline should to be removed", function () { document.querySelector( @@ -79,7 +79,7 @@ describe("All the styles should be applied", function () { } } - expect(orangeHoverSelector).toBe("#cc7a00"); + expect(orangeHoverSelector).toBe("darkorange"); }); it("You should be careful with the specifity", function () { From 2a3353ce41387d81223b366b536a2d80fbfb6a08 Mon Sep 17 00:00:00 2001 From: ErnestoXG <60261375+UmiKami@users.noreply.github.com> Date: Sun, 7 Aug 2022 23:46:26 -0400 Subject: [PATCH 060/407] Update index.html better format --- exercises/12-Relative-Length-EM-REM/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/12-Relative-Length-EM-REM/index.html b/exercises/12-Relative-Length-EM-REM/index.html index 60a98594..f4d745fd 100644 --- a/exercises/12-Relative-Length-EM-REM/index.html +++ b/exercises/12-Relative-Length-EM-REM/index.html @@ -12,6 +12,7 @@

    First h2 heading

    First h3 heading

    Here is some nice fake content

    +

    Second h2 heading

    Second h3 heading

    From 4328860e8d1e81db2310da502c4ab1e394fa2b45 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 10 Aug 2022 02:40:49 +0000 Subject: [PATCH 061/407] Gave user specific colors to use --- exercises/13-Anchor-Like-Button/README.es.md | 2 +- exercises/13-Anchor-Like-Button/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/13-Anchor-Like-Button/README.es.md b/exercises/13-Anchor-Like-Button/README.es.md index a1fda469..576d146b 100644 --- a/exercises/13-Anchor-Like-Button/README.es.md +++ b/exercises/13-Anchor-Like-Button/README.es.md @@ -10,7 +10,7 @@ Siga estos pasos para que tu enlace (`anchor`) se vea así: 2. Bordes redondeados: establece el `border-radius` en `4px`. -3. Encuentra y aplica el color: usa el selector de `color` (color picker) para encontrar el color exacto y aplicárselo al `background`. +3. El `background` debe ser de color `orange`, y cuando el ratón esté sobre el botón (`:hover`), el `background` debe ser `darkorange` 4. Eliminar subrayado: establece `text-decoration` a `none`. diff --git a/exercises/13-Anchor-Like-Button/README.md b/exercises/13-Anchor-Like-Button/README.md index 40327be6..49ced0bf 100644 --- a/exercises/13-Anchor-Like-Button/README.md +++ b/exercises/13-Anchor-Like-Button/README.md @@ -8,7 +8,7 @@ Anchors are not only used within text- when you are going to use anchors outside 2. Rounded borders: Set `border-radius` to `4px`. -3. Find and apply the color: Use the color picker to find the color and apply make the background to that color. +3. The background should be `orange` when not hovered, and `darkorange` on hover (`:hover`). 4. Remove underline: Set `text-decoration` to `none`. From 13991d0b869c311002a7e25303cc8692e19c1cd5 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 10 Aug 2022 02:41:02 +0000 Subject: [PATCH 062/407] added solution --- exercises/13-Anchor-Like-Button/solution.hide.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/13-Anchor-Like-Button/solution.hide.css b/exercises/13-Anchor-Like-Button/solution.hide.css index e69de29b..fd0db11b 100644 --- a/exercises/13-Anchor-Like-Button/solution.hide.css +++ b/exercises/13-Anchor-Like-Button/solution.hide.css @@ -0,0 +1,13 @@ +.orange-btn { + /*your code here*/ + padding: 10px; + border-radius: 4px; + text-decoration: none; + color: white; + background: orange; +} + +.orange-btn:hover { + /*YOUR CODE HERE FOR THE HOVER STATE*/ + background: darkorange; +} From 9bf97689150f71e33bf5f10087e3f645f7c92f6b Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Wed, 10 Aug 2022 02:41:54 +0000 Subject: [PATCH 063/407] improved tests and cleaned them up --- exercises/13-Anchor-Like-Button/tests.js | 105 ++++++++++------------- 1 file changed, 44 insertions(+), 61 deletions(-) diff --git a/exercises/13-Anchor-Like-Button/tests.js b/exercises/13-Anchor-Like-Button/tests.js index bddebed7..fcc69fa4 100644 --- a/exercises/13-Anchor-Like-Button/tests.js +++ b/exercises/13-Anchor-Like-Button/tests.js @@ -1,107 +1,90 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); -const css=fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +const fs = require('fs'); +const path = require('path'); +const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8'); +const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8"); +document.documentElement.innerHTML = html.toString(); +jest.dontMock('fs'); -jest.dontMock("fs"); -describe("All the styles should be applied", function () { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML=html.toString(); - - - }); - afterEach(() => { - jest.resetModules(); - }); - - it("the padding should be '10px'", function () { +describe("All the styles should be applied", ()=>{ + const meta = document.querySelector("meta") + const title = document.querySelector('title') + const link = document.querySelector('link') + test("the padding should be '10px'", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let divTag=document.querySelector(".orange-btn"); - let classTagStyles=window.getComputedStyle(divTag); + ).innerHTML = ``; + let divTag = document.querySelector(".orange-btn"); + let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["padding"]).toBe("10px"); }); - it("the border radius should be '4px'", function () { + test("the border radius should be '4px'", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let divTag=document.querySelector(".orange-btn"); - let classTagStyles=window.getComputedStyle(divTag); + ).innerHTML = ``; + let divTag = document.querySelector(".orange-btn"); + let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["border-radius"]).toBe("4px"); }); - it("the border should be '1px solid #ffffff;'", function () { - document.querySelector( - "head" - - ).innerHTML=``; - let divTag=document.querySelector(".orange-btn"); - let classTagStyles=window.getComputedStyle(divTag); - expect(classTagStyles["border"]).toBe("1px solid #ffffff"); - }); - it("the background should be 'rgb(255, 153, 51)'", function () { + test("the background should be 'orange'", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let divTag=document.querySelector(".orange-btn"); - let classTagStyles=window.getComputedStyle(divTag); + ).innerHTML = ``; + let divTag = document.querySelector(".orange-btn"); + let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["background"]).toBe("orange"); }); - it("the underline should to be removed", function () { + test("the underline should to be removed", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let divTag=document.querySelector(".orange-btn"); - let classTagStyles=window.getComputedStyle(divTag); + ).innerHTML = ``; + let divTag = document.querySelector(".orange-btn"); + let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["text-decoration"]).toBe("none"); }); - it("The mouse hover property should be #cc7a00", function () { + test("The mouse hover property should be 'darkorange'", ()=>{ // get computed styles of any element you like document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector=""; - for (let i=0; i< cssArray.length; i++) { + if (cssArray[i].selectorText === ".orange-btn:hover") { + orangeHoverSelector = cssArray[i].style.background; } } expect(orangeHoverSelector).toBe("darkorange"); }); - it("You should be careful with the specifity", function () { + test("You should be careful with the specifity", ()=>{ document.querySelector( "head" - ).innerHTML=``; - let cssArray=document.styleSheets[0].cssRules[0].selectorText; + ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules[0].selectorText; expect(cssArray).toBe(".orange-btn"); } ) - it("You should not change the existing head tag elements", function () { + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() - - let meta = head.querySelector("meta") - expect(meta).not.toBe(null) - - const pathname = new URL(document.querySelector('link').href).pathname - expect(pathname).toBe('/styles.css') - - let title = head.querySelector('title') - expect(title).not.toBe(null) + + expect(meta).toBeTruthy() + + let href = link.getAttribute('href') + expect(href).toBe('./styles.css') + + expect(title).toBeTruthy() }) }); From 9aa151e07f42bea69f2643c4c16e714e6f141579 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Tue, 16 Aug 2022 21:50:46 +0000 Subject: [PATCH 064/407] Updated typo on readme code --- exercises/06-Practicing-Rules/README.es.md | 2 +- exercises/06-Practicing-Rules/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/06-Practicing-Rules/README.es.md b/exercises/06-Practicing-Rules/README.es.md index c95ae914..ee953a20 100644 --- a/exercises/06-Practicing-Rules/README.es.md +++ b/exercises/06-Practicing-Rules/README.es.md @@ -4,7 +4,7 @@ 1. Establece esta URL como la imagen de fondo de la página y repítela solo verticalmente: `../../.learn/assets/background-vertical.jpg?raw=true` -2. Cambia el tipo de fuente (`font-type`) del `h1` a `Courier` y el resto del sitio web a `Times New Roman`. +2. Cambia el tipo de fuente (`font-family`) del `h1` a `Courier` y el resto del sitio web a `Times New Roman`. 3. Cambia el color del `h1` a rojo(`red`). diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index 64428af4..b8b63bcc 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -8,7 +8,7 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 1. Set this URL as the background image of the page, and repeat it vertically only: `../../.learn/assets/background-vertical.jpg?raw=true` -2. Change the font-type of the `h1` to `Courier` and the rest of the website to `Times new Roman`. +2. Change the font-family of the `h1` to `Courier` and the rest of the website to `Times new Roman`. 3. Change the color of `h1` to `red`. From b40363d69d350ba0ba029d902ed34272ab5e6f0a Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Thu, 18 Aug 2022 21:45:09 +0000 Subject: [PATCH 065/407] learnpack-version --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 7c3ce6f6..5b113e53 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,4 +4,4 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i @learnpack/learnpack -g && learnpack plugins:install learnpack-html@0.0.20 +RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install learnpack-html@0.0.20 From fe11a4f8385706a3745dd05d82ad5cf735eef5a8 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Thu, 18 Aug 2022 22:01:37 +0000 Subject: [PATCH 066/407] learnpack version --- README.md | 2 +- exercises/00-Welcome/README.es.md | 2 +- exercises/00-Welcome/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b127fe6b..3c27ee93 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ -Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](https://twitter.com/alesanchezr) if you have any question. +Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](twitter.com/alesanchezr) if you have any question. ## You'll be learning the following concepts: diff --git a/exercises/00-Welcome/README.es.md b/exercises/00-Welcome/README.es.md index bed6d3a1..b8215e3e 100644 --- a/exercises/00-Welcome/README.es.md +++ b/exercises/00-Welcome/README.es.md @@ -4,7 +4,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # ¡¡Bienvenido a los ejercicios de CSS!! -Mi nombre es Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr) ¡Estoy muy contento de que estén aquí! 🎉 😂 +Mi nombre es Alejandro Sanchez [@alesanchezr](twitter.com/alesanchezr) ¡Estoy muy contento de que estén aquí! 🎉 😂 Aprender a programar es dificil ¡Probablemente necesitarás coaching! Envíame un DM vía Twitter si tienes alguna duda. Durante este curso aprenderás los siguientes conceptos: diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 7ff64cf1..0162723a 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -4,7 +4,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # Welcome to CSS Exercises!! -My name is Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr). I'm really excited to have you here !! 🎉 😂 +My name is Alejandro Sanchez [@alesanchezr](twitter.com/alesanchezr). I'm really excited to have you here !! 🎉 😂 Learning to code is hard, you will problably need coaching! DM me on twitter if you have any question. During this course you will be learning the following concepts: From a478e3f1e4b6e3c944a322b792fc0dccecc0120d Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:18:15 -0400 Subject: [PATCH 067/407] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 5b113e53..2b9caebb 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,4 +4,4 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install learnpack-html@0.0.20 +RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install @learnpack/html From f007d5c3ca3bcc722a394f1f965a3f159ed9c8fe Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:18:45 -0400 Subject: [PATCH 068/407] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c27ee93..b127fe6b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ -Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](twitter.com/alesanchezr) if you have any question. +Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](https://twitter.com/alesanchezr) if you have any question. ## You'll be learning the following concepts: From 0bb32adae0cd2de0fc5ce1e1653ccd39d47f6555 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:19:01 -0400 Subject: [PATCH 069/407] Update README.es.md --- exercises/00-Welcome/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/00-Welcome/README.es.md b/exercises/00-Welcome/README.es.md index b8215e3e..bed6d3a1 100644 --- a/exercises/00-Welcome/README.es.md +++ b/exercises/00-Welcome/README.es.md @@ -4,7 +4,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # ¡¡Bienvenido a los ejercicios de CSS!! -Mi nombre es Alejandro Sanchez [@alesanchezr](twitter.com/alesanchezr) ¡Estoy muy contento de que estén aquí! 🎉 😂 +Mi nombre es Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr) ¡Estoy muy contento de que estén aquí! 🎉 😂 Aprender a programar es dificil ¡Probablemente necesitarás coaching! Envíame un DM vía Twitter si tienes alguna duda. Durante este curso aprenderás los siguientes conceptos: From 8e2b75c082158c547ba38065123a8d8e6a8cc78f Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:19:20 -0400 Subject: [PATCH 070/407] Update README.md --- exercises/00-Welcome/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 0162723a..7ff64cf1 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -4,7 +4,7 @@ intro: "https://www.youtube.com/watch?v=BDKdUPDez-U" # Welcome to CSS Exercises!! -My name is Alejandro Sanchez [@alesanchezr](twitter.com/alesanchezr). I'm really excited to have you here !! 🎉 😂 +My name is Alejandro Sanchez [@alesanchezr](https://twitter.com/alesanchezr). I'm really excited to have you here !! 🎉 😂 Learning to code is hard, you will problably need coaching! DM me on twitter if you have any question. During this course you will be learning the following concepts: From 084b23297c46d8cfe5b3d9e2ebdec4bdad80067c Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 21:44:12 -0400 Subject: [PATCH 071/407] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 2b9caebb..78106952 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,4 +4,4 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install @learnpack/html +RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install @learnpack/html@1.1.1 From bfa48b0a1e8395e093e6bf72004cdf58d95b11d3 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Mon, 22 Aug 2022 21:44:22 -0400 Subject: [PATCH 072/407] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 78106952..e3b99e1b 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,4 +4,4 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i @learnpack/learnpack@2.1.18 -g && learnpack plugins:install @learnpack/html@1.1.1 +RUN npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/html@1.1.1 From 5f9ff744e909b2a16d2980e328279a56c8887a14 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Tue, 23 Aug 2022 11:04:55 -0400 Subject: [PATCH 073/407] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index e3b99e1b..8409faba 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,4 +4,4 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/html@1.1.1 +RUN npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install learnpack-html@0.0.20 From 96d52feddb8795891852c6859ca1e172c5eafd69 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Fri, 26 Aug 2022 18:35:39 +0000 Subject: [PATCH 074/407] learnpack -v --- .github/workflows/learnpack-audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/learnpack-audit.yml b/.github/workflows/learnpack-audit.yml index 70f416ee..52644d89 100644 --- a/.github/workflows/learnpack-audit.yml +++ b/.github/workflows/learnpack-audit.yml @@ -25,5 +25,5 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: npm install learnpack -g + - run: npm install @learnpack/learnpack@latest -g - run: learnpack audit \ No newline at end of file From 91383e52daec0aea06c72edd4694db124f5e8ebc Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Mon, 29 Aug 2022 21:58:24 +0000 Subject: [PATCH 075/407] Some improvements added to the tests --- exercises/01-Hello-World/index.html | 2 +- exercises/01-Hello-World/solution.hide.html | 8 ++++---- exercises/01-Hello-World/test.js | 4 ++++ exercises/01.1-The-Style-Tag/test.js | 4 +++- exercises/01.2-Your-First-Style/tests.js | 4 ++++ exercises/01.3-Your-Second-Style/index.html | 3 +++ exercises/01.3-Your-Second-Style/tests.js | 4 ++++ .../02-Separate-Stylesheet/solution.hide.css | 6 ++---- exercises/02-Separate-Stylesheet/tests.js | 9 +++++---- exercises/02.1-Background/tests.js | 1 + exercises/04.1-Combined-Rules/tests.js | 19 ++++++++++++------- exercises/04.2-Apply-several-classes/test.js | 14 ++++---------- learn.json | 4 ++-- 13 files changed, 49 insertions(+), 33 deletions(-) diff --git a/exercises/01-Hello-World/index.html b/exercises/01-Hello-World/index.html index 03ae0584..93d4ce1c 100644 --- a/exercises/01-Hello-World/index.html +++ b/exercises/01-Hello-World/index.html @@ -1 +1 @@ - \ No newline at end of file + diff --git a/exercises/01-Hello-World/solution.hide.html b/exercises/01-Hello-World/solution.hide.html index ce422661..b2ad5b0e 100644 --- a/exercises/01-Hello-World/solution.hide.html +++ b/exercises/01-Hello-World/solution.hide.html @@ -1,7 +1,7 @@ -Click me to open google.com \ No newline at end of file +Click me to open google.com diff --git a/exercises/01-Hello-World/test.js b/exercises/01-Hello-World/test.js index fca18c3f..fbe19bf5 100644 --- a/exercises/01-Hello-World/test.js +++ b/exercises/01-Hello-World/test.js @@ -10,20 +10,24 @@ const a = document.querySelector("a"); test("There should be an anchor tag", ()=>{ expect(a).toBeTruthy() }) + test("The anchor tag should be pink", ()=>{ let styles = window.getComputedStyle(a); expect(styles["color"]).toBe("pink"); }); + test("There should be a href attribute pointing to 'https://google.com'", ()=>{ let href = a.getAttribute('href'); expect(href).toBeTruthy(); expect(href).toBe("https://google.com"); }) + test("There should be a target attribute pointing to '_blank'", ()=>{ let target = a.getAttribute('target'); expect(target).toBeTruthy(); expect(target).toBe("_blank"); }) + test("The anchor tag should not contains any inline style", ()=>{ let emptyBodyInlineStyle = {}; expect(a.style._values).toEqual(emptyBodyInlineStyle); diff --git a/exercises/01.1-The-Style-Tag/test.js b/exercises/01.1-The-Style-Tag/test.js index bf66dc21..a4be505b 100644 --- a/exercises/01.1-The-Style-Tag/test.js +++ b/exercises/01.1-The-Style-Tag/test.js @@ -8,12 +8,14 @@ jest.dontMock('fs'); const p = document.querySelector("p"); test("There should be a p tag", ()=>{ - expect(p).toBeTruthy() + expect(p).toBeTruthy(); }) + test("The p tag color should be blue", ()=>{ let styles = window.getComputedStyle(p); expect(styles["color"]).toBe("blue"); }); + test("The p tag should not contain any inline style", ()=>{ let emptyBodyInlineStyle = {}; expect(p.style._values).toEqual(emptyBodyInlineStyle); diff --git a/exercises/01.2-Your-First-Style/tests.js b/exercises/01.2-Your-First-Style/tests.js index ddbfad7f..0eabdf65 100644 --- a/exercises/01.2-Your-First-Style/tests.js +++ b/exercises/01.2-Your-First-Style/tests.js @@ -7,19 +7,23 @@ jest.dontMock('fs'); describe("All the styles should be applied", ()=>{ const a = document.querySelector("a"); + test("The anchor tag should be yellow", ()=>{ let styles = window.getComputedStyle(a); expect(styles["color"]).toBe("yellow"); }); + test("The body tag should not contain any inline style", ()=>{ let bodyInlineStyle = document.getElementsByTagName("body"); let emptyBodyInlineStyle = {}; expect(bodyInlineStyle[0].style._values).toEqual(emptyBodyInlineStyle); }); + test("The anchor tag should not contain any inline style", ()=>{ let emptyBodyInlineStyle = {}; expect(a.style._values).toEqual(emptyBodyInlineStyle); }); + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() diff --git a/exercises/01.3-Your-Second-Style/index.html b/exercises/01.3-Your-Second-Style/index.html index 998d973a..03e672a3 100644 --- a/exercises/01.3-Your-Second-Style/index.html +++ b/exercises/01.3-Your-Second-Style/index.html @@ -3,6 +3,9 @@ diff --git a/exercises/01.3-Your-Second-Style/tests.js b/exercises/01.3-Your-Second-Style/tests.js index e7e8ea61..147aabc5 100644 --- a/exercises/01.3-Your-Second-Style/tests.js +++ b/exercises/01.3-Your-Second-Style/tests.js @@ -7,17 +7,21 @@ jest.dontMock('fs'); describe("All the styles should be applied", ()=>{ const body = document.querySelector("body"); + test("The background should be blue", ()=>{ let styles = window.getComputedStyle(body); expect(styles["background"]).toBe("blue"); }); + test("The body tag should not contains any inline style", ()=>{ let emptyBodyInlineStyle = {}; expect(body.style._values).toEqual(emptyBodyInlineStyle); }); + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() + let meta = head.querySelector("meta") expect(meta).toBe(null) }) diff --git a/exercises/02-Separate-Stylesheet/solution.hide.css b/exercises/02-Separate-Stylesheet/solution.hide.css index 779c2c33..5250e305 100644 --- a/exercises/02-Separate-Stylesheet/solution.hide.css +++ b/exercises/02-Separate-Stylesheet/solution.hide.css @@ -2,8 +2,6 @@ 1. Select the body tag. 2. Add the background rule equal to blue. */ - body { +body { background: blue; - background-size: contain; - background-repeat: inherit; -} \ No newline at end of file +} diff --git a/exercises/02-Separate-Stylesheet/tests.js b/exercises/02-Separate-Stylesheet/tests.js index d07034b6..f36df975 100644 --- a/exercises/02-Separate-Stylesheet/tests.js +++ b/exercises/02-Separate-Stylesheet/tests.js @@ -8,14 +8,14 @@ jest.dontMock("fs"); describe("All the styles should be applied", ()=>{ const link = document.querySelector("link"); - const body = document.querySelector("body") + const body = document.querySelector("body"); + test("The body tag should not contains any inline style", ()=>{ - document.querySelector( - "head" - ).innerHTML=``; + document.querySelector("head").innerHTML = ``; let emptyBodyInlineStyle={}; expect(body.style._values).toEqual(emptyBodyInlineStyle) }); + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() @@ -26,6 +26,7 @@ describe("All the styles should be applied", ()=>{ let href = link.getAttribute("href") expect(href).toEqual('./styles.css') }); + test("Your body tag background color should be blue", ()=>{ let styles = window.getComputedStyle(body) expect(styles["background-color"]).toBe("blue") diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js index 375aa45c..b223105f 100644 --- a/exercises/02.1-Background/tests.js +++ b/exercises/02.1-Background/tests.js @@ -36,6 +36,7 @@ describe("All the styles should be applied", ()=>{ let styles = window.getComputedStyle(body); expect(styles["background-repeat"]).toBe("inherit"); }); + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() diff --git a/exercises/04.1-Combined-Rules/tests.js b/exercises/04.1-Combined-Rules/tests.js index d3540732..c6f62acc 100644 --- a/exercises/04.1-Combined-Rules/tests.js +++ b/exercises/04.1-Combined-Rules/tests.js @@ -9,7 +9,8 @@ jest.dontMock("fs"); describe("All the styles should be applied", ()=> { const body = document.querySelector("body"); const link = document.querySelector("link"); - const title = document.querySelector('title') + const title = document.querySelector('title'); + test("The body tag should not contains any inline style", ()=> { document.querySelector( "head" @@ -17,6 +18,7 @@ describe("All the styles should be applied", ()=> { let emptyBodyInlineStyle = {}; expect(body.style._values).toEqual(emptyBodyInlineStyle); }); + test("the width should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( @@ -24,16 +26,17 @@ describe("All the styles should be applied", ()=> { ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - // console.log("$$$:", cssArray) let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === ".myBox") { orangeHoverSelector = cssArray[i].style.width; } } - expect(orangeHoverSelector).toBe('50px'); + expect(orangeHoverSelector).toBe('50px'); }); + test("the height should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( @@ -41,15 +44,15 @@ describe("All the styles should be applied", ()=> { ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - // console.log("$$$:", cssArray) let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === ".myBox") { orangeHoverSelector = cssArray[i].style.height; } } - expect(orangeHoverSelector).toBe('50px'); + expect(orangeHoverSelector).toBe('50px'); }); test("the background-size should be contain", ()=> { @@ -58,22 +61,23 @@ describe("All the styles should be applied", ()=> { ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - // console.log("$$$:", cssArray) let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === ".myBox") { orangeHoverSelector = cssArray[i].style['background-size']; } } + expect(orangeHoverSelector).toBe('contain'); }); + test("the background should include the shorthand property", ()=> { document.querySelector( "head" ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - console.log("$$$:", cssArray) let orangeHoverSelector = ""; let backImg = ""; let backColor = ""; @@ -125,6 +129,7 @@ describe("All the styles should be applied", ()=> { expect(padBottom).toBeFalsy(); expect(padLeft).toBeFalsy(); }); + test("You should not change the existing head tag elements", ()=> { let head = document.querySelector('head') expect(head).toBeTruthy() diff --git a/exercises/04.2-Apply-several-classes/test.js b/exercises/04.2-Apply-several-classes/test.js index 2c6ed0d1..6d1d608e 100644 --- a/exercises/04.2-Apply-several-classes/test.js +++ b/exercises/04.2-Apply-several-classes/test.js @@ -6,19 +6,13 @@ document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); describe("You should change the class on the div tag", () => { - const div = document.querySelectorAll("div") - test("There should only be 1 div tag", () => { - expect(div.length).toBe(1) - }); + const div = document.querySelector("div"); test("The div class should NOT have the spades class", () => { - div.forEach(e=>{ - expect(e.classList.contains("spade")).toBe(false) - }) + expect(div.classList.contains("spade")).toBe(false); }); + test("The div class should have the heart class", () => { - div.forEach(e=>{ - expect(e.classList.contains("heart")).toBe(true) - }) + expect(div.classList.contains("heart")).toBe(true); }); }); diff --git a/learn.json b/learn.json index 709ede73..dc56301e 100644 --- a/learn.json +++ b/learn.json @@ -11,8 +11,8 @@ "difficulty": "easy", "video-solutions": true, "graded": true, - "disabledActions": ["test"], - "disableGrading": true, + "disabledActions": [], + "disableGrading": false, "editor": { "version": "1.0.73" } From 0da679be9a3468d73d8561a5a1f9f44bba223945 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Thu, 1 Sep 2022 17:22:44 -0400 Subject: [PATCH 076/407] Update learn.json --- learn.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/learn.json b/learn.json index 79a3e90a..709ede73 100644 --- a/learn.json +++ b/learn.json @@ -11,9 +11,9 @@ "difficulty": "easy", "video-solutions": true, "graded": true, - "disabledActions": [], - "disableGrading": false, + "disabledActions": ["test"], + "disableGrading": true, "editor": { "version": "1.0.73" } -} \ No newline at end of file +} From 7c58c65296e84fca82607fda95085195f8e27d7e Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Thu, 1 Sep 2022 21:57:15 +0000 Subject: [PATCH 077/407] Some solutions and tests modified --- exercises/04.3-id-Selector/index.html | 2 +- exercises/04.3-id-Selector/test.js | 30 +++++++++------- exercises/05-Specificity/README.es.md | 2 +- exercises/05-Specificity/README.md | 2 +- exercises/05-Specificity/styles.css | 7 ++-- exercises/05-Specificity/tests.js | 12 +++---- exercises/06-Practicing-Rules/index.html | 6 ++-- exercises/06-Practicing-Rules/tests.js | 36 +++++++++----------- exercises/07-Very-Specific-Rules/styles.css | 12 +++++++ exercises/08-Rounded-Image/solution.hide.css | 6 +--- exercises/09-Anchor-Styles/index.html | 2 +- exercises/09-Anchor-Styles/solution.hide.css | 2 +- exercises/10-Your-Own-Font/tests.js | 3 -- exercises/11-Font-Awesome-Icons/tests.js | 2 +- exercises/13-Anchor-Like-Button/tests.js | 11 +++--- learn.json | 4 +-- 16 files changed, 68 insertions(+), 71 deletions(-) diff --git a/exercises/04.3-id-Selector/index.html b/exercises/04.3-id-Selector/index.html index 5b9a773d..a7964559 100644 --- a/exercises/04.3-id-Selector/index.html +++ b/exercises/04.3-id-Selector/index.html @@ -8,6 +8,6 @@ - I should look like a button + I should look like a button diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js index 9277e129..cbae3b3f 100644 --- a/exercises/04.3-id-Selector/test.js +++ b/exercises/04.3-id-Selector/test.js @@ -8,25 +8,29 @@ jest.dontMock('fs'); const span = document.querySelector("span"); const link = document.querySelector("link"); -test("There should be a span tag", ()=>{ +test("There should be a span tag", () => { expect(span).toBeTruthy() -}) -test("The span tag should have id 'button1'", ()=>{ +}); + +test("The span tag should have id 'button1'", () => { + expect(span).toBeTruthy(); let id = span.id - expect(id).toBe('button1') + expect(id).toBe('button1'); }); -test("The span tag should not contain any inline style", ()=>{ + +test("The span tag should not contain any inline style", () => { let emptyBodyInlineStyle = {}; + expect(span).toBeTruthy() expect(span.style._values).toEqual(emptyBodyInlineStyle); }); -test("You should not change the existing head tag elements", ()=>{ - let head = document.querySelector('head') - expect(head).toBeTruthy() +test("You should not change the existing head tag elements", () => { + let head = document.querySelector('head'); + expect(head).toBeTruthy(); - let meta = head.querySelector("meta") - expect(meta).toBe(null) + let meta = head.querySelector("meta"); + expect(meta).toBe(null); - const href = link.getAttribute("href") - expect(href).toBe('./styles.css') - }); \ No newline at end of file + const href = link.getAttribute("href"); + expect(href).toBe('./styles.css'); +}); \ No newline at end of file diff --git a/exercises/05-Specificity/README.es.md b/exercises/05-Specificity/README.es.md index 890c542d..a87b6e2d 100644 --- a/exercises/05-Specificity/README.es.md +++ b/exercises/05-Specificity/README.es.md @@ -9,7 +9,7 @@ Se trata del nivel de especificidad. Si especificas que tu `div` con `id="thirdi ## 📝 Instrucciones: -1. Anula el color de fondo (`background-color`) de `#thirditem` sin eliminar ningún código CSS, simplemente agrega al CSS una regla más específica al final del documento para anular el color de fondo a verde. +1. Anula el color de fondo (`background`) de `#thirditem` sin eliminar ningún código CSS, simplemente agrega al CSS una regla más específica al final del documento para anular el color de fondo a verde. ## 💡 Pista: diff --git a/exercises/05-Specificity/README.md b/exercises/05-Specificity/README.md index bbb243ad..db381074 100644 --- a/exercises/05-Specificity/README.md +++ b/exercises/05-Specificity/README.md @@ -13,7 +13,7 @@ It's all about the level of Specificity. If you specify that your `div` with `id ## 📝 Instrucciones: -1. Override the `background-color` of `#thirditem` without deleting any css code, simply append to the css a more specific rule at the end of the document to override the background-color to green. +1. Override the `background` of `#thirditem` without deleting any css code, simply append to the css a more specific rule at the end of the document to override the background-color to green. ### 💡 Hint: diff --git a/exercises/05-Specificity/styles.css b/exercises/05-Specificity/styles.css index db471c2b..c4e96d25 100644 --- a/exercises/05-Specificity/styles.css +++ b/exercises/05-Specificity/styles.css @@ -1,9 +1,8 @@ -ul li{ +ul li { background: blue; } -#thirditem{ +#thirditem { background: yellow; -} +} /****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ - \ No newline at end of file diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js index 9e6d52d6..a22fab68 100644 --- a/exercises/05-Specificity/tests.js +++ b/exercises/05-Specificity/tests.js @@ -21,17 +21,15 @@ describe("All the styles should be applied", function () { let title = head.querySelector('title') expect(title).not.toBe(null) }) - + test("You should not delete or edit the existing code", function () { + document.querySelector("head").innerHTML = ``; - document.querySelector( - "head" - ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules[0].selectorText; - let cssArrayBackground = document.styleSheets[0].cssRules[0].style.background - console.log("back:", cssArrayBackground) + let cssArrayBackground = document.styleSheets[0].cssRules[0].style.background; let thirdItSelector = document.styleSheets[0].cssRules[1].selectorText; - let thirdItBackground = document.styleSheets[0].cssRules[1].style.background + let thirdItBackground = document.styleSheets[0].cssRules[1].style.background; + expect(thirdItSelector).toBe("#thirditem"); expect(thirdItBackground).toBe("yellow"); expect(cssArray).toBe("ul li"); diff --git a/exercises/06-Practicing-Rules/index.html b/exercises/06-Practicing-Rules/index.html index 4119acb5..db2eb563 100644 --- a/exercises/06-Practicing-Rules/index.html +++ b/exercises/06-Practicing-Rules/index.html @@ -21,9 +21,7 @@

    3 reasons you know you are learning

    3 reasons you know love what you are learning

    • Time passes fast.
    • -
    • - You are anxious to finish this excercise and start the next one. -
    • +
    • You are anxious to finish this excercise and start the next one.
    • Is 12am and you don't want to go to sleep.

    @@ -31,4 +29,4 @@

    3 reasons you know love what you are learning

    click here

    - \ No newline at end of file + diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js index 5c2e9903..9bb32a78 100644 --- a/exercises/06-Practicing-Rules/tests.js +++ b/exercises/06-Practicing-Rules/tests.js @@ -6,12 +6,12 @@ document.documentElement.innerHTML = html.toString(); jest.dontMock('fs'); -describe("All the styles should be applied", ()=> { +describe("All the styles should be applied", () => { let meta = document.querySelector("meta") let link = document.querySelector("link") let title = document.querySelector('title') - test("the background should match", ()=> { + test("the background should match", () => { document.querySelector( "head" ).innerHTML = ``; @@ -21,15 +21,15 @@ describe("All the styles should be applied", ()=> { `url(../../.learn/assets/background-vertical.jpg?raw=true) repeat-y` ); }); - test("the font-family should be 'Times New Roman'", ()=> { + test("the font-family should be 'Times New Roman'", () => { document.querySelector( "head" ).innerHTML = ``; let body = document.querySelector("body"); let styles = window.getComputedStyle(body); - expect(styles["font-family"]).toBe("\"Times New Roman\""); + expect(styles["font-family"].toLowerCase()).toBe("\"times new roman\""); }); - test("the padding-left should be '20px'", ()=> { + test("the padding-left should be '20px'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -37,16 +37,16 @@ describe("All the styles should be applied", ()=> { let styles = window.getComputedStyle(body); expect(styles["padding-left"]).toBe("20px"); }); - test("the font-family in the H1 Tag should be 'Courier'", ()=> { + test("the font-family in the H1 Tag should be 'Courier'", () => { document.querySelector( "head" ).innerHTML = ``; let h1Tag = document.querySelector("h1"); let h1TagStyles = window.getComputedStyle(h1Tag); // get computed styles of any element you like - expect(h1TagStyles["font-family"]).toBe("\"Courier\""); + expect(h1TagStyles["font-family"].toLowerCase()).toBe("\"courier\""); }); - test("the color in the H1 Tag should be 'red'", ()=> { + test("the color in the H1 Tag should be 'red'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -55,7 +55,7 @@ describe("All the styles should be applied", ()=> { // get computed styles of any element you like expect(h1TagStyles["color"]).toBe("red"); }); - test("the text-align in the H1 Tag should be 'center'", ()=> { + test("the text-align in the H1 Tag should be 'center'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -64,7 +64,7 @@ describe("All the styles should be applied", ()=> { // get computed styles of any element you like expect(h1TagStyles["text-align"]).toBe("center"); }); - test("the text-decoration in the H2 Tag should be 'underline'", ()=> { + test("the text-decoration in the H2 Tag should be 'underline'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -73,7 +73,7 @@ describe("All the styles should be applied", ()=> { let h2TagStyles = window.getComputedStyle(h2Tag); expect(h2TagStyles["text-decoration"]).toBe("underline"); }); - test("the padding in the #id1 Tag should be '5px'", ()=> { + test("the padding in the #id1 Tag should be '5px'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -82,40 +82,36 @@ describe("All the styles should be applied", ()=> { let idTagStyles = window.getComputedStyle(idTag); expect(idTagStyles["padding"]).toBe("5px"); }); - test("the background-color in the #id1 Tag should be 'semi transparent white'", ()=> { + test("the background-color in the #id1 Tag should be 'semi transparent white'", () => { document.querySelector( "head" ).innerHTML = ``; // get computed styles of any element you like const idTag = document.querySelector("#id1"); let idTagStyles = window.getComputedStyle(idTag); - console.log("$$$:", idTagStyles) expect(idTagStyles["background-color"]).toBe("rgba(255, 255, 255, 0.2)"); }); - test("The a hover underline should be removed", ()=> { + test("The a hover underline should be removed", () => { document.querySelector( "head" ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - // console.log("$$$:", cssArray) let orangeHoverSelector = ""; for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === "a:hover") { orangeHoverSelector = cssArray[i].style['text-decoration']; - console.log("$$$:", orangeHoverSelector) } } expect(orangeHoverSelector).toBe("none"); }); - test("The a hover color should be green", ()=> { + test("The a hover color should be green", () => { document.querySelector( "head" ).innerHTML = ``; - let cssArray = document.styleSheets[0].cssRules; - console.log("$$$:", cssArray[0]) let orangeHoverSelector = ""; + for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === "a:hover") { orangeHoverSelector = cssArray[i].style.color; @@ -123,7 +119,7 @@ describe("All the styles should be applied", ()=> { } expect(orangeHoverSelector).toBe('green'); }); - test("You should not change the existing head tag elements", ()=> { + test("You should not change the existing head tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index 300d0677..55fb5ff4 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,5 +1,17 @@ /** Insert your code here **/ +ul li { + color: red !important; +} + +ol li:nth-child(2) { + background-color: green; +} + +tr:nth-child(odd) { + background: yellow; +} + /*********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, only add lines of code on top of this lines diff --git a/exercises/08-Rounded-Image/solution.hide.css b/exercises/08-Rounded-Image/solution.hide.css index 56819f66..2ddc0eed 100644 --- a/exercises/08-Rounded-Image/solution.hide.css +++ b/exercises/08-Rounded-Image/solution.hide.css @@ -2,12 +2,8 @@ body { background: #bdbdbd; } .rounded { - border-radius: 100%; - background-image: url("https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/master/.learn/assets/einstein.png?raw=true"); - background-position-x: center; - background-position-y: center; - background-size: contain; object-fit: cover; width: 200px; height: 200px; + border-radius: 100%; } diff --git a/exercises/09-Anchor-Styles/index.html b/exercises/09-Anchor-Styles/index.html index 984ca01e..30e00691 100644 --- a/exercises/09-Anchor-Styles/index.html +++ b/exercises/09-Anchor-Styles/index.html @@ -6,7 +6,7 @@ 09 Anchor Styles - + Click me diff --git a/exercises/09-Anchor-Styles/solution.hide.css b/exercises/09-Anchor-Styles/solution.hide.css index b3e6a36b..101d281c 100644 --- a/exercises/09-Anchor-Styles/solution.hide.css +++ b/exercises/09-Anchor-Styles/solution.hide.css @@ -12,4 +12,4 @@ a.threeDimension:active { /* your code here*/ border-color: #000 #aaa #aaa #000; -} \ No newline at end of file +} diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js index 52e13aa6..e86491c0 100644 --- a/exercises/10-Your-Own-Font/tests.js +++ b/exercises/10-Your-Own-Font/tests.js @@ -17,11 +17,9 @@ describe("All the styles should be applied", ()=>{ // get computed styles of any element you like let cssArray = document.styleSheets[0].cssRules; - // console.log("%%% ", cssArray) let orangeHoverSelector = ""; for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === ".myTitle") { - // console.log("%%% ", cssArray[i].selectorText) orangeHoverSelector = cssArray[i].style['font-family']; } } @@ -35,7 +33,6 @@ describe("All the styles should be applied", ()=>{ }); test("The link should be included in the head tag", ()=>{ // let headContent=document.getElementsByTagName("*") - // console.log("###", headContent[1].innerHTML) expect(link.length).toBe(2); }); diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index f7d8cf6e..2b717fd5 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -20,8 +20,8 @@ describe("All the styles should be applied", ()=>{ expect(document.querySelectorAll("i").length).toBe(3); }); test(" LI innerHTML exist", ()=>{ - const li = document.querySelectorAll("li"); expect(document.querySelector("li")).toBeTruthy(); + const li = document.querySelectorAll("li"); for (let i = 0; i < li.length; i++) { expect(li[i].innerHTML).toBeTruthy(); } diff --git a/exercises/13-Anchor-Like-Button/tests.js b/exercises/13-Anchor-Like-Button/tests.js index fcc69fa4..d93dc049 100644 --- a/exercises/13-Anchor-Like-Button/tests.js +++ b/exercises/13-Anchor-Like-Button/tests.js @@ -6,9 +6,6 @@ document.documentElement.innerHTML = html.toString(); jest.dontMock('fs'); - - - describe("All the styles should be applied", ()=>{ const meta = document.querySelector("meta") const title = document.querySelector('title') @@ -23,7 +20,7 @@ describe("All the styles should be applied", ()=>{ expect(classTagStyles["padding"]).toBe("10px"); }); - test("the border radius should be '4px'", ()=>{ + test("the border radius should be '4px'", ()=>{ document.querySelector( "head" @@ -32,7 +29,7 @@ describe("All the styles should be applied", ()=>{ let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["border-radius"]).toBe("4px"); }); - test("the background should be 'orange'", ()=>{ + test("the background should be 'orange'", ()=>{ document.querySelector( "head" @@ -41,7 +38,7 @@ describe("All the styles should be applied", ()=>{ let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["background"]).toBe("orange"); }); - test("the underline should to be removed", ()=>{ + test("the underline should be removed", ()=>{ document.querySelector( "head" @@ -67,7 +64,7 @@ describe("All the styles should be applied", ()=>{ expect(orangeHoverSelector).toBe("darkorange"); }); - test("You should be careful with the specifity", ()=>{ + test("You should be careful with the specificity", ()=>{ document.querySelector( "head" ).innerHTML = ``; diff --git a/learn.json b/learn.json index 709ede73..dc56301e 100644 --- a/learn.json +++ b/learn.json @@ -11,8 +11,8 @@ "difficulty": "easy", "video-solutions": true, "graded": true, - "disabledActions": ["test"], - "disableGrading": true, + "disabledActions": [], + "disableGrading": false, "editor": { "version": "1.0.73" } From e93d52b08be5ed2969029c1ed463ced88962ed8f Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Fri, 2 Sep 2022 20:05:14 +0000 Subject: [PATCH 078/407] reversed file to original state --- exercises/07-Very-Specific-Rules/styles.css | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index 55fb5ff4..c77b84c2 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,16 +1,5 @@ /** Insert your code here **/ -ul li { - color: red !important; -} - -ol li:nth-child(2) { - background-color: green; -} - -tr:nth-child(odd) { - background: yellow; -} /*********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, From 92519aa558563baaf3db05267151932bd72863b5 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Mon, 5 Sep 2022 23:59:31 +0000 Subject: [PATCH 079/407] Added regex to check for important flag --- exercises/07-Very-Specific-Rules/tests.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 10b24a7e..66a759a2 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -11,19 +11,24 @@ describe("All the styles should be applied", ()=>{ const title = document.querySelector('title') const link = document.querySelector('link') - test("The ul li color has to be red", ()=>{ + test("The ul li color has to be red using !important", ()=>{ document.querySelector( "head" ).innerHTML = ``; + let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector = ""; + let color = "" + for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === "ul li" || cssArray[i].selectorText === "ul > li") { - orangeHoverSelector = cssArray[i].style["color"]; + color = cssArray[i].cssText; } } - expect(orangeHoverSelector).toBe("red"); + let reg = new RegExp(/\s*color:\s*red\s*!important\s*;\s*/gm) + + expect(reg.test(color)).toBeTruthy(); }); + test("The ul second element background should be green", ()=>{ document.querySelector( "head" @@ -39,6 +44,7 @@ describe("All the styles should be applied", ()=>{ } expect(orangeHoverSelector).toBe("green"); }) + test("The odd rows of the table should have yellow background", ()=>{ document.querySelector( "head" @@ -63,8 +69,8 @@ describe("All the styles should be applied", ()=>{ let cssArray = document.styleSheets[0].cssRules[4].selectorText; expect(cssArray).toBe("ul li,\nol li"); expect(cssBody).toBe("body"); - } - ) + }) + test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() @@ -76,4 +82,5 @@ describe("All the styles should be applied", ()=>{ expect(title).toBeTruthy() }) + }); \ No newline at end of file From d560a459118735b1040f52b5a9827ce9ebe4d065 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Tue, 6 Sep 2022 01:14:36 +0000 Subject: [PATCH 080/407] improved exercises --- exercises/08-Rounded-Image/solution.hide.css | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/08-Rounded-Image/solution.hide.css b/exercises/08-Rounded-Image/solution.hide.css index 2ddc0eed..31815f5c 100644 --- a/exercises/08-Rounded-Image/solution.hide.css +++ b/exercises/08-Rounded-Image/solution.hide.css @@ -3,6 +3,7 @@ body { } .rounded { object-fit: cover; + object-position: top; width: 200px; height: 200px; border-radius: 100%; From 854e0162ed69aefa201d6fa8b70644812b01e654 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Tue, 6 Sep 2022 01:15:14 +0000 Subject: [PATCH 081/407] improved instructions and provided additional documentation on object-fit --- exercises/08-Rounded-Image/README.es.md | 4 +++- exercises/08-Rounded-Image/README.md | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/exercises/08-Rounded-Image/README.es.md b/exercises/08-Rounded-Image/README.es.md index 956bcbb7..3e7e4c25 100644 --- a/exercises/08-Rounded-Image/README.es.md +++ b/exercises/08-Rounded-Image/README.es.md @@ -16,6 +16,8 @@ El problema con este enfoque es que solo funciona para imágenes cuadradas... La ## 💡 Pista: -+ Si la imagen es más grande que el `div` y quieres centrarla o enfocarte en una zona en particular puedes utilizar `object-position`. ++ Si la imagen es más grande que su contenedor y quieres centrarla o enfocarte en una zona en particular puedes utilizar `object-position`. + En este articulo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/) + ++ Adicionalmente, puedes [leer la documentación de object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) y [la documentación de object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md index 7fedd48e..7cedf6b1 100644 --- a/exercises/08-Rounded-Image/README.md +++ b/exercises/08-Rounded-Image/README.md @@ -15,7 +15,8 @@ The obvious way create a rounded profile picture is to create an image tag and a ## 💡 Hint: -+ If the image ends up being bigger than the `div` (or with different proportions) you can adjust the `object-position` to choose what part of the image you want to display inside of the circle. ++ If the image ends up being bigger than its container (or with different proportions) you can adjust the `object-position` to choose what part of the image you want to display inside of the circle. + You can also read [this great article about object fit](https://css-tricks.com/on-object-fit-and-object-position/) ++ Additionally you can [read the documentation on object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) and [the documentation on object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) \ No newline at end of file From 3047ec2a1e6dd7ce094b06356701ae615d4e03d9 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Tue, 6 Sep 2022 01:15:53 +0000 Subject: [PATCH 082/407] deleted unnecessary tests, added tests to check for actual solution, and improved code format --- exercises/08-Rounded-Image/tests.js | 94 +++++++++++++---------------- 1 file changed, 43 insertions(+), 51 deletions(-) diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js index c03d1580..adcba6f3 100644 --- a/exercises/08-Rounded-Image/tests.js +++ b/exercises/08-Rounded-Image/tests.js @@ -11,73 +11,65 @@ describe("All the styles should be applied", () => { const title = document.querySelector('title') const link = document.querySelector('link') - test("The tag has to be removed", () => { - document.querySelector( - "head" - ).innerHTML = ``; - expect(document.querySelector("img")).toBeFalsy(); - }); - test("The
    tag should exists", () => { - document.querySelector( - "head" - ).innerHTML = ``; - expect(document.querySelector("div")).toBeTruthy(); - }); - test("the width in the div Tag should be '200px'", () => { - // get computed styles of any element you like - document.querySelector( - "head" - ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["width"]).toBe("200px"); - }); - test("the height in the div Tag should be '200px'", () => { - // get computed styles of any element you like - document.querySelector( - "head" - ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["height"]).toBe("200px"); - }); - test("the border radius in the div Tag should be '100%'", () => { - // get computed styles of any element you like + const img = document.querySelector(".rounded") + + test("the img tag should exist", () => { + expect(img).toBeTruthy(); + }) + + test("the width in the img Tag should be equal to its height and vice versa", () => { document.querySelector( "head" ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["border-radius"]).toBe("100%"); + + let cssArray = document.styleSheets[0].cssRules; + + let width = ""; + let height = ""; + + for (let i = 0; i < cssArray.length; i++) { + if (cssArray[i].selectorText === ".rounded") { + width = cssArray[i].style["width"]; + height = cssArray[i].style["height"]; + } + } + + // checks if styles return empty string "" or undefined + expect(width).toBeTruthy(); + expect(height).toBeTruthy(); + + expect(width).toBe(height); + expect(height).toBe(width); }); - test("the background position x in the div Tag should be 'center'", () => { - // get computed styles of any element you like + + test("the border radius of the img Tag should be '100%'", () => { document.querySelector( "head" ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["background-position-x"]).toBe("center"); + + let imgStyle = window.getComputedStyle(img); + expect(imgStyle["border-radius"]).toBe("100%"); }); - test("the background position y in the div Tag should be 'center'", () => { - // get computed styles of any element you like + + test("the object-fit value of the img Tag should be 'cover'", () => { document.querySelector( "head" ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["background-position-y"]).toBe("center"); + + let imgStyle = window.getComputedStyle(img); + expect(imgStyle["object-fit"]).toBe("cover"); }); - test("the background image in the div Tag should exists", () => { - // get computed styles of any element you like + + test("the object-position value of the img Tag should be 'top'", () => { document.querySelector( "head" ).innerHTML = ``; - const divTag = document.querySelector("div"); - let idTagStyles = window.getComputedStyle(divTag); - expect(idTagStyles["background-image"]).toBeTruthy(); + + let imgStyle = window.getComputedStyle(img); + expect(imgStyle["object-position"]).toBe("top"); }); - test("You should not change the existing head tag elements", ()=>{ + + test("You should not change the existing head tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() From 90e52397a48ad3572739790a95bf7b49d6b5c9aa Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Mon, 12 Sep 2022 21:33:26 +0000 Subject: [PATCH 083/407] Some details added to the tests --- exercises/04.3-id-Selector/index.html | 2 +- exercises/04.3-id-Selector/test.js | 1 + exercises/06-Practicing-Rules/README.es.md | 6 +-- exercises/06-Practicing-Rules/README.md | 6 +-- exercises/06-Practicing-Rules/index.html | 42 ++++++++++--------- .../06-Practicing-Rules/solution.hide.css | 1 - exercises/06-Practicing-Rules/styles.css | 2 +- exercises/06-Practicing-Rules/tests.js | 19 +-------- .../07-Very-Specific-Rules/solution.hide.css | 4 +- exercises/07-Very-Specific-Rules/styles.css | 1 + exercises/07-Very-Specific-Rules/tests.js | 2 +- exercises/08-Rounded-Image/tests.js | 9 ---- exercises/12-Relative-Length-EM-REM/tests.js | 17 -------- exercises/13-Anchor-Like-Button/tests.js | 25 ----------- 14 files changed, 37 insertions(+), 100 deletions(-) diff --git a/exercises/04.3-id-Selector/index.html b/exercises/04.3-id-Selector/index.html index a7964559..5b9a773d 100644 --- a/exercises/04.3-id-Selector/index.html +++ b/exercises/04.3-id-Selector/index.html @@ -8,6 +8,6 @@ - I should look like a button + I should look like a button diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js index cbae3b3f..f9ea69cc 100644 --- a/exercises/04.3-id-Selector/test.js +++ b/exercises/04.3-id-Selector/test.js @@ -15,6 +15,7 @@ test("There should be a span tag", () => { test("The span tag should have id 'button1'", () => { expect(span).toBeTruthy(); let id = span.id + expect(id).toBeTruthy(); expect(id).toBe('button1'); }); diff --git a/exercises/06-Practicing-Rules/README.es.md b/exercises/06-Practicing-Rules/README.es.md index ee953a20..9cf27efa 100644 --- a/exercises/06-Practicing-Rules/README.es.md +++ b/exercises/06-Practicing-Rules/README.es.md @@ -10,11 +10,11 @@ 4. Haz todos los `h2` tengan subrayado. -5. Centra el `h1`. +5. Agrega un `left padding` a todo el documento de `20px` para que sea más fácil de leer. -6. Agrega un `left padding` a todo el documento de `20px` para que sea más fácil de leer. +6. Agrega un fondo blanco semitransparente (`semi-transparent background 0.2`) al primer párrafo de "3 reasons you know you are learning" para que sea más fácil de leer (tienes que usar `rgba` para esto). -7. Agrega un fondo blanco semitransparente (`semi-transparent background 0.2`) al primer párrafo de "3 reasons you know you are learning" para que sea más fácil de leer (tienes que usar `rgba` para esto), y luego aplica un `padding` de `5px` a todos los lados de ese párrafo. +7. Luego aplica un `padding` de `5px` a todos los lados de ese párrafo. 8. Cambia el color del `anchor` "hover" a verde (`green`) y elimina el subrayado (tienes que colocar el anchor para probarlo). diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index b8b63bcc..1f418bfc 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -14,11 +14,11 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 4. Make all the `h2's` with an `underline`. -5. Center the `h1` to the middle. +5. Add a `left padding` to the whole document of `20px` to make it easier to read. -6. Add a `left padding` to the whole document of `20px` to make it easier to read. +6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have tu use `rgba` for that) and write down "3 reasons you know you are learning". -7. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have tu use `rgba` for that) and write down "3 reasons you know you are learning". Then apply a `padding` of `5px` to all sides of that paragraph. +7. Then apply a `padding` of `5px` to all sides of that paragraph. 8. Change the `anchor` "hover" color to `green` and remove the underline (you have to actually hover the anchor to test it). diff --git a/exercises/06-Practicing-Rules/index.html b/exercises/06-Practicing-Rules/index.html index db2eb563..2651f781 100644 --- a/exercises/06-Practicing-Rules/index.html +++ b/exercises/06-Practicing-Rules/index.html @@ -8,25 +8,27 @@ -

    The learning essay

    -

    3 reasons you know you are learning

    -

    - We are going to explain in this pharagraph the 3 most comon signs that you should look into yourself to recognize if you are learning. -

    -
      -
    1. You are able to complete the exercises by yourself.
    2. -
    3. You understand what the teacher is talking about
    4. -
    5. Your are able to have conversations about the topic
    6. -
    -

    3 reasons you know love what you are learning

    -
      -
    • Time passes fast.
    • -
    • You are anxious to finish this excercise and start the next one.
    • -
    • Is 12am and you don't want to go to sleep.
    • -
    -

    - If you can't sleep, what better than watching videos of cats? - click here -

    +
    +

    The learning essay

    +

    3 reasons you know you are learning

    +

    + We are going to explain in this pharagraph the 3 most comon signs that you should look into yourself to recognize if you are learning. +

    +
      +
    1. You are able to complete the exercises by yourself.
    2. +
    3. You understand what the teacher is talking about
    4. +
    5. Your are able to have conversations about the topic
    6. +
    +

    3 reasons you know love what you are learning

    +
      +
    • Time passes fast.
    • +
    • You are anxious to finish this excercise and start the next one.
    • +
    • Is 12am and you don't want to go to sleep.
    • +
    +

    + If you can't sleep, what better than watching videos of cats? + click here +

    +
    diff --git a/exercises/06-Practicing-Rules/solution.hide.css b/exercises/06-Practicing-Rules/solution.hide.css index d1e24e3c..4026152e 100644 --- a/exercises/06-Practicing-Rules/solution.hide.css +++ b/exercises/06-Practicing-Rules/solution.hide.css @@ -13,7 +13,6 @@ body { h1 { font-family: "Courier"; color: red; - text-align: center; } h2 { diff --git a/exercises/06-Practicing-Rules/styles.css b/exercises/06-Practicing-Rules/styles.css index d89b1a47..9a7fae86 100644 --- a/exercises/06-Practicing-Rules/styles.css +++ b/exercises/06-Practicing-Rules/styles.css @@ -1 +1 @@ -/* add your styles here */ \ No newline at end of file +/* add your styles here */ diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js index 9bb32a78..a348b847 100644 --- a/exercises/06-Practicing-Rules/tests.js +++ b/exercises/06-Practicing-Rules/tests.js @@ -55,15 +55,6 @@ describe("All the styles should be applied", () => { // get computed styles of any element you like expect(h1TagStyles["color"]).toBe("red"); }); - test("the text-align in the H1 Tag should be 'center'", () => { - document.querySelector( - "head" - ).innerHTML = ``; - let h1Tag = document.querySelector("h1"); - let h1TagStyles = window.getComputedStyle(h1Tag); - // get computed styles of any element you like - expect(h1TagStyles["text-align"]).toBe("center"); - }); test("the text-decoration in the H2 Tag should be 'underline'", () => { document.querySelector( "head" @@ -82,15 +73,7 @@ describe("All the styles should be applied", () => { let idTagStyles = window.getComputedStyle(idTag); expect(idTagStyles["padding"]).toBe("5px"); }); - test("the background-color in the #id1 Tag should be 'semi transparent white'", () => { - document.querySelector( - "head" - ).innerHTML = ``; - // get computed styles of any element you like - const idTag = document.querySelector("#id1"); - let idTagStyles = window.getComputedStyle(idTag); - expect(idTagStyles["background-color"]).toBe("rgba(255, 255, 255, 0.2)"); - }); + test("The a hover underline should be removed", () => { document.querySelector( "head" diff --git a/exercises/07-Very-Specific-Rules/solution.hide.css b/exercises/07-Very-Specific-Rules/solution.hide.css index eb60fcfa..55fb5ff4 100644 --- a/exercises/07-Very-Specific-Rules/solution.hide.css +++ b/exercises/07-Very-Specific-Rules/solution.hide.css @@ -1,6 +1,7 @@ /** Insert your code here **/ + ul li { - color: red; + color: red !important; } ol li:nth-child(2) { @@ -10,6 +11,7 @@ ol li:nth-child(2) { tr:nth-child(odd) { background: yellow; } + /*********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, only add lines of code on top of this lines diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index c77b84c2..06ec4a71 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,6 +1,7 @@ /** Insert your code here **/ + /*********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, only add lines of code on top of this lines diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 66a759a2..26cd5978 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -24,7 +24,7 @@ describe("All the styles should be applied", ()=>{ color = cssArray[i].cssText; } } - let reg = new RegExp(/\s*color:\s*red\s*!important\s*;\s*/gm) + let reg = new RegExp(/color:\s*red\s*!important\s*;/gm) expect(reg.test(color)).toBeTruthy(); }); diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js index adcba6f3..70c5b643 100644 --- a/exercises/08-Rounded-Image/tests.js +++ b/exercises/08-Rounded-Image/tests.js @@ -42,15 +42,6 @@ describe("All the styles should be applied", () => { expect(height).toBe(width); }); - test("the border radius of the img Tag should be '100%'", () => { - document.querySelector( - "head" - ).innerHTML = ``; - - let imgStyle = window.getComputedStyle(img); - expect(imgStyle["border-radius"]).toBe("100%"); - }); - test("the object-fit value of the img Tag should be 'cover'", () => { document.querySelector( "head" diff --git a/exercises/12-Relative-Length-EM-REM/tests.js b/exercises/12-Relative-Length-EM-REM/tests.js index 2752a78d..f6987b7a 100644 --- a/exercises/12-Relative-Length-EM-REM/tests.js +++ b/exercises/12-Relative-Length-EM-REM/tests.js @@ -28,23 +28,6 @@ describe("All the styles should be applied", ()=>{ var styles = window.getComputedStyle(h3Tag); expect(styles["font-size"]).toBe("0.8rem"); }); - test("You should add your rules below the existing code", ()=>{ - document.querySelector( - "head" - ).innerHTML = ``; - let cssArray = document.styleSheets[0].cssRules[0].selectorText; - - expect(cssArray).toBe("#my-first-div"); - } - ) - test("You should add your rules below the existing code", ()=>{ - document.querySelector( - "head" - ).innerHTML = ``; - let cssArray = document.styleSheets[0].cssRules[1].selectorText; - expect(cssArray).toBe("#the-second-one"); - } - ) test("You should not change the existing head tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() diff --git a/exercises/13-Anchor-Like-Button/tests.js b/exercises/13-Anchor-Like-Button/tests.js index d93dc049..587b95d7 100644 --- a/exercises/13-Anchor-Like-Button/tests.js +++ b/exercises/13-Anchor-Like-Button/tests.js @@ -29,15 +29,6 @@ describe("All the styles should be applied", ()=>{ let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["border-radius"]).toBe("4px"); }); - test("the background should be 'orange'", ()=>{ - document.querySelector( - "head" - - ).innerHTML = ``; - let divTag = document.querySelector(".orange-btn"); - let classTagStyles = window.getComputedStyle(divTag); - expect(classTagStyles["background"]).toBe("orange"); - }); test("the underline should be removed", ()=>{ document.querySelector( "head" @@ -47,22 +38,6 @@ describe("All the styles should be applied", ()=>{ let classTagStyles = window.getComputedStyle(divTag); expect(classTagStyles["text-decoration"]).toBe("none"); }); - test("The mouse hover property should be 'darkorange'", ()=>{ - // get computed styles of any element you like - document.querySelector( - "head" - ).innerHTML = ``; - let cssArray = document.styleSheets[0].cssRules; - - let orangeHoverSelector = ""; - for (let i = 0; i < cssArray.length; i++) { - if (cssArray[i].selectorText === ".orange-btn:hover") { - orangeHoverSelector = cssArray[i].style.background; - } - } - - expect(orangeHoverSelector).toBe("darkorange"); - }); test("You should be careful with the specificity", ()=>{ document.querySelector( From 7e82f9b4c71350a702339f04c555f38e25f5ae71 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Thu, 22 Sep 2022 15:35:58 +0000 Subject: [PATCH 084/407] stiles to styles --- exercises/04.3-id-Selector/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.3-id-Selector/README.md b/exercises/04.3-id-Selector/README.md index c079f936..061ec46b 100644 --- a/exercises/04.3-id-Selector/README.md +++ b/exercises/04.3-id-Selector/README.md @@ -4,7 +4,7 @@ tutorial: "https://www.youtube.com/watch?v=9906LCSQJ8M" # `04.3` The ID CSS Selector -You can also select an element by `#id` and apply stiles to it. +You can also select an element by `#id` and apply styles to it. ## The `#id` selector From a6caa74d0d897bec73ce11169950078d2bf239d5 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Wed, 28 Sep 2022 16:57:20 +0000 Subject: [PATCH 085/407] deleted solution in index.html --- .learn/resets/01.3-Your-Second-Style/index.html | 14 ++++++++++++++ exercises/01.3-Your-Second-Style/index.html | 3 --- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .learn/resets/01.3-Your-Second-Style/index.html diff --git a/.learn/resets/01.3-Your-Second-Style/index.html b/.learn/resets/01.3-Your-Second-Style/index.html new file mode 100644 index 00000000..03e672a3 --- /dev/null +++ b/.learn/resets/01.3-Your-Second-Style/index.html @@ -0,0 +1,14 @@ + + + + + + + Hello! My background should be blue! + + diff --git a/exercises/01.3-Your-Second-Style/index.html b/exercises/01.3-Your-Second-Style/index.html index 03e672a3..998d973a 100644 --- a/exercises/01.3-Your-Second-Style/index.html +++ b/exercises/01.3-Your-Second-Style/index.html @@ -3,9 +3,6 @@ From 2819a9d8fb33875533866b42ed300ec04a17549c Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Wed, 28 Sep 2022 16:57:48 +0000 Subject: [PATCH 086/407] deleted solution in index.html --- .learn/resets/01.3-Your-Second-Style/index.html | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .learn/resets/01.3-Your-Second-Style/index.html diff --git a/.learn/resets/01.3-Your-Second-Style/index.html b/.learn/resets/01.3-Your-Second-Style/index.html deleted file mode 100644 index 03e672a3..00000000 --- a/.learn/resets/01.3-Your-Second-Style/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Hello! My background should be blue! - - From 41e04edc2be2deebad3b6abdff135473b09176c0 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Wed, 28 Sep 2022 21:28:44 +0000 Subject: [PATCH 087/407] flexible results --- exercises/10-Your-Own-Font/index.html | 2 -- exercises/10-Your-Own-Font/solution.hide.css | 2 +- exercises/10-Your-Own-Font/solution.hide.html | 30 ++++++++++--------- exercises/10-Your-Own-Font/styles.css | 1 - exercises/10-Your-Own-Font/tests.js | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/exercises/10-Your-Own-Font/index.html b/exercises/10-Your-Own-Font/index.html index 7ca11a24..b4005187 100644 --- a/exercises/10-Your-Own-Font/index.html +++ b/exercises/10-Your-Own-Font/index.html @@ -3,8 +3,6 @@ - - diff --git a/exercises/10-Your-Own-Font/solution.hide.css b/exercises/10-Your-Own-Font/solution.hide.css index 371e026b..e36ebf08 100644 --- a/exercises/10-Your-Own-Font/solution.hide.css +++ b/exercises/10-Your-Own-Font/solution.hide.css @@ -1,4 +1,4 @@ .myTitle { /*your code here*/ - font-family: 'Roboto'; /*Varies depending on the font you chose*/ + font-family: "Roboto"; /*Varies depending on the font you chose*/ } diff --git a/exercises/10-Your-Own-Font/solution.hide.html b/exercises/10-Your-Own-Font/solution.hide.html index 32040ed7..d1547a63 100644 --- a/exercises/10-Your-Own-Font/solution.hide.html +++ b/exercises/10-Your-Own-Font/solution.hide.html @@ -1,17 +1,19 @@ - - - - - - + + + + + + + - 10 Your Own Font - - -

    My unique font

    - - \ No newline at end of file + 10 Your Own Font + + +

    My unique font

    + + diff --git a/exercises/10-Your-Own-Font/styles.css b/exercises/10-Your-Own-Font/styles.css index a8694c16..0335a322 100644 --- a/exercises/10-Your-Own-Font/styles.css +++ b/exercises/10-Your-Own-Font/styles.css @@ -1,4 +1,3 @@ .myTitle { /* Add your code below this line */ - } diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js index e86491c0..646f7192 100644 --- a/exercises/10-Your-Own-Font/tests.js +++ b/exercises/10-Your-Own-Font/tests.js @@ -33,7 +33,7 @@ describe("All the styles should be applied", ()=>{ }); test("The link should be included in the head tag", ()=>{ // let headContent=document.getElementsByTagName("*") - expect(link.length).toBe(2); + expect(link.length).toBeGreaterThanOrEqual(2); }); From 7ff4e7653d4bfcc6bb4613519e0ef5d1781f5e4c Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Thu, 29 Sep 2022 21:48:53 +0000 Subject: [PATCH 088/407] flexible tests --- exercises/07-Very-Specific-Rules/README.es.md | 2 +- exercises/07-Very-Specific-Rules/README.md | 2 +- exercises/07-Very-Specific-Rules/styles.css | 4 +--- exercises/07-Very-Specific-Rules/tests.js | 18 +++++++++++------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/README.es.md b/exercises/07-Very-Specific-Rules/README.es.md index b6295156..4ca537e5 100644 --- a/exercises/07-Very-Specific-Rules/README.es.md +++ b/exercises/07-Very-Specific-Rules/README.es.md @@ -8,7 +8,7 @@ En este ejercicio, puedes agregar tu código solo arriba del **READ ONLY BLOCK** 1. Establece el color de texto `ul` a rojo (`red`) (anula los conflictos siendo más específico). -2. Establece el color de fondo (`background-color`) del segundo `li` del `ol` a verde (`green`) (no uses el selector #id). +2. Establece el color de fondo (`background-color`) del segundo `li` del `ol` a verde (`green`) (no uses el selector #id ni el .class). 3. Haz que las filas impares de las tablas tengan fondo amarillo usando `tr:nth-child`. diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index f0c39817..1f7cdef0 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -13,7 +13,7 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th 1. Set the `ul` text color to `red` (override conflicts with specificity). -2. Set the `background-color` of the second `li` of the `ol` to `green` (don't use the #id selector). +2. Set the `background-color` of the second `li` of the `ol` to `green` (don't use the #id selector or .class selector). 3. Change the odd rows of the tables to a yellow background using `tr:nth-child`. diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index 06ec4a71..a754799f 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,7 +1,5 @@ /** Insert your code here **/ - - /*********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, only add lines of code on top of this lines @@ -14,4 +12,4 @@ body { ul li, ol li { color: green; -} +} \ No newline at end of file diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 26cd5978..403d12b6 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -35,14 +35,16 @@ describe("All the styles should be applied", ()=>{ ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector = ""; + let background = ""; + let backgroundColor=""; for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === "ol li:nth-child(2)" || cssArray[i].selectorText === "ol > li:nth-child(2)") { - orangeHoverSelector = cssArray[i].style['background-color']; + background = cssArray[i].style['background']; + backgroundColor = cssArray[i].style['background-color']; } - } expect(orangeHoverSelector).toBe("green"); + } expect(background === 'green' || backgroundColor === 'green').toBeTruthy(); }) test("The odd rows of the table should have yellow background", ()=>{ @@ -51,14 +53,16 @@ describe("All the styles should be applied", ()=>{ ).innerHTML = ``; let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector = ""; + let background = ""; + let backgroundColor = ""; for (let i = 0; i < cssArray.length; i++) { if (cssArray[i].selectorText === "tr:nth-child(odd)") { - orangeHoverSelector = cssArray[i].style['background']; - + background = cssArray[i].style['background']; + backgroundColor = cssArray[i].style['background-color']; + } - } expect(orangeHoverSelector).toBe("yellow"); + } expect(background === "yellow" || backgroundColor === "yellow").toBeTruthy(); }) test("Write all your rules above the existing code", ()=>{ From 1c4067c86b9af257d433de6a80b0a4b7af430fe5 Mon Sep 17 00:00:00 2001 From: minervaDutta Date: Thu, 29 Sep 2022 17:46:57 -0700 Subject: [PATCH 089/407] spacing correction changed space on line 93 for better readability. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd220aea..65c45e19 100644 --- a/README.md +++ b/README.md @@ -90,4 +90,4 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds 3. [Daniel Machota (@d4rkm0nst3r)](https://github.com/d4rkm0nst3r), contribution: (build-tutorial) ✅, Translation 🌍 -This project follows the[all-contributors](https://github.com/kentcdodds/all-contributors) specification.Contributions of any kind are welcome! +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.Contributions of any kind are welcome! From c04e03c66fd8ff142f5b3354e58a9c145e00f905 Mon Sep 17 00:00:00 2001 From: minervaDutta Date: Thu, 29 Sep 2022 17:47:43 -0700 Subject: [PATCH 090/407] spacing correction 2 added another space for better readability --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65c45e19..e5bc2c4f 100644 --- a/README.md +++ b/README.md @@ -90,4 +90,4 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds 3. [Daniel Machota (@d4rkm0nst3r)](https://github.com/d4rkm0nst3r), contribution: (build-tutorial) ✅, Translation 🌍 -This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.Contributions of any kind are welcome! +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome! From c3a598b4d33a555b44b87454219a28de04ebc274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=96kiddopro?= Date: Fri, 7 Oct 2022 22:48:39 -0300 Subject: [PATCH 091/407] properties --- learn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/learn.json b/learn.json index dc56301e..d0cec84c 100644 --- a/learn.json +++ b/learn.json @@ -10,6 +10,7 @@ "duration": 8, "difficulty": "easy", "video-solutions": true, + "bugs-link": "https://github.com/learnpack/learnpack/issues/new", "graded": true, "disabledActions": [], "disableGrading": false, From bf167ee3d2df4a5c81f90d411ae4c6930958c3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Su=C3=A1rez?= <82285542+kiddopro@users.noreply.github.com> Date: Tue, 11 Oct 2022 22:37:33 -0300 Subject: [PATCH 092/407] camelCase --- learn.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/learn.json b/learn.json index d0cec84c..d73f7688 100644 --- a/learn.json +++ b/learn.json @@ -9,8 +9,8 @@ "description": "Learn CSS with an interactive and auto-graded tutorial with dozens of exercises.", "duration": 8, "difficulty": "easy", - "video-solutions": true, - "bugs-link": "https://github.com/learnpack/learnpack/issues/new", + "videoSolutions": true, + "bugsLink": "https://github.com/learnpack/learnpack/issues/new", "graded": true, "disabledActions": [], "disableGrading": false, From 0db089dc1d4aca4aeb0953bf71c1ed191d6a08c5 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Tue, 18 Oct 2022 21:28:24 +0000 Subject: [PATCH 093/407] changed readme,improved test --- exercises/07-Very-Specific-Rules/README.md | 3 +++ exercises/07-Very-Specific-Rules/styles.css | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index 1f7cdef0..07e4c1ea 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -22,3 +22,6 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th +## :bulb: Hint: + +1. the !important attribute helps to override over other attributes \ No newline at end of file diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index a754799f..300d0677 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -12,4 +12,4 @@ body { ul li, ol li { color: green; -} \ No newline at end of file +} From 321c648e1ace15ad4a9dfe6b10783348e8f4442a Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 20 Oct 2022 21:10:58 +0000 Subject: [PATCH 094/407] made last test more flexible to accept any font-awesome class --- exercises/11-Font-Awesome-Icons/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 2b717fd5..191bdbcf 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -26,13 +26,13 @@ describe("All the styles should be applied", ()=>{ expect(li[i].innerHTML).toBeTruthy(); } }); - test('the i tag should have a class "fas"', ()=>{ + test('the i tag(s) should have Font Awesome class(es) starting with "fa" | ex. "fa-solid"', ()=>{ //or use query selector to compare hoy mane scriptags do we have expect(icons).toBeTruthy(); icons.forEach(icon=>{ - let hasFas = icon.classList.contains("fas") - expect(hasFas).toBe(true); + let hasFa = icon.classList.contains("fa-") + expect(hasFa).toBeTruthy(); }) }); }); From f350b6cd955b9baeacc8972b41e7beec3d705c0e Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 20 Oct 2022 21:18:31 +0000 Subject: [PATCH 095/407] test fixed --- exercises/11-Font-Awesome-Icons/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 191bdbcf..075d2f0e 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -31,7 +31,7 @@ describe("All the styles should be applied", ()=>{ expect(icons).toBeTruthy(); icons.forEach(icon=>{ - let hasFa = icon.classList.contains("fa-") + let hasFa = icon.classList.toString().includes("fa-") expect(hasFa).toBeTruthy(); }) }); From b7e8fd3ee2b905ad6fb56d3acf7fb689ea0bcc63 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:15:32 -0400 Subject: [PATCH 096/407] Update README.md --- exercises/07-Very-Specific-Rules/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index 07e4c1ea..ac622518 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -20,8 +20,6 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th ![Example Image](../../.learn/assets/07-1.png?raw=true) - - ## :bulb: Hint: -1. the !important attribute helps to override over other attributes \ No newline at end of file +1. the !important attribute helps to override over other attributes From de455f1344a14d1044c0ce761eea778585eadc87 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Wed, 26 Oct 2022 17:22:15 +0000 Subject: [PATCH 097/407] Hint added to the 7th exercise --- exercises/07-Very-Specific-Rules/README.es.md | 3 ++- exercises/07-Very-Specific-Rules/README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/README.es.md b/exercises/07-Very-Specific-Rules/README.es.md index 4ca537e5..accf8d55 100644 --- a/exercises/07-Very-Specific-Rules/README.es.md +++ b/exercises/07-Very-Specific-Rules/README.es.md @@ -15,5 +15,6 @@ En este ejercicio, puedes agregar tu código solo arriba del **READ ONLY BLOCK** ![Example Image](../../.learn/assets/07-1.png?raw=true) +## :bulb: Pista: - +1. El atributo `!important` ayuda a sobreescribir stilos. \ No newline at end of file diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index ac622518..3fb8ba40 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -22,4 +22,4 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th ## :bulb: Hint: -1. the !important attribute helps to override over other attributes +1. The `!important` attribute helps to override over other attributes. From 705e15a28eb2a7b2acdbb23c0e15d3e61c947a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Su=C3=A1rez?= <82285542+kiddopro@users.noreply.github.com> Date: Sat, 5 Nov 2022 21:06:42 -0300 Subject: [PATCH 098/407] properties --- learn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/learn.json b/learn.json index d73f7688..6caa33b1 100644 --- a/learn.json +++ b/learn.json @@ -11,6 +11,7 @@ "difficulty": "easy", "videoSolutions": true, "bugsLink": "https://github.com/learnpack/learnpack/issues/new", + "projectType": "tutorial", "graded": true, "disabledActions": [], "disableGrading": false, From 2b67acaed20799b9a2f66af8dcfe2088bf8473df Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Mon, 21 Nov 2022 20:34:35 +0000 Subject: [PATCH 099/407] your-second-style --- .learn/resets/01.3-Your-Second-Style/index.html | 11 +++++++++++ exercises/01.3-Your-Second-Style/README.es.md | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .learn/resets/01.3-Your-Second-Style/index.html diff --git a/.learn/resets/01.3-Your-Second-Style/index.html b/.learn/resets/01.3-Your-Second-Style/index.html new file mode 100644 index 00000000..998d973a --- /dev/null +++ b/.learn/resets/01.3-Your-Second-Style/index.html @@ -0,0 +1,11 @@ + + + + + + + Hello! My background should be blue! + + diff --git a/exercises/01.3-Your-Second-Style/README.es.md b/exercises/01.3-Your-Second-Style/README.es.md index f36f13d4..267c8149 100644 --- a/exercises/01.3-Your-Second-Style/README.es.md +++ b/exercises/01.3-Your-Second-Style/README.es.md @@ -1,8 +1,8 @@ -# `01.2` Tu Segundo Estilo +# `01.3` Tu Segundo Estilo Cuando usas CSS, la idea es aplicar `reglas css` a tus `elementos html`, siempre debes seleccionar primero el elemento y luego especificar qué reglas deseas aplicarle: -Por ejemplo, este es el código si quiero que todos las anchors de mi sitio web (etiquetas ``) sean azules: +Por ejemplo, este es el código si quiero que todos las anchors de mi sitio web (`etiquetas `) sean azules: ```css a { From 18e1530bbe8ef17c8aa446e9091e3fcdd6add621 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Mon, 21 Nov 2022 20:39:14 +0000 Subject: [PATCH 100/407] your-second-style --- .learn/resets/01.3-Your-Second-Style/index.html | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .learn/resets/01.3-Your-Second-Style/index.html diff --git a/.learn/resets/01.3-Your-Second-Style/index.html b/.learn/resets/01.3-Your-Second-Style/index.html deleted file mode 100644 index 998d973a..00000000 --- a/.learn/resets/01.3-Your-Second-Style/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - Hello! My background should be blue! - - From 0823f86b5b4585493d98767e16afaae404c2eb20 Mon Sep 17 00:00:00 2001 From: SheepDogg586 <109840369+SheepDogg586@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:19:29 -0500 Subject: [PATCH 101/407] Update README.md Added periods to the end of lines 78 and 79. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5bc2c4f..732a3825 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ Note: The exercises have automatic grading but its very rigid and strict, my rec Each exercise is a small react application containing the following files: -1. **index.html:** all websites and exercises start from the index.html -2. **styles.css:** your CSS code goes here, some exercises will make you update this file +1. **index.html:** all websites and exercises start from the index.html. +2. **styles.css:** your CSS code goes here, some exercises will make you update this file. 3. **README.md:** contains exercise instructions. 4. **test.js:** you don't have to open this file, it contains the testing script for the exercise. From 6fc2535f9b8d0dfc1f8db28c51ecd36d84e5785f Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:55:31 -0400 Subject: [PATCH 102/407] Update README.md --- exercises/06-Practicing-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index 1f418bfc..6fc519c0 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -16,7 +16,7 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 5. Add a `left padding` to the whole document of `20px` to make it easier to read. -6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have tu use `rgba` for that) and write down "3 reasons you know you are learning". +6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have to use `rgba` for that) and write down "3 reasons you know you are learning". 7. Then apply a `padding` of `5px` to all sides of that paragraph. From b56f3b66f442c97cf5042a311cae940316bbc486 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:56:53 -0400 Subject: [PATCH 103/407] Update README.md --- exercises/07-Very-Specific-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index 3fb8ba40..b6618da6 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -11,7 +11,7 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th ## 📝 Instructions: -1. Set the `ul` text color to `red` (override conflicts with specificity). +1. Set the `ul li` text color to `red` (override conflicts with specificity). 2. Set the `background-color` of the second `li` of the `ol` to `green` (don't use the #id selector or .class selector). From 4ffbc45e3e69ce4e78bd3ac6038a4a694aebe8f8 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Mon, 19 Dec 2022 19:27:00 +0000 Subject: [PATCH 104/407] fixed readme --- exercises/04.2-Apply-several-classes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.2-Apply-several-classes/README.md b/exercises/04.2-Apply-several-classes/README.md index 2bcfbd77..9b2f8bdf 100644 --- a/exercises/04.2-Apply-several-classes/README.md +++ b/exercises/04.2-Apply-several-classes/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=da4tJDx48CY" We have prepared a small CSS Stylesheet that contains the CSS styles to replicate poker cards. -We are going to use to classes and apply them to the same `
    ` element. +We are going to use two classes and apply them to the same `
    ` element. ```html
    9
    From 9d2338b268959a3a22d17e1c5dd69cbb632461dc Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Wed, 21 Dec 2022 13:59:32 -0500 Subject: [PATCH 105/407] Update README.md --- exercises/02.1-Background/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.1-Background/README.md b/exercises/02.1-Background/README.md index b77e9de9..3ae8139b 100644 --- a/exercises/02.1-Background/README.md +++ b/exercises/02.1-Background/README.md @@ -28,5 +28,5 @@ If it is an image, you can specify if you want the image to be repeated horizont Google is your best friend: -- How to use the background-size: http://lmgtfy.com/?q=css+background-size -- How to use the background-repeat: http://lmgtfy.com/?q=css+background-repeat +- We recommend googling: `css background-size` and reading about it on w3schools and some other websites. +- We also recommend googleing about `css background-repeat`. From 951d37f0b31788d214dd63466705ed3ea58e4c35 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Wed, 21 Dec 2022 14:00:39 -0500 Subject: [PATCH 106/407] Update README.es.md --- exercises/02.1-Background/README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.1-Background/README.es.md b/exercises/02.1-Background/README.es.md index 735b222a..45a32554 100644 --- a/exercises/02.1-Background/README.es.md +++ b/exercises/02.1-Background/README.es.md @@ -22,6 +22,6 @@ Si es una imagen, puedes especificar si quieres que la imagen se repita horizont Google es tu mejor amigo: -- Como usar el background-size: http://lmgtfy.com/?q=css+background-size +- Recomendamos buscar en google `css background-size` para entender un poco mejor esta propiedad. -- Como usar el background-repeat: http://lmgtfy.com/?q=css+background-repeat +- Tambien recomendamos buscar el `css background-repeat` From dca69422ec4b5173a27119e191b803fc9927dc51 Mon Sep 17 00:00:00 2001 From: pzagmel Date: Mon, 9 Jan 2023 17:53:34 +0000 Subject: [PATCH 107/407] Reemplaza --- exercises/04.2-Apply-several-classes/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.2-Apply-several-classes/README.es.md b/exercises/04.2-Apply-several-classes/README.es.md index adcf39e9..77f0b1b7 100644 --- a/exercises/04.2-Apply-several-classes/README.es.md +++ b/exercises/04.2-Apply-several-classes/README.es.md @@ -15,7 +15,7 @@ Hay dos posibles clases de palos/pintas que puedes aplicar al elemento html y ha ## 📝 Instrucciones: -Remmplaza la propiedad `spades` de la clase del `
    ` por la clase `heart` y observa los resultados. +Reemplaza la propiedad `spades` de la clase del `
    ` por la clase `heart` y observa los resultados. ## Resultado: From d81997de67c77a847f104211a704baf0d96ab72a Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:03:38 -0400 Subject: [PATCH 108/407] Update README.md --- exercises/06-Practicing-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index 6fc519c0..409dabd7 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -16,7 +16,7 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 5. Add a `left padding` to the whole document of `20px` to make it easier to read. -6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have to use `rgba` for that) and write down "3 reasons you know you are learning". +6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have to use `rgba` for that) and type "3 reasons you know you are learning". 7. Then apply a `padding` of `5px` to all sides of that paragraph. From 0a9cfbe29b88e3f77cc1da9eb2dd994a26248e06 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Thu, 16 Feb 2023 14:54:52 -0400 Subject: [PATCH 109/407] Update learn.json --- learn.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/learn.json b/learn.json index 6caa33b1..c06fdf38 100644 --- a/learn.json +++ b/learn.json @@ -4,9 +4,15 @@ "skills": ["css-styling"], "preview": "https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/master/preview.png?raw=true", "repository": "https://github.com/4GeeksAcademy/css-tutorial-exercises-course", - "title": "Learn CSS Interactively", + "title": { + "us": "Learn CSS Interactively", + "es": "Aprende CSS Interactivamente" + }, "intro": "https://www.youtube.com/watch?v=BDKdUPDez-U", - "description": "Learn CSS with an interactive and auto-graded tutorial with dozens of exercises.", + "description": { + "us": "Learn CSS with an interactive and auto-graded tutorial with dozens of exercises.", + "es": "Aprende CSS con una docena de ejercicios interactivos y auto-corregidos" + }, "duration": 8, "difficulty": "easy", "videoSolutions": true, From 842ecfd142677cb12e80665df8672dc973f4b94d Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Fri, 3 Mar 2023 21:37:46 +0000 Subject: [PATCH 110/407] added important note on not to modify html file --- exercises/07-Very-Specific-Rules/README.es.md | 1 + exercises/07-Very-Specific-Rules/README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/exercises/07-Very-Specific-Rules/README.es.md b/exercises/07-Very-Specific-Rules/README.es.md index accf8d55..7ec14ada 100644 --- a/exercises/07-Very-Specific-Rules/README.es.md +++ b/exercises/07-Very-Specific-Rules/README.es.md @@ -14,6 +14,7 @@ En este ejercicio, puedes agregar tu código solo arriba del **READ ONLY BLOCK** ![Example Image](../../.learn/assets/07-1.png?raw=true) +>Importante: **NO** debes modificar el archivo index.html ## :bulb: Pista: diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index 3fb8ba40..d4360fde 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -19,6 +19,7 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th ![Example Image](../../.learn/assets/07-1.png?raw=true) +>Important: You should **NOT** modify the index.html file ## :bulb: Hint: From cf1d63f3f22c5ff4157238732df925fd8196cd8f Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Fri, 3 Mar 2023 21:46:58 +0000 Subject: [PATCH 111/407] fixed typo in test --- exercises/07-Very-Specific-Rules/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 403d12b6..aae1fa1b 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -29,7 +29,7 @@ describe("All the styles should be applied", ()=>{ expect(reg.test(color)).toBeTruthy(); }); - test("The ul second element background should be green", ()=>{ + test("The ol second element background should be green", ()=>{ document.querySelector( "head" ).innerHTML = ``; From 9d264ee2724b2aad6913dde302bfd7aae5fc11af Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Fri, 3 Mar 2023 22:43:57 +0000 Subject: [PATCH 112/407] made background yellow more specific so that using !important is meaningful --- exercises/05-Specificity/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/styles.css b/exercises/05-Specificity/styles.css index c4e96d25..0577eeca 100644 --- a/exercises/05-Specificity/styles.css +++ b/exercises/05-Specificity/styles.css @@ -2,7 +2,7 @@ ul li { background: blue; } -#thirditem { +li + #thirditem { background: yellow; } /****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ From 75c4824a3b8368b279dd6861967ffb49d032b130 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Fri, 3 Mar 2023 22:49:44 +0000 Subject: [PATCH 113/407] added test case to solution file --- exercises/05-Specificity/solution.hide.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/solution.hide.css b/exercises/05-Specificity/solution.hide.css index 13374f70..8016c500 100644 --- a/exercises/05-Specificity/solution.hide.css +++ b/exercises/05-Specificity/solution.hide.css @@ -2,7 +2,7 @@ ul li { background: blue; } -#thirditem { +li + #thirditem { background: yellow; } /****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ From 0415034ba9200cf5d3a2036038ec3dfacf9f6f87 Mon Sep 17 00:00:00 2001 From: dsilva06 Date: Tue, 7 Mar 2023 18:34:55 +0000 Subject: [PATCH 114/407] fixed instructions --- exercises/01.2-Your-First-Style/index.html | 2 +- exercises/01.2-Your-First-Style/solution.hide.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/01.2-Your-First-Style/index.html b/exercises/01.2-Your-First-Style/index.html index 2dec7923..39661132 100644 --- a/exercises/01.2-Your-First-Style/index.html +++ b/exercises/01.2-Your-First-Style/index.html @@ -3,7 +3,7 @@ diff --git a/exercises/01.2-Your-First-Style/solution.hide.html b/exercises/01.2-Your-First-Style/solution.hide.html index 3907bb3c..a2a88d04 100644 --- a/exercises/01.2-Your-First-Style/solution.hide.html +++ b/exercises/01.2-Your-First-Style/solution.hide.html @@ -3,7 +3,7 @@ From 80882db4882d8492bccdebd9c4755362cc899b60 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:55:45 +0100 Subject: [PATCH 115/407] Update README.md --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 732a3825..148f646a 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ -Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](https://twitter.com/alesanchezr) if you have any question. +Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](https://twitter.com/alesanchezr) if you have any questions. ## You'll be learning the following concepts: -1. Using how to apply CSS to your website in 3 different ways: Inline, by grouping them together inside a ` ``` ## 📝 Instructions -1. Add a ` ``` -## 📝 Instruccciones: +## 📝 Instrucciones: 1. Añade una etiqueta ``; let emptyBodyInlineStyle={}; expect(body.style._values).toEqual(emptyBodyInlineStyle) From 41203e24b56225fe69eea343f3688c7ec2d7e84e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 17:48:05 +0100 Subject: [PATCH 140/407] Update README.es.md --- exercises/02-Separate-Stylesheet/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02-Separate-Stylesheet/README.es.md b/exercises/02-Separate-Stylesheet/README.es.md index 927863bc..2b922968 100644 --- a/exercises/02-Separate-Stylesheet/README.es.md +++ b/exercises/02-Separate-Stylesheet/README.es.md @@ -10,6 +10,6 @@ Llena el `styles.css` con el contenido necesario para que el `body` del sitio we ## 💡 Pista: -+ Busca en Google cómo cambiar el color de fondo (`background-color`) del body de un sitio web. ++ Busca en Google cómo cambiar el color de fondo (`background-color`) del `body` de un sitio web. From ee6835996d1974c22249a9fc845b5a4c062625c0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:10:03 +0100 Subject: [PATCH 141/407] Update README.md --- exercises/02.1-Background/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/02.1-Background/README.md b/exercises/02.1-Background/README.md index 3ae8139b..112fab15 100644 --- a/exercises/02.1-Background/README.md +++ b/exercises/02.1-Background/README.md @@ -19,14 +19,14 @@ If it is an image, you can specify if you want the image to be repeated horizont 4. Build and Preview the exercise again. -5. Change the background-repeat to 'inherit' to make it repeat over the x axis and y axis. +5. Change the background-repeat to 'inherit' to make it repeat over the x-axis and y-axis. 6. Build and Preview the exercise again. -## 💡Hint: +## 💡 Hint: Google is your best friend: -- We recommend googling: `css background-size` and reading about it on w3schools and some other websites. -- We also recommend googleing about `css background-repeat`. +- We recommend googling: `css background-size` and reading about it on w3schools or any other websites. +- We also recommend googling about `css background-repeat`. From c68970801c774a6382f2eb99e191562d09942a33 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:20:50 +0100 Subject: [PATCH 142/407] Update README.es.md --- exercises/02.1-Background/README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.1-Background/README.es.md b/exercises/02.1-Background/README.es.md index 45a32554..fd5cb23f 100644 --- a/exercises/02.1-Background/README.es.md +++ b/exercises/02.1-Background/README.es.md @@ -18,10 +18,10 @@ Si es una imagen, puedes especificar si quieres que la imagen se repita horizont 6. Construye y previsualiza el ejercicio nuevamente. -## 💡Pista: +## 💡 Pista: Google es tu mejor amigo: - Recomendamos buscar en google `css background-size` para entender un poco mejor esta propiedad. -- Tambien recomendamos buscar el `css background-repeat` +- También recomendamos buscar `css background-repeat` From c6329d76d2ff2c44c177d7a2b6dd1ea17972c801 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:22:06 +0100 Subject: [PATCH 143/407] Update tests.js --- exercises/02.1-Background/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js index b223105f..48dc9e8c 100644 --- a/exercises/02.1-Background/tests.js +++ b/exercises/02.1-Background/tests.js @@ -11,7 +11,7 @@ describe("All the styles should be applied", ()=>{ const link = document.querySelector("link"); const title = document.querySelector('title'); - test("The body tag should not contains any inline style", ()=>{ + test("The body tag should not contain any inline style", ()=>{ document.querySelector( "head" ).innerHTML = ``; From 5f963201a853833329f49a872369c94e8aadabcb Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:27:36 +0100 Subject: [PATCH 144/407] Update README.es.md --- exercises/02.1-Background/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02.1-Background/README.es.md b/exercises/02.1-Background/README.es.md index fd5cb23f..0a39c630 100644 --- a/exercises/02.1-Background/README.es.md +++ b/exercises/02.1-Background/README.es.md @@ -2,7 +2,7 @@ La regla `background` del CSS nos permite asignar y trabajar con el background de cualquier contenedor (container). Los valores de background pueden ser `color` o una `imagen`. -Si es una imagen, puedes especificar si quieres que la imagen se repita horizontalmente, verticalmente, ambas o ninguna, y también puedes especificar si quieres cambiar el tamaño y ajustar su tamaño al contenedor completo, entre otras propiedades eso puede modificarse. +Si es una imagen, puedes especificar si quieres que la imagen se repita horizontalmente, verticalmente, ambas o ninguna, y también puedes especificar si quieres cambiar el tamaño y ajustar su tamaño al contenedor completo, entre otras propiedades, eso puede modificarse. ## 📝 Instrucciones: From e65729f9fb2600246e6873001cabe9bf17d84908 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:40:19 +0100 Subject: [PATCH 145/407] Update README.md --- exercises/03-Inline-Styles/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Inline-Styles/README.md b/exercises/03-Inline-Styles/README.md index f7600770..3fe9aeb9 100644 --- a/exercises/03-Inline-Styles/README.md +++ b/exercises/03-Inline-Styles/README.md @@ -16,7 +16,7 @@ For example: Will set the color of that specific link to red and the font-size to 14px -*You can append as many CSS rules as you want, within the same line, separated by semi-colon.* +*You can append as many CSS rules as you want, within the same line, separated by semicolon.* ## 📝 Instructions: From 5b73e11299a28db0e5d9404ea229672241c6cc0c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:40:57 +0100 Subject: [PATCH 146/407] Update README.md --- exercises/03-Inline-Styles/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Inline-Styles/README.md b/exercises/03-Inline-Styles/README.md index 3fe9aeb9..7e7d1f22 100644 --- a/exercises/03-Inline-Styles/README.md +++ b/exercises/03-Inline-Styles/README.md @@ -16,7 +16,7 @@ For example: Will set the color of that specific link to red and the font-size to 14px -*You can append as many CSS rules as you want, within the same line, separated by semicolon.* +*You can append as many CSS rules as you want, within the same line, separated by a semicolon.* ## 📝 Instructions: From 0af839cf5855c380ae0f43efac50d8d4cc47639a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:42:36 +0100 Subject: [PATCH 147/407] Update README.md --- exercises/03-Inline-Styles/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Inline-Styles/README.md b/exercises/03-Inline-Styles/README.md index 7e7d1f22..196431a6 100644 --- a/exercises/03-Inline-Styles/README.md +++ b/exercises/03-Inline-Styles/README.md @@ -4,7 +4,7 @@ tutorial: "https://www.youtube.com/watch?v=jIMPLzpryuI" # `03` Inline Styles -`Inline` styles are a very bad idea unless you have no other choice (and that's a very uncommon situation). Sadly, we have to teach you how to do it because you may need to use them at some point. +`Inline` styles are a very bad idea unless you have no other choice (and that's a very uncommon situation). Sadly, we have to teach you how to do it because you may need to use it at some point. To use inline styles, instead of declaring a `; @@ -31,7 +31,7 @@ describe("Both p tags should have a blue background", () => { test("There should be two p tags", () => { expect(p.length).toBe(2) }); - test("Both p tags should have a class name 'b-blue' without the quotation marks", () => { + test("Both p tags should have a class name 'b-blue'", () => { p.forEach(e=>{ let eClass = e.getAttribute("class"); expect(eClass).toBe("b-blue") From b3d5c7be573a2d1cdebeb9465e01b7eced6fd800 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:50:50 +0100 Subject: [PATCH 156/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index bd17ad14..45e0d3a7 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -4,9 +4,9 @@ tutorial: "https://youtu.be/watch?v=uQS5QeEE-B4" # `04.1` Combined Rules -CSS files take space on your server and also take time to download (like everything); it is yet another text document that the browser has to download before rendering the page, which is why is important to keep the CSS document as small as possible. +CSS files take up space on your server and also take time to download (like everything); it is yet another text document that the browser has to download before rendering the page, which is why it is important to keep the CSS document as small as possible. -One way to do that is by combining several properties into one such as with `border`: +One way to do that is by combining several properties into one, such as with `border`: ```css border-color: black; @@ -14,7 +14,7 @@ border-style: solid; border-width: 1px; ``` -Border's properties can be consolidated into a single line as: +Border's properties can be consolidated into a single line like this: ```css border: black 1px solid; @@ -24,11 +24,11 @@ border: black 1px solid; 1. Combine the 4 padding rules into just one using the `padding` rule. -2. Combine the all background rules, but the `background-size`, into just one line using the `background:` rule. +2. Combine all background rules, but the `background-size`, into just one line using the `background:` rule. *The `background-size` cannot be combined, the browsers don't support it yet.* -## Hint: +## 💡 Hint: - How to use the background-size: http://lmgtfy.com/?q=css+background From 4b5a4585148e21e942aa70d5cced93b02a672e70 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:54:15 +0100 Subject: [PATCH 157/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index 45e0d3a7..05792645 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -24,7 +24,7 @@ border: black 1px solid; 1. Combine the 4 padding rules into just one using the `padding` rule. -2. Combine all background rules, but the `background-size`, into just one line using the `background:` rule. +2. Combine all background rules, but the `background-size`, into just one line using the `background` rule. *The `background-size` cannot be combined, the browsers don't support it yet.* From fd034f6cfa85daa14701dead12dae48c7fa7bf2f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:58:56 +0100 Subject: [PATCH 158/407] Update README.es.md --- exercises/04.1-Combined-Rules/README.es.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/04.1-Combined-Rules/README.es.md b/exercises/04.1-Combined-Rules/README.es.md index 59f7be55..b180138e 100644 --- a/exercises/04.1-Combined-Rules/README.es.md +++ b/exercises/04.1-Combined-Rules/README.es.md @@ -2,7 +2,7 @@ Los archivos CSS ocupan espacio en tu servidor y también tardan en descargarse (como todo); es otro documento de texto que el navegador debe descargar antes de mostrar la página, por lo que es importante mantener el documento CSS lo más pequeño posible. -Una forma de hacerlo es combinando varias propiedades en una, como con "border": +Una forma de hacerlo es combinando varias propiedades en una, como con `border`: ```css border-color: black; @@ -25,7 +25,7 @@ border: black 1px solid; *El `background-size` no se puede combinar, los navegadores aún no lo admiten.* -## Pista: +## 💡 Pista: -- Como usar el background-size: http://lmgtfy.com/?q=css+background -- Como usar el padding: http://lmgtfy.com/?q=css+padding +- Cómo usar el background-size: http://lmgtfy.com/?q=css+background +- Cómo usar el padding: http://lmgtfy.com/?q=css+padding From 0a4d7a352aa6a065c87a0860bf17822d3687b7ea Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:59:25 +0100 Subject: [PATCH 159/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index 05792645..45e0d3a7 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -24,7 +24,7 @@ border: black 1px solid; 1. Combine the 4 padding rules into just one using the `padding` rule. -2. Combine all background rules, but the `background-size`, into just one line using the `background` rule. +2. Combine all background rules, but the `background-size`, into just one line using the `background:` rule. *The `background-size` cannot be combined, the browsers don't support it yet.* From e2de79f660c2d60a97bfdb2896092d893204ffd8 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:00:31 +0100 Subject: [PATCH 160/407] Update README.es.md --- exercises/04.1-Combined-Rules/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.es.md b/exercises/04.1-Combined-Rules/README.es.md index b180138e..5babd4d5 100644 --- a/exercises/04.1-Combined-Rules/README.es.md +++ b/exercises/04.1-Combined-Rules/README.es.md @@ -16,7 +16,7 @@ Las propiedades de border se pueden consolidar en una sola línea así: border: black 1px solid; ``` -# 📝 Instrucciones: +## 📝 Instrucciones: 1. Combina las 4 reglas de padding en una sola utilizando la regla `padding`. From 38de7bc877f97a924bd9fcf4435720f3e1f70d9c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:05:30 +0100 Subject: [PATCH 161/407] Update tests.js --- exercises/04.1-Combined-Rules/tests.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/04.1-Combined-Rules/tests.js b/exercises/04.1-Combined-Rules/tests.js index c6f62acc..30c66793 100644 --- a/exercises/04.1-Combined-Rules/tests.js +++ b/exercises/04.1-Combined-Rules/tests.js @@ -11,7 +11,7 @@ describe("All the styles should be applied", ()=> { const link = document.querySelector("link"); const title = document.querySelector('title'); - test("The body tag should not contains any inline style", ()=> { + test("The body tag should not contain any inline style", ()=> { document.querySelector( "head" ).innerHTML = ``; @@ -19,7 +19,7 @@ describe("All the styles should be applied", ()=> { expect(body.style._values).toEqual(emptyBodyInlineStyle); }); - test("the width should be '50px'", ()=> { + test("The width should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( "head" @@ -37,7 +37,7 @@ describe("All the styles should be applied", ()=> { expect(orangeHoverSelector).toBe('50px'); }); - test("the height should be '50px'", ()=> { + test("The height should be '50px'", ()=> { // get computed styles of any element you like document.querySelector( "head" @@ -55,7 +55,7 @@ describe("All the styles should be applied", ()=> { expect(orangeHoverSelector).toBe('50px'); }); - test("the background-size should be contain", ()=> { + test("The background-size should be contain", ()=> { document.querySelector( "head" ).innerHTML = ``; @@ -72,7 +72,7 @@ describe("All the styles should be applied", ()=> { expect(orangeHoverSelector).toBe('contain'); }); - test("the background should include the shorthand property", ()=> { + test("The background should include the shorthand property", ()=> { document.querySelector( "head" ).innerHTML = ``; @@ -102,7 +102,7 @@ describe("All the styles should be applied", ()=> { expect(orangeHoverSelector).toContain('url(https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/3a2d1dd03f58167a5a4894155af2d3aa4d41d647/.learn/assets/baby.jpg?raw=true)'); }); - test("the padding should include the shorthand property in the right order (top, right, bottom, left)", ()=> { + test("The padding should include the shorthand property in the right order (top, right, bottom, left)", ()=> { document.querySelector( "head" ).innerHTML = ``; From 08a491a4509132fa2abd86aab6b51c3a18ed28ef Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:15:24 +0100 Subject: [PATCH 162/407] Update tests.js --- exercises/04.1-Combined-Rules/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/tests.js b/exercises/04.1-Combined-Rules/tests.js index 30c66793..8480b590 100644 --- a/exercises/04.1-Combined-Rules/tests.js +++ b/exercises/04.1-Combined-Rules/tests.js @@ -55,7 +55,7 @@ describe("All the styles should be applied", ()=> { expect(orangeHoverSelector).toBe('50px'); }); - test("The background-size should be contain", ()=> { + test("The background-size should be 'contain'", ()=> { document.querySelector( "head" ).innerHTML = ``; From 7ff6e8b1991e0528cd4c11f3710a6e7d8513df44 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:18:09 +0100 Subject: [PATCH 163/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index 45e0d3a7..b96b4536 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -4,7 +4,7 @@ tutorial: "https://youtu.be/watch?v=uQS5QeEE-B4" # `04.1` Combined Rules -CSS files take up space on your server and also take time to download (like everything); it is yet another text document that the browser has to download before rendering the page, which is why it is important to keep the CSS document as small as possible. +CSS files take up space on your server and also take time to download (like everything); it is yet another text document that the browser has to download before rendering the page, which is why it's important to keep the CSS document as small as possible. One way to do that is by combining several properties into one, such as with `border`: From 5b8fdb2002ba4a1accbef803be71e316d491cbb8 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 23 Mar 2023 14:32:14 +0000 Subject: [PATCH 164/407] instructions now using default value, solution as well --- exercises/02.1-Background/README.es.md | 2 +- exercises/02.1-Background/README.md | 2 +- exercises/02.1-Background/solution.hide.css | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/02.1-Background/README.es.md b/exercises/02.1-Background/README.es.md index 45a32554..1d975de7 100644 --- a/exercises/02.1-Background/README.es.md +++ b/exercises/02.1-Background/README.es.md @@ -14,7 +14,7 @@ Si es una imagen, puedes especificar si quieres que la imagen se repita horizont 4. Construye y previsualiza el ejercicio nuevamente. -5. Cambia el `background-repeat` a `inherit` para que se repita sobre el eje x y el eje y. +5. Cambia el `background-repeat` a `repeat` para que se repita sobre el eje x y el eje y. 6. Construye y previsualiza el ejercicio nuevamente. diff --git a/exercises/02.1-Background/README.md b/exercises/02.1-Background/README.md index 3ae8139b..fe82957e 100644 --- a/exercises/02.1-Background/README.md +++ b/exercises/02.1-Background/README.md @@ -19,7 +19,7 @@ If it is an image, you can specify if you want the image to be repeated horizont 4. Build and Preview the exercise again. -5. Change the background-repeat to 'inherit' to make it repeat over the x axis and y axis. +5. Change the background-repeat to 'repeat' to make it repeat over the x axis and y axis. 6. Build and Preview the exercise again. diff --git a/exercises/02.1-Background/solution.hide.css b/exercises/02.1-Background/solution.hide.css index 8c72a684..a2c6b305 100644 --- a/exercises/02.1-Background/solution.hide.css +++ b/exercises/02.1-Background/solution.hide.css @@ -1,5 +1,5 @@ body { background-image: url(https://4geeksacademy.github.io/exercise-assets/img/bg/small-mosaic.jpg); background-size: contain; - background-repeat: inherit; -} \ No newline at end of file + background-repeat: repeat; +} From a8e25b6b70d993978dc9cf248815ad448046673c Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 23 Mar 2023 14:32:36 +0000 Subject: [PATCH 165/407] test now checking for default value repeat --- exercises/02.1-Background/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js index b223105f..bc1a1daf 100644 --- a/exercises/02.1-Background/tests.js +++ b/exercises/02.1-Background/tests.js @@ -28,13 +28,13 @@ describe("All the styles should be applied", ()=>{ expect(styles["background-size"]).toBe("contain"); }); - test("the background-repeat should be 'inherit' without quotes", ()=>{ + test("the background-repeat should be 'repeat' without quotes", ()=>{ document.querySelector( "head" ).innerHTML = ``; let styles = window.getComputedStyle(body); - expect(styles["background-repeat"]).toBe("inherit"); + expect(styles["background-repeat"]).toBe("repeat"); }); test("You should not change the existing head tag elements", ()=>{ From 67326195b73f71773a9b3e6d1aae532769aeeaca Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 30 Mar 2023 20:56:54 +0000 Subject: [PATCH 166/407] fixed wrong selector in test issue --- exercises/05-Specificity/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js index a22fab68..b43a2a6a 100644 --- a/exercises/05-Specificity/tests.js +++ b/exercises/05-Specificity/tests.js @@ -30,7 +30,7 @@ describe("All the styles should be applied", function () { let thirdItSelector = document.styleSheets[0].cssRules[1].selectorText; let thirdItBackground = document.styleSheets[0].cssRules[1].style.background; - expect(thirdItSelector).toBe("#thirditem"); + expect(thirdItSelector).toBe("li + #thirditem"); expect(thirdItBackground).toBe("yellow"); expect(cssArray).toBe("ul li"); expect(cssArrayBackground).toBe("blue"); From e93bc7d70a429be57f11d3028ac06e5ee5f16b61 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:10:00 +0200 Subject: [PATCH 167/407] Update README.es.md --- README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.es.md b/README.es.md index 95e9bea3..cc2bc094 100644 --- a/README.es.md +++ b/README.es.md @@ -46,7 +46,7 @@ Una completa selección de Ejercicios autograduados sobre CSS ¡para cualquier i ## Instalación manual -1. Instala learnpack, el package manager para tutoriales de aprendizaje y el html compiler plugin para learnpack, asegúrate también de tener node.js 12+: +1. Instala learnpack, el package manager para tutoriales de aprendizaje y el html compiler plugin para learnpack, asegúrate también de tener node.js 14+: ```bash $ npm i learnpack -g From d651c26a192451e836a4b3b57a89281c86b5d7d0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:11:01 +0200 Subject: [PATCH 168/407] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 886bb060..a2d3ef40 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Complete selection of autograded CSS exercises, for anyone interested in learnin ## Manual installation -1) Install the learnpack package manager for education and the html plugin to compile and test html exercises: +1) Install learnpack, the package manager for learning tutorials and the html compiler plugin for learnpack, make sure you also have node.js 14+: ```bash $ npm i learnpack -g From 692bbfa9f769d7f48328bc6d6143c0a32afee116 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:14:10 +0200 Subject: [PATCH 169/407] Update README.es.md --- README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.es.md b/README.es.md index cc2bc094..a7cbcdf7 100644 --- a/README.es.md +++ b/README.es.md @@ -61,7 +61,7 @@ $ learnpack install css-tutorial-exercises-course Nota: Una vez que termines de descargar, encontrarás una carpeta "exercises" que contiene todos los ejercicios. -3. Inicializa el tutorial/ejercicios ejecutando el siguiente comando en el mismo nivel donde se encuentra tu archivo bc.json: +3. Inicializa el tutorial/ejercicios ejecutando el siguiente comando en el mismo nivel donde se encuentra tu archivo learn.json: ```sh $ npm i jest@24.8.0 -g From 256a558868e7c6f579eb17df29ec032708c23674 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:31:43 +0200 Subject: [PATCH 170/407] removed english tutorial from spanish file --- exercises/01-Hello-World/README.es.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/exercises/01-Hello-World/README.es.md b/exercises/01-Hello-World/README.es.md index d11c6441..0c0423f3 100644 --- a/exercises/01-Hello-World/README.es.md +++ b/exercises/01-Hello-World/README.es.md @@ -1,6 +1,3 @@ ---- -tutorial: "https://www.youtube.com/watch?v=rbtHLA813pU" ---- # `01` Hello World en CSS From fcfeefa5cdcca3b7ea19369c883b5c7d999003e6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Mon, 3 Apr 2023 01:23:24 +0200 Subject: [PATCH 171/407] Update README.md --- exercises/01-Hello-World/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/01-Hello-World/README.md b/exercises/01-Hello-World/README.md index 386d19e0..5e4caa58 100644 --- a/exercises/01-Hello-World/README.md +++ b/exercises/01-Hello-World/README.md @@ -15,7 +15,7 @@ That is it! The rest is just semantics! 😁 Look at this example: -```HTML +```html `; - - let cssArray = document.styleSheets[0].cssRules; - let orangeHoverSelector = ""; - - for (let i = 0; i < cssArray.length; i++) { - if (cssArray[i].selectorText === ".myBox") { - orangeHoverSelector = cssArray[i].style['background-size']; - } - } - - expect(orangeHoverSelector).toBe('contain'); - }); - test("The background should include the shorthand property", ()=> { document.querySelector( "head" From 78638d1e1c73987b8de666d4c5ae879933859ec9 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:04:03 +0200 Subject: [PATCH 184/407] removed tutorial because I had to change the part where it said that the browser does not support the background size --- exercises/04.1-Combined-Rules/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index 25376a74..81a2d167 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -1,7 +1,3 @@ ---- -tutorial: "https://youtu.be/watch?v=uQS5QeEE-B4" ---- - # `04.1` Combined Rules CSS files take up space on your server and also take time to download (like everything); it is yet another text document that the browser has to download before rendering the page, which is why it's important to keep the CSS document as small as possible. From 55e4f137a05ac67bafa017e06d31ae3131730a00 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:26:12 +0200 Subject: [PATCH 185/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index 81a2d167..f951353a 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -22,7 +22,7 @@ border: black 1px solid; 2. Combine all background rules into only one using the `background` rule. -*The `background-position` and the `background-size` properties will conflict because they can handle the same type of values, so you must write them as follows:* +*The `background-position` and the `background-size` properties will conflict because they can handle the same type of values, so instead of separating these properties with a `space` you must separate them with a forward slash `/` as follows:* ```css background: 50px / cover From 73aeab95346fa5e51e7324f9ca3beceb64dee847 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:38:10 +0200 Subject: [PATCH 186/407] Update README.es.md --- exercises/04.1-Combined-Rules/README.es.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.es.md b/exercises/04.1-Combined-Rules/README.es.md index ab9c2c47..a6b258c6 100644 --- a/exercises/04.1-Combined-Rules/README.es.md +++ b/exercises/04.1-Combined-Rules/README.es.md @@ -24,12 +24,13 @@ border: black 1px solid; 2. Combina todas las reglas de background en una sola línea usando la regla `background`. *Las propiedades `background-position` y `background-size` pueden usar el mismo tipo de datos por lo que entrarán en conflicto, la forma de arreglar esto es escribiendolo así:* +*Las propiedades `background-position` y `background-size` pueden usar el mismo tipo de datos por lo que entrarán en conflicto, así que en vez de separar estas propiedades con un **espacio**, debes separarlas con una barra `/` de esta forma:* ```css background: 50px / cover ``` -Donde el valor de la izquierda de `/` es la propiedad `background-position` y la derecha es el `background-size`. +Donde el valor de la izquierda de la barra `/` es la propiedad `background-position` y la derecha es el `background-size`. ## 💡 Pista: From 954c186168d8dbc9f95ad339c71b89952c8bb303 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:38:25 +0200 Subject: [PATCH 187/407] Update README.es.md --- exercises/04.1-Combined-Rules/README.es.md | 1 - 1 file changed, 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.es.md b/exercises/04.1-Combined-Rules/README.es.md index a6b258c6..40e9cbdd 100644 --- a/exercises/04.1-Combined-Rules/README.es.md +++ b/exercises/04.1-Combined-Rules/README.es.md @@ -23,7 +23,6 @@ border: black 1px solid; 2. Combina todas las reglas de background en una sola línea usando la regla `background`. -*Las propiedades `background-position` y `background-size` pueden usar el mismo tipo de datos por lo que entrarán en conflicto, la forma de arreglar esto es escribiendolo así:* *Las propiedades `background-position` y `background-size` pueden usar el mismo tipo de datos por lo que entrarán en conflicto, así que en vez de separar estas propiedades con un **espacio**, debes separarlas con una barra `/` de esta forma:* ```css From 2d300ed80e24a14a328cc4a98f17897a6b6c9f9c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:40:22 +0200 Subject: [PATCH 188/407] Update README.md --- exercises/04.1-Combined-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.1-Combined-Rules/README.md b/exercises/04.1-Combined-Rules/README.md index f951353a..b75e02dd 100644 --- a/exercises/04.1-Combined-Rules/README.md +++ b/exercises/04.1-Combined-Rules/README.md @@ -28,7 +28,7 @@ border: black 1px solid; background: 50px / cover ``` -Where the left side value of the `/` is the `background-position` rule and the right value is the `background-size` rule. +Where the left side value of the forward slash `/` is the `background-position` rule and the right value is the `background-size` rule. ## 💡 Hint: From 24ec5814670cd7ab2197845960d9647857d0a4d4 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Tue, 4 Apr 2023 12:22:24 -0400 Subject: [PATCH 189/407] Create devcontainer.json --- .devcontainer/devcontainer.json | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..9942f66b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node +{ + "name": "Node.js", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-16", + "customizations": { + "vscode": { + "settings": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "workbench.editorAssociations": { + "*.md": "vscode.markdown.preview.editor" + } + }, + "extensions": ["learn-pack.learnpack-vscode"] + } + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + "onCreateCommand": "npm i jest@24.8.0 -g && npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install learnpack-html@0.0.20" + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From a28cab791df3133a93a4439fc200c2ae0eb35007 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 23:56:50 +0200 Subject: [PATCH 190/407] Update README.md --- exercises/04.2-Apply-several-classes/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/04.2-Apply-several-classes/README.md b/exercises/04.2-Apply-several-classes/README.md index 9b2f8bdf..c98cf025 100644 --- a/exercises/04.2-Apply-several-classes/README.md +++ b/exercises/04.2-Apply-several-classes/README.md @@ -12,7 +12,8 @@ We are going to use two classes and apply them to the same `
    ` element.
    9
    ``` -The class `card` contains the styling rules to make the div look like a card: Borders, Height, Width, etc. +The class `card` contains the styling rules to make the div look like a card: borders, height, width, etc. + The class `spades` contains the styling rules needed to make the card turn into a spades suite (black and with a spades symbol). There are two possible suite classes you can apply to the html element to make it look like a real poker card. From 78f6051c3e1dcdbaf12db84fa700052c7b509ef2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 4 Apr 2023 23:57:39 +0200 Subject: [PATCH 191/407] Update README.es.md --- exercises/04.2-Apply-several-classes/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.2-Apply-several-classes/README.es.md b/exercises/04.2-Apply-several-classes/README.es.md index 77f0b1b7..236bebab 100644 --- a/exercises/04.2-Apply-several-classes/README.es.md +++ b/exercises/04.2-Apply-several-classes/README.es.md @@ -7,7 +7,7 @@ Vamos a usar clases y aplicarlas al mismo elemento `
    `.
    9
    ``` -La clase `card` contiene las reglas de estilo para hacer que el div se vea como una carta: bordes, ancho, etc. +La clase `card` contiene las reglas de estilo para hacer que el div se vea como una carta: bordes, ancho, alto, etc. La clase `spades` contiene las reglas de estilo requeridas para convertir la carta a la pinta de picas (negra con el símbolo de picas). From 44c01f83180a5d2c18e500dddd9ba02d35071dec Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:17:33 +0200 Subject: [PATCH 192/407] Update README.md --- exercises/04.3-id-Selector/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.3-id-Selector/README.md b/exercises/04.3-id-Selector/README.md index 061ec46b..5bc31313 100644 --- a/exercises/04.3-id-Selector/README.md +++ b/exercises/04.3-id-Selector/README.md @@ -14,7 +14,7 @@ You can also select an element by `#id` and apply styles to it. } ``` -Use the `id` property of the HTML element to select it. `Ids` should be unique, only one element must have the same ìd`. +Use the `id` property of the HTML element to select it. `ids` should be unique, only one element must have the same `id`. *The html tag with the `id="small"` will have a font-size of `9px`.* From b5f649ca9108a77743dd63aec72b91ec6466678c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:24:18 +0200 Subject: [PATCH 193/407] Update README.md --- exercises/04.3-id-Selector/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.3-id-Selector/README.md b/exercises/04.3-id-Selector/README.md index 5bc31313..4557898e 100644 --- a/exercises/04.3-id-Selector/README.md +++ b/exercises/04.3-id-Selector/README.md @@ -16,7 +16,7 @@ You can also select an element by `#id` and apply styles to it. Use the `id` property of the HTML element to select it. `ids` should be unique, only one element must have the same `id`. -*The html tag with the `id="small"` will have a font-size of `9px`.* +*The HTML tag with the `id="small"` will have a font-size of `9px`.* ## 📝 Instructions: From 2f6bfd877df678ba0ae5e39c40d4ed99a0aa0374 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:33:13 +0200 Subject: [PATCH 194/407] Update test.js --- exercises/04.3-id-Selector/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js index f9ea69cc..adc3f260 100644 --- a/exercises/04.3-id-Selector/test.js +++ b/exercises/04.3-id-Selector/test.js @@ -12,7 +12,7 @@ test("There should be a span tag", () => { expect(span).toBeTruthy() }); -test("The span tag should have id 'button1'", () => { +test("The span tag should have the id 'button1'", () => { expect(span).toBeTruthy(); let id = span.id expect(id).toBeTruthy(); @@ -34,4 +34,4 @@ test("You should not change the existing head tag elements", () => { const href = link.getAttribute("href"); expect(href).toBe('./styles.css'); -}); \ No newline at end of file +}); From e0180f8084225ca8b1818b3e223399f3e4ff2f9c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:43:32 +0200 Subject: [PATCH 195/407] Update README.es.md --- exercises/04.3-id-Selector/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.3-id-Selector/README.es.md b/exercises/04.3-id-Selector/README.es.md index 72b81234..bbf9763d 100644 --- a/exercises/04.3-id-Selector/README.es.md +++ b/exercises/04.3-id-Selector/README.es.md @@ -10,7 +10,7 @@ También puedes seleccionar un elemento por su `#id` y aplicarle estilos. } ``` -Usa la propiedad `id` del elemento HTML para seleccionarlo. Los `id` deben ser únicos, solo un elemento puede tener la misma `id`. +Usa la propiedad `id` del elemento HTML para seleccionarlo. Los `id` deben ser únicos, así que no uses el mismo `id` en más de un elemento. *La etiqueta HTML con `id="small"` tendrá un font-size de `9px`.* From 4ca68939cb12c6b1945d5edcfdec9ab472ad71eb Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 00:45:10 +0200 Subject: [PATCH 196/407] Update README.md --- exercises/04.3-id-Selector/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04.3-id-Selector/README.md b/exercises/04.3-id-Selector/README.md index 4557898e..377f6c8c 100644 --- a/exercises/04.3-id-Selector/README.md +++ b/exercises/04.3-id-Selector/README.md @@ -14,7 +14,7 @@ You can also select an element by `#id` and apply styles to it. } ``` -Use the `id` property of the HTML element to select it. `ids` should be unique, only one element must have the same `id`. +Use the `id` property of the HTML element to select it. `ids` should be unique, don't use the same `id` on more than one element. *The HTML tag with the `id="small"` will have a font-size of `9px`.* From fe7ac863c50db35c41982cf3526f4ce2ca9b6719 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 01:48:22 +0200 Subject: [PATCH 197/407] Update README.md --- exercises/05-Specificity/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/05-Specificity/README.md b/exercises/05-Specificity/README.md index db381074..242e86e8 100644 --- a/exercises/05-Specificity/README.md +++ b/exercises/05-Specificity/README.md @@ -7,16 +7,16 @@ tutorial: "https://www.youtube.com/watch?v=3JxXkhxyAnI" When creating a CSS document, you need to start from the most generic selectors and end with the most specific ones, that is the way CSS works. -It's all about the level of Specificity. If you specify that your `div` with `id="thirditem` has a yellow background, and later in the document you specify that all `divs` will have blue background, `#thirditem` will keep his yellow background. punto! +It's all about the level of **specificity**. If you specify that your `div` with `id="thirditem` has a yellow background, and later in the document you specify that all `divs` will have blue background, `#thirditem` will keep his yellow background. punto! *Because the more specific, the more priority it has.* -## 📝 Instrucciones: +## 📝 Instructions: 1. Override the `background` of `#thirditem` without deleting any css code, simply append to the css a more specific rule at the end of the document to override the background-color to green. -### 💡 Hint: +## 💡 Hint: You can use the **!important** annotation: https://css-tricks.com/when-using-important-is-the-right-choice/ From 343d0f4795edd13a7f62b294e8f50169bcb88cb4 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 01:50:19 +0200 Subject: [PATCH 198/407] Update README.md --- exercises/05-Specificity/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/README.md b/exercises/05-Specificity/README.md index 242e86e8..f1edfa0f 100644 --- a/exercises/05-Specificity/README.md +++ b/exercises/05-Specificity/README.md @@ -13,7 +13,7 @@ It's all about the level of **specificity**. If you specify that your `div` with ## 📝 Instructions: -1. Override the `background` of `#thirditem` without deleting any css code, simply append to the css a more specific rule at the end of the document to override the background-color to green. +1. Override the `background` of `#thirditem` without deleting any CSS code, simply append to the CSS a more specific rule at the end of the document to override the background-color to green. ## 💡 Hint: From 99fec9172dbeace18d837b03970af06983324160 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 01:54:25 +0200 Subject: [PATCH 199/407] Update README.es.md --- exercises/05-Specificity/README.es.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/05-Specificity/README.es.md b/exercises/05-Specificity/README.es.md index a87b6e2d..4789d892 100644 --- a/exercises/05-Specificity/README.es.md +++ b/exercises/05-Specificity/README.es.md @@ -1,8 +1,8 @@ # `05` Especificidad -Al crear un documento CSS, debe comenzar desde el selector más genérico y terminar con el más específico, esa es la forma en que funciona CSS. +Al crear un documento CSS, se debe comenzar desde el selector más genérico y terminar con el más específico, esa es la forma en que funciona CSS. -Se trata del nivel de especificidad. Si especificas que tu `div` con `id="thirditem"` tiene un fondo (`background-color`) azul (`blue`), y más adelante en el documento especificas que todos los `divs` tendrán un fondo amarillo (`yellow`), `#thirditem` mantendrá su fondo azul (`blue`). ¡y punto! +Se trata del nivel de **especificidad**. Si especificas que tu `div` con `id="thirditem"` tiene un fondo (`background-color`) azul (`blue`), y más adelante en el documento especificas que todos los `divs` tendrán un fondo amarillo (`yellow`), `#thirditem` mantendrá su fondo azul (`blue`). ¡Y punto! *Porque cuanto más específico, más prioridad tiene.* @@ -13,4 +13,4 @@ Se trata del nivel de especificidad. Si especificas que tu `div` con `id="thirdi ## 💡 Pista: -+ Puedes usar la anotación **!important** : https://css-tricks.com/when-using-important-is-the-right-choice/ \ No newline at end of file ++ Puedes usar la anotación **!important** : https://css-tricks.com/when-using-important-is-the-right-choice/ From bdef919540bcb7b5687ec3224125216b79860510 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:01:25 +0200 Subject: [PATCH 200/407] Update styles.css --- exercises/05-Specificity/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/styles.css b/exercises/05-Specificity/styles.css index 0577eeca..1255fbbc 100644 --- a/exercises/05-Specificity/styles.css +++ b/exercises/05-Specificity/styles.css @@ -5,4 +5,4 @@ ul li { li + #thirditem { background: yellow; } -/****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ +/**** DO NOT EDIT ANYTHING ABOVE THIS LINE ****/ From 7ce832a8feb1e63c29ecf21cda84215844c707c6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:07:05 +0200 Subject: [PATCH 201/407] Update solution.hide.css --- exercises/05-Specificity/solution.hide.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/05-Specificity/solution.hide.css b/exercises/05-Specificity/solution.hide.css index 8016c500..fabc5750 100644 --- a/exercises/05-Specificity/solution.hide.css +++ b/exercises/05-Specificity/solution.hide.css @@ -5,7 +5,8 @@ ul li { li + #thirditem { background: yellow; } -/****** DON NOT EDIT ANYTHING ABOVE THIS LINE ****/ +/**** DO NOT EDIT ANYTHING ABOVE THIS LINE ****/ + #thirditem { background: green !important; } From ab05db47cdba80376a72f144602da114fb6f89c3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:09:43 +0200 Subject: [PATCH 202/407] Update index.html --- exercises/05-Specificity/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/index.html b/exercises/05-Specificity/index.html index 3d68946c..154a071a 100644 --- a/exercises/05-Specificity/index.html +++ b/exercises/05-Specificity/index.html @@ -11,7 +11,7 @@
  • My first item of the list
  • My second item of the list
  • My third item of the list
  • -
  • My forth item of the list
  • +
  • My fourth item of the list
  • My fifth item of the list
  • From d34a53e44bd69bcba98d6ab72f2f9c7229e61033 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:41:48 +0200 Subject: [PATCH 203/407] Update index.html --- exercises/06-Practicing-Rules/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/06-Practicing-Rules/index.html b/exercises/06-Practicing-Rules/index.html index 2651f781..c9135f89 100644 --- a/exercises/06-Practicing-Rules/index.html +++ b/exercises/06-Practicing-Rules/index.html @@ -12,18 +12,18 @@

    The learning essay

    3 reasons you know you are learning

    - We are going to explain in this pharagraph the 3 most comon signs that you should look into yourself to recognize if you are learning. + We are going to explain in this paragraph the 3 most common signs that you should look into yourself to recognize if you are learning.

    1. You are able to complete the exercises by yourself.
    2. -
    3. You understand what the teacher is talking about
    4. -
    5. Your are able to have conversations about the topic
    6. +
    7. You understand what the teacher is talking about.
    8. +
    9. You are able to have conversations about the topic.
    -

    3 reasons you know love what you are learning

    +

    3 reasons you love what you are learning

    • Time passes fast.
    • -
    • You are anxious to finish this excercise and start the next one.
    • -
    • Is 12am and you don't want to go to sleep.
    • +
    • You are anxious to finish this exercise and start the next one.
    • +
    • It's 12am and you don't want to go to sleep.

    If you can't sleep, what better than watching videos of cats? From eee9b2734ffb24049bd05b882c0663722f640405 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:03:26 +0200 Subject: [PATCH 204/407] Update README.md --- exercises/06-Practicing-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index 409dabd7..c63091d4 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -16,7 +16,7 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 5. Add a `left padding` to the whole document of `20px` to make it easier to read. -6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have to use `rgba` for that) and type "3 reasons you know you are learning". +6. Add a `white semi-transparent background (0.2)` to the first `p` to make it easier to read (you have to use `rgba` for that). 7. Then apply a `padding` of `5px` to all sides of that paragraph. From 2a451389e0c79f870860c285e3edffbc35f81b8f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:08:17 +0200 Subject: [PATCH 205/407] Update README.md --- exercises/06-Practicing-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md index c63091d4..1674968f 100644 --- a/exercises/06-Practicing-Rules/README.md +++ b/exercises/06-Practicing-Rules/README.md @@ -16,7 +16,7 @@ tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU" 5. Add a `left padding` to the whole document of `20px` to make it easier to read. -6. Add a `white semi-transparent background (0.2)` to the first `p` to make it easier to read (you have to use `rgba` for that). +6. Add a white `semi-transparent background (0.2)` to the `first paragraph` to make it easier to read (you have to use `rgba` for that). 7. Then apply a `padding` of `5px` to all sides of that paragraph. From f0ca1f718c28ce90dff2173b42325d790d8aa966 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:10:24 +0200 Subject: [PATCH 206/407] Update README.es.md --- exercises/06-Practicing-Rules/README.es.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/06-Practicing-Rules/README.es.md b/exercises/06-Practicing-Rules/README.es.md index 9cf27efa..101596bb 100644 --- a/exercises/06-Practicing-Rules/README.es.md +++ b/exercises/06-Practicing-Rules/README.es.md @@ -8,15 +8,15 @@ 3. Cambia el color del `h1` a rojo(`red`). -4. Haz todos los `h2` tengan subrayado. +4. Haz que todos los `h2` tengan subrayado. 5. Agrega un `left padding` a todo el documento de `20px` para que sea más fácil de leer. -6. Agrega un fondo blanco semitransparente (`semi-transparent background 0.2`) al primer párrafo de "3 reasons you know you are learning" para que sea más fácil de leer (tienes que usar `rgba` para esto). +6. Agrega un fondo blanco semitransparente (`semi-transparent background (0.2)`) al primer párrafo para que sea más fácil de leer (tienes que usar `rgba` para esto). 7. Luego aplica un `padding` de `5px` a todos los lados de ese párrafo. -8. Cambia el color del `anchor` "hover" a verde (`green`) y elimina el subrayado (tienes que colocar el anchor para probarlo). +8. Cambia el color del `anchor` "hover" a verde (`green`) y elimina el subrayado (tienes que pasar el cursor encima del anchor para probarlo). ## El resultado debería ser algo como esto: From 199feb401f9013c31aa63c64caa8f91dd82c9b93 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:14:29 +0200 Subject: [PATCH 207/407] Update tests.js --- exercises/06-Practicing-Rules/tests.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js index a348b847..d9fd4156 100644 --- a/exercises/06-Practicing-Rules/tests.js +++ b/exercises/06-Practicing-Rules/tests.js @@ -11,7 +11,7 @@ describe("All the styles should be applied", () => { let link = document.querySelector("link") let title = document.querySelector('title') - test("the background should match", () => { + test("The background should match", () => { document.querySelector( "head" ).innerHTML = ``; @@ -21,7 +21,7 @@ describe("All the styles should be applied", () => { `url(../../.learn/assets/background-vertical.jpg?raw=true) repeat-y` ); }); - test("the font-family should be 'Times New Roman'", () => { + test("The font-family should be 'Times New Roman'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -29,7 +29,7 @@ describe("All the styles should be applied", () => { let styles = window.getComputedStyle(body); expect(styles["font-family"].toLowerCase()).toBe("\"times new roman\""); }); - test("the padding-left should be '20px'", () => { + test("The padding-left should be '20px'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -37,7 +37,7 @@ describe("All the styles should be applied", () => { let styles = window.getComputedStyle(body); expect(styles["padding-left"]).toBe("20px"); }); - test("the font-family in the H1 Tag should be 'Courier'", () => { + test("The font-family in the h1 tag should be 'Courier'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -46,7 +46,7 @@ describe("All the styles should be applied", () => { // get computed styles of any element you like expect(h1TagStyles["font-family"].toLowerCase()).toBe("\"courier\""); }); - test("the color in the H1 Tag should be 'red'", () => { + test("The color in the h1 tag should be 'red'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -55,7 +55,7 @@ describe("All the styles should be applied", () => { // get computed styles of any element you like expect(h1TagStyles["color"]).toBe("red"); }); - test("the text-decoration in the H2 Tag should be 'underline'", () => { + test("the text-decoration in the h2 tag should be 'underline'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -64,7 +64,7 @@ describe("All the styles should be applied", () => { let h2TagStyles = window.getComputedStyle(h2Tag); expect(h2TagStyles["text-decoration"]).toBe("underline"); }); - test("the padding in the #id1 Tag should be '5px'", () => { + test("The padding in the #id1 tag should be '5px'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -74,7 +74,7 @@ describe("All the styles should be applied", () => { expect(idTagStyles["padding"]).toBe("5px"); }); - test("The a hover underline should be removed", () => { + test("The a:hover underline should be removed", () => { document.querySelector( "head" ).innerHTML = ``; @@ -88,7 +88,7 @@ describe("All the styles should be applied", () => { expect(orangeHoverSelector).toBe("none"); }); - test("The a hover color should be green", () => { + test("The a:hover color should be green", () => { document.querySelector( "head" ).innerHTML = ``; From 35f4edfdfc506ca90d0af21a90040ec7d2f3676c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:37:05 +0200 Subject: [PATCH 208/407] Update README.md --- exercises/07-Very-Specific-Rules/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index 3cba95e9..dc922179 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -19,8 +19,8 @@ In this exercise, you can add your code only above the **READ ONLY BLOCK** of th ![Example Image](../../.learn/assets/07-1.png?raw=true) ->Important: You should **NOT** modify the index.html file +>Important: You should **NOT** modify the index.html file. ## :bulb: Hint: -1. The `!important` attribute helps to override over other attributes. +1. The `!important` attribute helps to override other attributes. From 0b2d547111c0ae64205af66706caadff3a4b3818 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:38:48 +0200 Subject: [PATCH 209/407] Update styles.css --- exercises/07-Very-Specific-Rules/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index 300d0677..70e1923d 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,8 +1,8 @@ /** Insert your code here **/ -/*********** READ ONLY BLOCK ****** +/********** READ ONLY BLOCK ****** You CANNOT UPDATE anything from here on, -only add lines of code on top of this lines +only add lines of code on top of these lines **/ body { From 1af47842ca50b31ae31725af254a0e9241605578 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:39:09 +0200 Subject: [PATCH 210/407] Update styles.css --- exercises/07-Very-Specific-Rules/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index 70e1923d..164b694b 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,6 +1,6 @@ /** Insert your code here **/ -/********** READ ONLY BLOCK ****** +/********** READ-ONLY BLOCK ****** You CANNOT UPDATE anything from here on, only add lines of code on top of these lines **/ From f60fde3ad7c036a71cefe145dbbe4e87ade403f4 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:40:29 +0200 Subject: [PATCH 211/407] Update solution.hide.css --- exercises/07-Very-Specific-Rules/solution.hide.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/solution.hide.css b/exercises/07-Very-Specific-Rules/solution.hide.css index 55fb5ff4..232aa480 100644 --- a/exercises/07-Very-Specific-Rules/solution.hide.css +++ b/exercises/07-Very-Specific-Rules/solution.hide.css @@ -12,9 +12,9 @@ tr:nth-child(odd) { background: yellow; } -/*********** READ ONLY BLOCK ****** +/*********** READ-ONLY BLOCK ****** You CANNOT UPDATE anything from here on, -only add lines of code on top of this lines +only add lines of code on top of these lines **/ body { From c83a96ed8e4e6d0054883e9d06fbeb4fb5d6d743 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 03:44:29 +0200 Subject: [PATCH 212/407] Update index.html --- exercises/07-Very-Specific-Rules/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/index.html b/exercises/07-Very-Specific-Rules/index.html index 9c691446..301d8f1d 100644 --- a/exercises/07-Very-Specific-Rules/index.html +++ b/exercises/07-Very-Specific-Rules/index.html @@ -10,18 +10,18 @@

    The learning essay

    3 reasons you know you are learning

    - We are going to explain in this pharagraph the 3 most comon signs that you should look into yourself to recognize if you are learning. + We are going to explain in this paragraph the 3 most common signs that you should look into yourself to recognize if you are learning.

    1. You are able to complete the exercises by yourself.
    2. You understand what the teacher is talking about
    3. -
    4. Your are able to have conversations about the topic
    5. +
    6. You are able to have conversations about the topic

    3 reasons you know love what you are learning

    • Time passes fast.
    • -
    • You are anxious to finish this excercise and start the next one.
    • -
    • Is 12am and you don't want to go to sleep.
    • +
    • You are anxious to finish this exercise and start the next one.
    • +
    • It's 12am and you don't want to go to sleep.

    If you can't sleep, what better than watching videos of cats? From 4cb7d59020c03be3ae6c4945bf39e77e7aab6055 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 04:00:16 +0200 Subject: [PATCH 213/407] Update README.md --- exercises/07-Very-Specific-Rules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md index dc922179..ece42bb9 100644 --- a/exercises/07-Very-Specific-Rules/README.md +++ b/exercises/07-Very-Specific-Rules/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=2YkLDRZFk40" # **Important:** -In this exercise, you can add your code only above the **READ ONLY BLOCK** of the code, you can add as many lines as you want, but always above. +In this exercise, you can add your code only above the **READ-ONLY BLOCK** of the code, you can add as many lines as you want, but always above. ## 📝 Instructions: From 451b73a78255d8e67fba73c5cb8d306bc3fba79b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 04:03:47 +0200 Subject: [PATCH 214/407] Update README.es.md --- exercises/07-Very-Specific-Rules/README.es.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/README.es.md b/exercises/07-Very-Specific-Rules/README.es.md index 7ec14ada..b3ab50f4 100644 --- a/exercises/07-Very-Specific-Rules/README.es.md +++ b/exercises/07-Very-Specific-Rules/README.es.md @@ -1,21 +1,21 @@ -# `07` Reglas Muy Especificas +# `07` Reglas Muy Específicas ## **Importante:** -En este ejercicio, puedes agregar tu código solo arriba del **READ ONLY BLOCK** del código, puedes agregar tantas líneas como desees, pero siempre arriba. +En este ejercicio, puedes agregar tu código solo arriba del **READ-ONLY BLOCK** del código, puedes agregar tantas líneas como desees, pero siempre arriba. ## 📝 Instrucciones: -1. Establece el color de texto `ul` a rojo (`red`) (anula los conflictos siendo más específico). +1. Establece el color de texto `ul li` a rojo (`red`) (anula los conflictos siendo más específico). 2. Establece el color de fondo (`background-color`) del segundo `li` del `ol` a verde (`green`) (no uses el selector #id ni el .class). -3. Haz que las filas impares de las tablas tengan fondo amarillo usando `tr:nth-child`. +3. Haz que las filas impares de la tabla tengan fondo amarillo usando `tr:nth-child`. ![Example Image](../../.learn/assets/07-1.png?raw=true) >Importante: **NO** debes modificar el archivo index.html -## :bulb: Pista: +## 💡 Pista: -1. El atributo `!important` ayuda a sobreescribir stilos. \ No newline at end of file +1. El atributo `!important` ayuda a sobreescribir estilos. From 5f220ca22434de7cb23b601a4c7a280639d8bfcf Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:06:18 +0200 Subject: [PATCH 215/407] Update README.md --- exercises/08-Rounded-Image/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md index 7cedf6b1..c168c000 100644 --- a/exercises/08-Rounded-Image/README.md +++ b/exercises/08-Rounded-Image/README.md @@ -2,7 +2,7 @@ A lot of websites use rounded profile images, a technique that really makes a website more beautiful! -The obvious way create a rounded profile picture is to create an image tag and apply `border-radius:100%`. The problem with this approach, is that it only works for squared pictures... Profile pictures with different height and width will not look like a circle, they will look like ovals: +The obvious way to create a rounded profile picture is to create an image tag and apply `border-radius:100%`. The problem with this approach is that it only works for squared pictures... Profile pictures with different height and width will not look like a circle, they will look like ovals: ![Example Image](../../.learn/assets/08-1.png?raw=true) @@ -10,7 +10,7 @@ The obvious way create a rounded profile picture is to create an image tag and a 1. Use `border-radius`. -2. In this case, in addition to `border-radius`, you will have to use the `object-fit` css property, [here is an explanation](https://www.loom.com/share/15186e456dfd4741887997af40325721). +2. In this case, in addition to `border-radius`, you will have to use the `object-fit` CSS property, [here is an explanation](https://www.loom.com/share/15186e456dfd4741887997af40325721). ## 💡 Hint: @@ -19,4 +19,4 @@ The obvious way create a rounded profile picture is to create an image tag and a + You can also read [this great article about object fit](https://css-tricks.com/on-object-fit-and-object-position/) -+ Additionally you can [read the documentation on object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) and [the documentation on object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) \ No newline at end of file ++ Additionally you can [read the documentation on object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) and [the documentation on object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) From 846c7f7c06b3b76fa1be360bd2818c424f4af05c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:14:08 +0200 Subject: [PATCH 216/407] Update README.es.md --- exercises/08-Rounded-Image/README.es.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/08-Rounded-Image/README.es.md b/exercises/08-Rounded-Image/README.es.md index 3e7e4c25..a6d6c283 100644 --- a/exercises/08-Rounded-Image/README.es.md +++ b/exercises/08-Rounded-Image/README.es.md @@ -1,10 +1,10 @@ # `08` Imagen Redondeada -Muchos sitios web usan imágenes de perfil redondeadas ¡una técnica que realmente hace que un sitio web sea más hermoso! +Muchos sitios web usan imágenes de perfil redondeadas, ¡una técnica que realmente hace que un sitio web sea más hermoso! La forma obvia de crear una imagen de perfil redondeada es crear una etiqueta de imagen y aplicar un `border-radius: 100%`. -El problema con este enfoque es que solo funciona para imágenes cuadradas... Las imágenes de perfil generalmente tienen diferente altura y ancho no se verán como un círculo, se verán como óvalos: +El problema con este enfoque es que solo funciona para imágenes cuadradas... Las imágenes de perfil generalmente tienen diferente altura y ancho, no se verán como un círculo, se verán como óvalos: ![Example Image](../../.learn/assets/08-1.png?raw=true) @@ -12,12 +12,12 @@ El problema con este enfoque es que solo funciona para imágenes cuadradas... La 1. Usa `border-radius`. -2. Adicionalmente a `border-radius`, tenemos que también utilizar la propiedad `object-fit`, [aqui hay una explicación](https://www.loom.com/share/15186e456dfd4741887997af40325721). +2. Además de `border-radius`, tenemos que utilizar también la propiedad `object-fit`, [aquí hay una explicación](https://www.loom.com/share/15186e456dfd4741887997af40325721). ## 💡 Pista: -+ Si la imagen es más grande que su contenedor y quieres centrarla o enfocarte en una zona en particular puedes utilizar `object-position`. ++ Si la imagen es más grande que su contenedor y quieres centrarla o enfocarte en una zona en particular, puedes utilizar `object-position`. -+ En este articulo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/) ++ En este artículo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/) + Adicionalmente, puedes [leer la documentación de object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) y [la documentación de object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) From ef6879b6b5b0b126c38d4d7dcfeaa159713eff64 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:14:46 +0200 Subject: [PATCH 217/407] Update README.es.md --- exercises/08-Rounded-Image/README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/08-Rounded-Image/README.es.md b/exercises/08-Rounded-Image/README.es.md index a6d6c283..31f54e0a 100644 --- a/exercises/08-Rounded-Image/README.es.md +++ b/exercises/08-Rounded-Image/README.es.md @@ -18,6 +18,6 @@ El problema con este enfoque es que solo funciona para imágenes cuadradas... La + Si la imagen es más grande que su contenedor y quieres centrarla o enfocarte en una zona en particular, puedes utilizar `object-position`. -+ En este artículo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/) ++ En este artículo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/). -+ Adicionalmente, puedes [leer la documentación de object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) y [la documentación de object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) ++ Adicionalmente, puedes [leer la documentación de object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) y [la documentación de object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). From bda40ba4f68bd9060b4636778c8600c6f3ece74d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:15:05 +0200 Subject: [PATCH 218/407] Update README.md --- exercises/08-Rounded-Image/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md index c168c000..46631553 100644 --- a/exercises/08-Rounded-Image/README.md +++ b/exercises/08-Rounded-Image/README.md @@ -17,6 +17,6 @@ The obvious way to create a rounded profile picture is to create an image tag an + If the image ends up being bigger than its container (or with different proportions) you can adjust the `object-position` to choose what part of the image you want to display inside of the circle. -+ You can also read [this great article about object fit](https://css-tricks.com/on-object-fit-and-object-position/) ++ You can also read [this great article about object fit](https://css-tricks.com/on-object-fit-and-object-position/). -+ Additionally you can [read the documentation on object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) and [the documentation on object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) ++ Additionally you can [read the documentation on object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) and [the documentation on object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). From 4f57d99edf892d894c6334bf63e4de1f82c5c685 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:22:29 +0200 Subject: [PATCH 219/407] Update tests.js --- exercises/08-Rounded-Image/tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js index 70c5b643..9a0f3614 100644 --- a/exercises/08-Rounded-Image/tests.js +++ b/exercises/08-Rounded-Image/tests.js @@ -13,11 +13,11 @@ describe("All the styles should be applied", () => { const img = document.querySelector(".rounded") - test("the img tag should exist", () => { + test("The img tag should exist", () => { expect(img).toBeTruthy(); }) - test("the width in the img Tag should be equal to its height and vice versa", () => { + test("The width of the img tag should be equal to its height and vice versa", () => { document.querySelector( "head" ).innerHTML = ``; @@ -42,7 +42,7 @@ describe("All the styles should be applied", () => { expect(height).toBe(width); }); - test("the object-fit value of the img Tag should be 'cover'", () => { + test("The object-fit value of the img tag should be 'cover'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -51,7 +51,7 @@ describe("All the styles should be applied", () => { expect(imgStyle["object-fit"]).toBe("cover"); }); - test("the object-position value of the img Tag should be 'top'", () => { + test("The object-position value of the img tag should be 'top'", () => { document.querySelector( "head" ).innerHTML = ``; From efbfceabff62aad8777af3b886584a56629fd186 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:47:48 +0200 Subject: [PATCH 220/407] Update README.md --- exercises/09-Anchor-Styles/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/09-Anchor-Styles/README.md b/exercises/09-Anchor-Styles/README.md index 3ce04f9a..a4b23419 100644 --- a/exercises/09-Anchor-Styles/README.md +++ b/exercises/09-Anchor-Styles/README.md @@ -4,11 +4,11 @@ People like to feel that they are clicking on something, a great approach to acc ![Example Image](../../.learn/assets/09-1.png?raw=true) -You can control what css rules apply to each state of an anchor by using the `:hover` (for mouse hover) or `:active` (for mouse pressing) selectors, example: +You can control what CSS rules apply to each state of an anchor by using the `:hover` (for mouse hover) or `:active` (for mouse pressing) selectors, example: ```css a:active { - /* here you can specify whatever css rule that applies + /* here you can specify whatever CSS rule that applies to the anchor while being 'pressed' */ } ``` From d722beb901abb84bc488c0b64bdd3e673e4c83c8 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:54:00 +0200 Subject: [PATCH 221/407] Update README.es.md --- exercises/09-Anchor-Styles/README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/09-Anchor-Styles/README.es.md b/exercises/09-Anchor-Styles/README.es.md index 0164b06d..f700cee0 100644 --- a/exercises/09-Anchor-Styles/README.es.md +++ b/exercises/09-Anchor-Styles/README.es.md @@ -4,11 +4,11 @@ A las personas les gusta sentir que están haciendo clic en algo, una manera de ![Example Image](../../.learn/assets/09-1.png?raw=true) -Puedes controlar qué reglas css se aplican a cada estado de un `anchor` utilizando los selectores: `:hover` (para el mouse) o `active` (para presionar el mouse), por ejemplo: +Puedes controlar qué reglas CSS se aplican a cada estado de un `anchor` utilizando los selectores: `:hover` (cuando pasas por encima con el mouse) o `active` (cuando haces clic), por ejemplo: ```css a:active { - /* aquí puedes especificar cualquier regla de css que aplique al anchor mientras se presiona' */ + /* aquí puedes especificar cualquier regla de CSS que aplique al anchor mientras se presiona' */ } ``` From e99823bdd40bbd11c049b6a43f15ebd33c90274e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:57:45 +0200 Subject: [PATCH 222/407] Update tests.js --- exercises/09-Anchor-Styles/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/09-Anchor-Styles/tests.js b/exercises/09-Anchor-Styles/tests.js index 73192e4f..724de97d 100644 --- a/exercises/09-Anchor-Styles/tests.js +++ b/exercises/09-Anchor-Styles/tests.js @@ -20,14 +20,14 @@ describe("All the styles should be applied", () => { expect(cssArray).toBe(".threeDimension"); }) - test("the 'a' tag in the index.html should not be deleted", () => { + test("The 'a' tag in the index.html should not be deleted", () => { // we can read from the source code // console.log(html.toString()); expect(html.toString().indexOf(` -1).toBeTruthy(); }); - test("The border-color rule for the 'threeDimension active ' property should match the instruction color", () => { + test("The border-color rule for the 'a.threeDimension:active' selector should match the instruction color", () => { // get computed styles of any element you like // let cssArray=document.styleSheets[0].cssRules; document.querySelector( From 9898aa6f8711a2a86d508f6f81949df97a1aa325 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:09:39 +0200 Subject: [PATCH 223/407] Update README.md --- exercises/10-Your-Own-Font/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Your-Own-Font/README.md b/exercises/10-Your-Own-Font/README.md index 63c24dc3..bdc5c435 100644 --- a/exercises/10-Your-Own-Font/README.md +++ b/exercises/10-Your-Own-Font/README.md @@ -1,6 +1,6 @@ # `10` Your Own Font -Yo canfind Google Fonts here: https://fonts.google.com +You can find Google Fonts here: https://fonts.google.com Pick your favorite one, and then use it by linking your website with the URL in which the font is stored. You have to do that in the `` tag of the HTML document like this: From d853b26a953b4638f183000b3446b93a741526c9 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:10:30 +0200 Subject: [PATCH 224/407] Update README.md --- exercises/10-Your-Own-Font/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Your-Own-Font/README.md b/exercises/10-Your-Own-Font/README.md index bdc5c435..1c0f04e1 100644 --- a/exercises/10-Your-Own-Font/README.md +++ b/exercises/10-Your-Own-Font/README.md @@ -8,7 +8,7 @@ Pick your favorite one, and then use it by linking your website with the URL in ``` -After your font is linked you need to assign the `font-family` CSS rule to whatever you want to apply the font, for example an `

    `. +After your font is linked, you need to assign the `font-family` CSS rule to whatever you want to apply the font, for example an `

    `. ## 📝 Instructions: From b274d39676c2a39dbaa50664ab1a58651b36da04 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:21:46 +0200 Subject: [PATCH 225/407] Update solution.hide.html --- exercises/10-Your-Own-Font/solution.hide.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/10-Your-Own-Font/solution.hide.html b/exercises/10-Your-Own-Font/solution.hide.html index d1547a63..eeb1c059 100644 --- a/exercises/10-Your-Own-Font/solution.hide.html +++ b/exercises/10-Your-Own-Font/solution.hide.html @@ -3,12 +3,12 @@ - + - + 10 Your Own Font From ed7578e92cdd3c03a1ec031ed8f1fce3050c3ae2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:29:53 +0200 Subject: [PATCH 226/407] Update solution.hide.css --- exercises/10-Your-Own-Font/solution.hide.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Your-Own-Font/solution.hide.css b/exercises/10-Your-Own-Font/solution.hide.css index e36ebf08..c6d008bb 100644 --- a/exercises/10-Your-Own-Font/solution.hide.css +++ b/exercises/10-Your-Own-Font/solution.hide.css @@ -1,4 +1,4 @@ .myTitle { /*your code here*/ - font-family: "Roboto"; /*Varies depending on the font you chose*/ + font-family: "Montserrat"; /*Varies depending on the font you chose*/ } From 55b7b439f6b000a2f60da0a5213aa53fa71f6985 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:36:41 +0200 Subject: [PATCH 227/407] Update solution.hide.css --- exercises/10-Your-Own-Font/solution.hide.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/10-Your-Own-Font/solution.hide.css b/exercises/10-Your-Own-Font/solution.hide.css index c6d008bb..85e3a7c3 100644 --- a/exercises/10-Your-Own-Font/solution.hide.css +++ b/exercises/10-Your-Own-Font/solution.hide.css @@ -1,4 +1,4 @@ .myTitle { - /*your code here*/ - font-family: "Montserrat"; /*Varies depending on the font you chose*/ + /* Add your code below this line */ + font-family: "Montserrat"; /* Varies depending on the font you chose */ } From bc2a0a5c5259a1be8f84189eeb9b2361c948d8d9 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:41:07 +0200 Subject: [PATCH 228/407] Update tests.js --- exercises/10-Your-Own-Font/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js index 646f7192..f7c2460b 100644 --- a/exercises/10-Your-Own-Font/tests.js +++ b/exercises/10-Your-Own-Font/tests.js @@ -26,18 +26,18 @@ describe("All the styles should be applied", ()=>{ expect(orangeHoverSelector).toBeTruthy(); }); - test('the h1 tag should have a class "myTitle"', ()=>{ + test('The h1 tag should have a class "myTitle"', ()=>{ //or use query selector to compare hoy mane scriptags do we have const h = document.querySelector("h1"); expect(h.classList.contains("myTitle")).toBeTruthy(); }); - test("The link should be included in the head tag", ()=>{ + test("The google-font link should be included in the head tag", ()=>{ // let headContent=document.getElementsByTagName("*") expect(link.length).toBeGreaterThanOrEqual(2); }); - test("The Head tag should not includes a Style tag", ()=>{ + test("The head tag should not include a style tag", ()=>{ expect(html.toString().indexOf(` -1).toBeFalsy(); }); }); From f3b043492ee8ae44647cbe2d8e482a7696e8eaf5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:53:17 +0200 Subject: [PATCH 229/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index 2c09dbcd..bdee8776 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -4,7 +4,7 @@ As a developer/designer, you want to use certain icons to make your website easy But using icons can be frustrating and time-consuming because each icon is an image and working with images is horrible! -Font-awesome solve the "image" problem by creating a new font- each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. +Font-awesome solves the "image" problem by creating a new font- each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. After linking your website with font-awesome, you can use the following code to insert a specific icon: From b26d7b80ec6988928de316ea449a440099ace799 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 19:15:50 +0200 Subject: [PATCH 230/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index bdee8776..3dfe0831 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -4,7 +4,7 @@ As a developer/designer, you want to use certain icons to make your website easy But using icons can be frustrating and time-consuming because each icon is an image and working with images is horrible! -Font-awesome solves the "image" problem by creating a new font- each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. +Font-awesome solves the "image" problem by creating a new font where each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. After linking your website with font-awesome, you can use the following code to insert a specific icon: From 8aa689283b1cb05cc752bafdf46a5b52877a0cf6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 19:28:22 +0200 Subject: [PATCH 231/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index 3dfe0831..3db6538b 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -12,7 +12,7 @@ After linking your website with font-awesome, you can use the following code to -You can find all the available names here: http://fontawesome.io/icons/ +You can find all the available icons here: http://fontawesome.io/icons/ ``` ## 📝 Instructions: From 8c67d139bcd89554b19aed86a4dfcbf0a70bbfb0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:12:00 +0200 Subject: [PATCH 232/407] Update README.es.md --- exercises/11-Font-Awesome-Icons/README.es.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/README.es.md b/exercises/11-Font-Awesome-Icons/README.es.md index 23c21ced..324d713e 100644 --- a/exercises/11-Font-Awesome-Icons/README.es.md +++ b/exercises/11-Font-Awesome-Icons/README.es.md @@ -2,19 +2,19 @@ Como desarrollador, querrás utilizar ciertos iconos para que tu sitio web sea fácil de entender. Por ejemplo, sabemos que el icono de "papelera" significa "eliminar". -¡Pero usar iconos puede ser frustrante y llevar mucho tiempo! porque cada icono es una imagen y trabajar con imágenes ¡es horrible! +¡Pero usar iconos puede ser frustrante y llevar mucho tiempo! Porque cada icono es una imagen y trabajar con imágenes ¡es horrible! -Font-awesome resuelve el problema de la "imagen" creando una nueva fuente en donde cada letra es un ícono diferente y ahora puedes importar toda la fuente desde el sitio web y usar el ícono que quieras. +Font-awesome resuelve el problema de la "imagen" creando una nueva fuente en donde cada letra es un icono diferente y ahora puedes importar toda la fuente a tu sitio web y usar el icono que quieras. Después de vincular tu sitio web con font-awesome, puedes usar lo siguiente para codificar e insertar un icono específico: ```html - - -Puedes encontrar todos los nombres disponibles aquí: http://fontawesome.io/icons/ + ``` +*Puedes encontrar todos los iconos disponibles aquí: http://fontawesome.io/icons/* + ## 📝 Instrucciones: From 7d60faffec2556c879a4e68b2156e10e39fdb659 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:13:42 +0200 Subject: [PATCH 233/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index 3db6538b..8144a004 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -11,10 +11,10 @@ After linking your website with font-awesome, you can use the following code to ```html - -You can find all the available icons here: http://fontawesome.io/icons/ ``` +*You can find all the available icons here: http://fontawesome.io/icons/* + ## 📝 Instructions: 1. Add two more items into your list and add a different icon at the beginning of each item. From 20e71b07b361e1dbcc4bd31e3dcb6ef1705ea7a1 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:13:56 +0200 Subject: [PATCH 234/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index 8144a004..a70f4531 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -13,7 +13,7 @@ After linking your website with font-awesome, you can use the following code to ``` -*You can find all the available icons here: http://fontawesome.io/icons/* +> *You can find all the available icons here: http://fontawesome.io/icons/* ## 📝 Instructions: From e913fb354bb3a7874d9b4ec3d27c3c1ef49ddaf2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:14:36 +0200 Subject: [PATCH 235/407] Update README.es.md --- exercises/11-Font-Awesome-Icons/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.es.md b/exercises/11-Font-Awesome-Icons/README.es.md index 324d713e..719b9b17 100644 --- a/exercises/11-Font-Awesome-Icons/README.es.md +++ b/exercises/11-Font-Awesome-Icons/README.es.md @@ -13,7 +13,7 @@ Después de vincular tu sitio web con font-awesome, puedes usar lo siguiente par ``` -*Puedes encontrar todos los iconos disponibles aquí: http://fontawesome.io/icons/* +> *Puedes encontrar todos los iconos disponibles aquí: http://fontawesome.io/icons/* ## 📝 Instrucciones: From baacdf4585f170f2e0f4f55309cefd827d627386 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:18:54 +0200 Subject: [PATCH 236/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index a70f4531..4d935144 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -13,7 +13,7 @@ After linking your website with font-awesome, you can use the following code to ``` -> *You can find all the available icons here: http://fontawesome.io/icons/* +> *You can find all the available icons here: https://fontawesome.com/search?o=r&m=free* ## 📝 Instructions: From cb8871ba53b542985f00fc8c3ad38e86ec339c9f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:20:15 +0200 Subject: [PATCH 237/407] Update README.es.md --- exercises/11-Font-Awesome-Icons/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.es.md b/exercises/11-Font-Awesome-Icons/README.es.md index 719b9b17..8e658c02 100644 --- a/exercises/11-Font-Awesome-Icons/README.es.md +++ b/exercises/11-Font-Awesome-Icons/README.es.md @@ -13,7 +13,7 @@ Después de vincular tu sitio web con font-awesome, puedes usar lo siguiente par ``` -> *Puedes encontrar todos los iconos disponibles aquí: http://fontawesome.io/icons/* +> *Puedes encontrar todos los iconos disponibles aquí: https://fontawesome.com/search?o=r&m=free* ## 📝 Instrucciones: From d7c8138c0651a8116bde522a445ef9fe5d57cb95 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:26:24 +0200 Subject: [PATCH 238/407] Update solution.hide.html --- exercises/11-Font-Awesome-Icons/solution.hide.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/solution.hide.html b/exercises/11-Font-Awesome-Icons/solution.hide.html index e9778b12..431e6b22 100644 --- a/exercises/11-Font-Awesome-Icons/solution.hide.html +++ b/exercises/11-Font-Awesome-Icons/solution.hide.html @@ -11,7 +11,7 @@
    • Hello
    • Hello
    • -
    • Hello
    • +
    • Hello
    From 51133d5c33d66dd6f66bb7a41f37db9eb2a92efa Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:35:51 +0200 Subject: [PATCH 239/407] Update tests.js --- exercises/11-Font-Awesome-Icons/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 075d2f0e..56072996 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -10,7 +10,7 @@ let cssArray = null; describe("All the styles should be applied", ()=>{ const icons = document.querySelectorAll("i"); - test("ul tag should exists", ()=>{ + test("the ul tag should exist", ()=>{ expect(document.querySelector("ul")).toBeTruthy(); }); test("At least 3 li tags should exist", ()=>{ @@ -19,14 +19,14 @@ describe("All the styles should be applied", ()=>{ test("At least 3 i tags should exist", ()=>{ expect(document.querySelectorAll("i").length).toBe(3); }); - test(" LI innerHTML exist", ()=>{ + test("There should be some text on the li tags", ()=>{ expect(document.querySelector("li")).toBeTruthy(); const li = document.querySelectorAll("li"); for (let i = 0; i < li.length; i++) { expect(li[i].innerHTML).toBeTruthy(); } }); - test('the i tag(s) should have Font Awesome class(es) starting with "fa" | ex. "fa-solid"', ()=>{ + test('The i tags should have any Font Awesome class starting with "fa" | ex. "fa-solid"', ()=>{ //or use query selector to compare hoy mane scriptags do we have expect(icons).toBeTruthy(); From 37682cde249164ff47e18d4ebbd237dffa933514 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:37:57 +0200 Subject: [PATCH 240/407] Update tests.js --- exercises/11-Font-Awesome-Icons/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 56072996..682064c8 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -10,7 +10,7 @@ let cssArray = null; describe("All the styles should be applied", ()=>{ const icons = document.querySelectorAll("i"); - test("the ul tag should exist", ()=>{ + test("The ul tag should exist", ()=>{ expect(document.querySelector("ul")).toBeTruthy(); }); test("At least 3 li tags should exist", ()=>{ From db6c0be20dbef960e30c1a41763d6ad1d5c6167c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:39:17 +0200 Subject: [PATCH 241/407] Update README.es.md --- exercises/11-Font-Awesome-Icons/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.es.md b/exercises/11-Font-Awesome-Icons/README.es.md index 8e658c02..14ad44c3 100644 --- a/exercises/11-Font-Awesome-Icons/README.es.md +++ b/exercises/11-Font-Awesome-Icons/README.es.md @@ -4,7 +4,7 @@ Como desarrollador, querrás utilizar ciertos iconos para que tu sitio web sea f ¡Pero usar iconos puede ser frustrante y llevar mucho tiempo! Porque cada icono es una imagen y trabajar con imágenes ¡es horrible! -Font-awesome resuelve el problema de la "imagen" creando una nueva fuente en donde cada letra es un icono diferente y ahora puedes importar toda la fuente a tu sitio web y usar el icono que quieras. +Font Awesome resuelve el problema de la "imagen" creando una nueva fuente en donde cada letra es un icono diferente y ahora puedes importar toda la fuente a tu sitio web y usar el icono que quieras. Después de vincular tu sitio web con font-awesome, puedes usar lo siguiente para codificar e insertar un icono específico: From 59e1e6c4e7dcc6d3327a2018abd8ac38547f02f1 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:39:43 +0200 Subject: [PATCH 242/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index 4d935144..e2d1efdc 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -4,7 +4,7 @@ As a developer/designer, you want to use certain icons to make your website easy But using icons can be frustrating and time-consuming because each icon is an image and working with images is horrible! -Font-awesome solves the "image" problem by creating a new font where each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. +Font Awesome solves the "image" problem by creating a new font where each letter is a different icon and you can now import the whole font into your website and use whatever icon you want. After linking your website with font-awesome, you can use the following code to insert a specific icon: From b6a29ef318c5b66b17fc399fbc28c4bca27b273f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:42:50 +0200 Subject: [PATCH 243/407] Update styles.css --- exercises/11-Font-Awesome-Icons/styles.css | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/11-Font-Awesome-Icons/styles.css b/exercises/11-Font-Awesome-Icons/styles.css index b22aedca..52fe9b9c 100644 --- a/exercises/11-Font-Awesome-Icons/styles.css +++ b/exercises/11-Font-Awesome-Icons/styles.css @@ -1,3 +1,4 @@ li { + font-size: 2.5rem; list-style: none; } From c4cfa607c0404e911f46c3430388cd8141643540 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:51:36 +0200 Subject: [PATCH 244/407] Update README.es.md --- exercises/11-Font-Awesome-Icons/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.es.md b/exercises/11-Font-Awesome-Icons/README.es.md index 14ad44c3..2a78a9b0 100644 --- a/exercises/11-Font-Awesome-Icons/README.es.md +++ b/exercises/11-Font-Awesome-Icons/README.es.md @@ -18,5 +18,5 @@ Después de vincular tu sitio web con font-awesome, puedes usar lo siguiente par ## 📝 Instrucciones: -Agrega dos elementos más a tu lista(`li`) y agrega un icono diferente al comienzo de cada elemento. +Agrega dos elementos (`li`) más a tu lista y agrega un icono diferente al comienzo de cada elemento. From baa20e6a1e356abe07cee8ef2f7478ed8d4c3950 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:52:05 +0200 Subject: [PATCH 245/407] Update README.md --- exercises/11-Font-Awesome-Icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md index e2d1efdc..f9c7c09f 100644 --- a/exercises/11-Font-Awesome-Icons/README.md +++ b/exercises/11-Font-Awesome-Icons/README.md @@ -17,5 +17,5 @@ After linking your website with font-awesome, you can use the following code to ## 📝 Instructions: -1. Add two more items into your list and add a different icon at the beginning of each item. +1. Add two more items (`li`) into your list and add a different icon at the beginning of each item. From d2e0f14dce20dade95aeb7dd8107067e537cc57c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 22:03:19 +0200 Subject: [PATCH 246/407] Update README.md --- exercises/10-Your-Own-Font/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Your-Own-Font/README.md b/exercises/10-Your-Own-Font/README.md index 1c0f04e1..e2632833 100644 --- a/exercises/10-Your-Own-Font/README.md +++ b/exercises/10-Your-Own-Font/README.md @@ -5,7 +5,7 @@ You can find Google Fonts here: https://fonts.google.com Pick your favorite one, and then use it by linking your website with the URL in which the font is stored. You have to do that in the `` tag of the HTML document like this: ```Plain/Text - + ``` After your font is linked, you need to assign the `font-family` CSS rule to whatever you want to apply the font, for example an `

    `. From e824aab7854c1180305ec6c30647cd44d4ed3b99 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 22:03:58 +0200 Subject: [PATCH 247/407] Update README.es.md --- exercises/10-Your-Own-Font/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Your-Own-Font/README.es.md b/exercises/10-Your-Own-Font/README.es.md index 16e4ab9a..bebc2839 100644 --- a/exercises/10-Your-Own-Font/README.es.md +++ b/exercises/10-Your-Own-Font/README.es.md @@ -5,7 +5,7 @@ Aquí puedes encontrar las fuentes de Google: https://fonts.google.com Elige la que más te guste, y úsala vinculando tu sitio web con la URL en la que se almacena la fuente. Tienes que hacer eso en la etiqueta `` del documento HTML de esta manera: ```Plain/Text - + ``` Después de vincular tu fuente, debes asignar la regla CSS `font-family` a lo que quieras aplicarle la fuente, por ejemplo, un `

    `. From b09e86c79aa398cc4e0f7d316ea9a2ab9f1de6e5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 5 Apr 2023 23:55:03 +0200 Subject: [PATCH 248/407] Update tests.js --- exercises/11-Font-Awesome-Icons/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index 682064c8..a1e11eee 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -19,7 +19,7 @@ describe("All the styles should be applied", ()=>{ test("At least 3 i tags should exist", ()=>{ expect(document.querySelectorAll("i").length).toBe(3); }); - test("There should be some text on the li tags", ()=>{ + test("The i tags should be inside the li tags", ()=>{ expect(document.querySelector("li")).toBeTruthy(); const li = document.querySelectorAll("li"); for (let i = 0; i < li.length; i++) { From 96004a3008f5ccc5437fada7e0be1b30b91f90c9 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 6 Apr 2023 20:20:19 +0000 Subject: [PATCH 249/407] updated instructions for clarity --- exercises/04-Class-Selector/README.es.md | 2 +- exercises/04-Class-Selector/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04-Class-Selector/README.es.md b/exercises/04-Class-Selector/README.es.md index e3d7f2a5..e8bd37ae 100644 --- a/exercises/04-Class-Selector/README.es.md +++ b/exercises/04-Class-Selector/README.es.md @@ -18,6 +18,6 @@ Usa la propiedad `class` del elemento HTML para seleccionarlo. Las reglas de est ## 📝 Instrucciones: En este momento hay una clase seleccionada en el CSS llamada -`.b-blue`. +`b-blue`. Por favor aplica la clase a ambas etiquetas HTML `

    `. diff --git a/exercises/04-Class-Selector/README.md b/exercises/04-Class-Selector/README.md index d0f7ccae..0dd45e76 100644 --- a/exercises/04-Class-Selector/README.md +++ b/exercises/04-Class-Selector/README.md @@ -22,7 +22,7 @@ Use the class property of the HTML element to select it. Styling rules will appl ## 📝 Instructions: -Right now there is a class selected on the CSS that is called `.b-blue`. +Right now there is a class selected on the CSS that is called `b-blue`. Please apply that class to both of the HTML `

    ` tags. From 489a61e3c549c4f154c1b0d83b0f94746355ebd5 Mon Sep 17 00:00:00 2001 From: lorenagubaira <102861577+Lorenagubaira@users.noreply.github.com> Date: Mon, 10 Apr 2023 17:28:37 +0000 Subject: [PATCH 250/407] codespace reference --- README.es.md | 6 ++++-- README.md | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.es.md b/README.es.md index a7cbcdf7..209bf0f3 100644 --- a/README.es.md +++ b/README.es.md @@ -40,9 +40,11 @@ Una completa selección de Ejercicios autograduados sobre CSS ¡para cualquier interesado en aprender CSS! -## Instalación en un clic +## Instalación en un clic (recomendado) -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/4GeeksAcademy/css-tutorial-exercises-course) +Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/css-layouts-tutorial-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/css-layouts-tutorial-exercises.git). + +> Una vez ya tengas abirto VSCode los ejercicios de LearnPack deberían empezar automáticamente, si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start` ## Instalación manual diff --git a/README.md b/README.md index a2d3ef40..87813aca 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Hi! I'm [Alejandro Sanchez @alesanchezr](https://github.com/alesanchezr), really excited to have you here! 🎉 😂 Learning to code is hard, you need coaching! [DM me on twitter](https://twitter.com/alesanchezr) if you have any questions. +*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/master/README.es.md) :es:* + ## You'll be learning the following concepts: 1. How to apply CSS to your website in 3 different ways: Inline, by grouping them together inside a ``; @@ -42,7 +42,7 @@ describe("All the styles should be applied", () => { expect(height).toBe(width); }); - test("The object-fit value of the img tag should be 'cover'", () => { + test("The object-fit value of the tag should be 'cover'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -51,7 +51,7 @@ describe("All the styles should be applied", () => { expect(imgStyle["object-fit"]).toBe("cover"); }); - test("The object-position value of the img tag should be 'top'", () => { + test("The object-position value of the tag should be 'top'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -60,7 +60,7 @@ describe("All the styles should be applied", () => { expect(imgStyle["object-position"]).toBe("top"); }); - test("You should not change the existing head tag elements", () => { + test("You should not change the existing tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() From 8faa4093e4d4cfd8525ad4ed6a889b40ea62e5b3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 17:54:33 +0200 Subject: [PATCH 261/407] Update README.es.md --- exercises/08-Rounded-Image/README.es.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/08-Rounded-Image/README.es.md b/exercises/08-Rounded-Image/README.es.md index 31f54e0a..a1b3d8d9 100644 --- a/exercises/08-Rounded-Image/README.es.md +++ b/exercises/08-Rounded-Image/README.es.md @@ -12,7 +12,9 @@ El problema con este enfoque es que solo funciona para imágenes cuadradas... La 1. Usa `border-radius`. -2. Además de `border-radius`, tenemos que utilizar también la propiedad `object-fit`, [aquí hay una explicación](https://www.loom.com/share/15186e456dfd4741887997af40325721). +2. Usa las propiedades `width` y `height` para hacer que la imagen sea cuadrada. + +3. Además de `border-radius`, tenemos que utilizar también la propiedad `object-fit`, [aquí hay una explicación](https://www.loom.com/share/15186e456dfd4741887997af40325721). ## 💡 Pista: From 4b9074972f8ff1dc00fd44d1395e84def032132b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 17:57:21 +0200 Subject: [PATCH 262/407] Update README.md --- exercises/08-Rounded-Image/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md index 46631553..f3074a62 100644 --- a/exercises/08-Rounded-Image/README.md +++ b/exercises/08-Rounded-Image/README.md @@ -10,7 +10,9 @@ The obvious way to create a rounded profile picture is to create an image tag an 1. Use `border-radius`. -2. In this case, in addition to `border-radius`, you will have to use the `object-fit` CSS property, [here is an explanation](https://www.loom.com/share/15186e456dfd4741887997af40325721). +2. Use the properties `width` and `height` to make the image square shaped. + +3. In this case, in addition to `border-radius`, you will have to use the `object-fit` CSS property, [here is an explanation](https://www.loom.com/share/15186e456dfd4741887997af40325721). ## 💡 Hint: From 4a39434ee6fe5d421aef6ad10cc95bb3e9c6e7a2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:02:49 +0200 Subject: [PATCH 263/407] Update test.js --- exercises/04.3-id-Selector/test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/04.3-id-Selector/test.js b/exercises/04.3-id-Selector/test.js index adc3f260..ed2b823e 100644 --- a/exercises/04.3-id-Selector/test.js +++ b/exercises/04.3-id-Selector/test.js @@ -8,24 +8,24 @@ jest.dontMock('fs'); const span = document.querySelector("span"); const link = document.querySelector("link"); -test("There should be a span tag", () => { +test("There should be a tag", () => { expect(span).toBeTruthy() }); -test("The span tag should have the id 'button1'", () => { +test("The tag should have the id 'button1'", () => { expect(span).toBeTruthy(); let id = span.id expect(id).toBeTruthy(); expect(id).toBe('button1'); }); -test("The span tag should not contain any inline style", () => { +test("The tag should not contain any inline style", () => { let emptyBodyInlineStyle = {}; expect(span).toBeTruthy() expect(span.style._values).toEqual(emptyBodyInlineStyle); }); -test("You should not change the existing head tag elements", () => { +test("You should not change the existing tag elements", () => { let head = document.querySelector('head'); expect(head).toBeTruthy(); From 7810dfeab3cccd458eccdfb087947e4a169a63ef Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:03:53 +0200 Subject: [PATCH 264/407] Update tests.js --- exercises/05-Specificity/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js index f3f8b814..a09aa84a 100644 --- a/exercises/05-Specificity/tests.js +++ b/exercises/05-Specificity/tests.js @@ -8,7 +8,7 @@ jest.dontMock('fs'); describe("All the styles should be applied", function () { - test("You should not change the existing head tag elements", function () { + test("You should not change the existing tag elements", function () { let head = document.querySelector('head') expect(head).toBeTruthy() From c8c602e1f84aafa675c5b34660233ed132b94d32 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:06:21 +0200 Subject: [PATCH 265/407] Update tests.js --- exercises/06-Practicing-Rules/tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js index d9fd4156..e691255c 100644 --- a/exercises/06-Practicing-Rules/tests.js +++ b/exercises/06-Practicing-Rules/tests.js @@ -37,7 +37,7 @@ describe("All the styles should be applied", () => { let styles = window.getComputedStyle(body); expect(styles["padding-left"]).toBe("20px"); }); - test("The font-family in the h1 tag should be 'Courier'", () => { + test("The font-family in the

    tag should be 'Courier'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -46,7 +46,7 @@ describe("All the styles should be applied", () => { // get computed styles of any element you like expect(h1TagStyles["font-family"].toLowerCase()).toBe("\"courier\""); }); - test("The color in the h1 tag should be 'red'", () => { + test("The color in the

    tag should be 'red'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -55,7 +55,7 @@ describe("All the styles should be applied", () => { // get computed styles of any element you like expect(h1TagStyles["color"]).toBe("red"); }); - test("the text-decoration in the h2 tag should be 'underline'", () => { + test("the text-decoration in the

    tag should be 'underline'", () => { document.querySelector( "head" ).innerHTML = ``; @@ -102,7 +102,7 @@ describe("All the styles should be applied", () => { } expect(orangeHoverSelector).toBe('green'); }); - test("You should not change the existing head tag elements", () => { + test("You should not change the existing tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() From 31640a5e7e739994d2b9adc2c9948ba9c3594f0a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:19:39 +0200 Subject: [PATCH 266/407] Update solution.hide.css --- exercises/09-Anchor-Styles/solution.hide.css | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/09-Anchor-Styles/solution.hide.css b/exercises/09-Anchor-Styles/solution.hide.css index 101d281c..8c12ea5b 100644 --- a/exercises/09-Anchor-Styles/solution.hide.css +++ b/exercises/09-Anchor-Styles/solution.hide.css @@ -7,6 +7,7 @@ text-decoration: none; text-align: center; color: black; + font-size: 22px; } a.threeDimension:active { From 963ebaa133f189b1fb74153b18712a048f109fd6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:20:19 +0200 Subject: [PATCH 267/407] Update styles.css --- exercises/09-Anchor-Styles/styles.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/09-Anchor-Styles/styles.css b/exercises/09-Anchor-Styles/styles.css index 7eaa9bea..895dc3d6 100644 --- a/exercises/09-Anchor-Styles/styles.css +++ b/exercises/09-Anchor-Styles/styles.css @@ -8,9 +8,10 @@ text-decoration: none; text-align: center; color: black; + font-size: 22px; } a.threeDimension:active { /* your code here*/ -} \ No newline at end of file +} From 1a03a658634f9e2c07cabc4c4a1991725578d617 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:23:27 +0200 Subject: [PATCH 268/407] Update tests.js --- exercises/09-Anchor-Styles/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/09-Anchor-Styles/tests.js b/exercises/09-Anchor-Styles/tests.js index 724de97d..1dea80c1 100644 --- a/exercises/09-Anchor-Styles/tests.js +++ b/exercises/09-Anchor-Styles/tests.js @@ -20,7 +20,7 @@ describe("All the styles should be applied", () => { expect(cssArray).toBe(".threeDimension"); }) - test("The 'a' tag in the index.html should not be deleted", () => { + test("The tag in the index.html should not be deleted", () => { // we can read from the source code // console.log(html.toString()); expect(html.toString().indexOf(` -1).toBeTruthy(); @@ -71,7 +71,7 @@ describe("All the styles should be applied", () => { }); - test("You should not change the existing head tag elements", () => { + test("You should not change the existing tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() From e09f4394dc748c58c6cc5e1ee408f7a609cbcef8 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:29:37 +0200 Subject: [PATCH 269/407] Update test.js --- exercises/01.1-The-Style-Tag/test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/01.1-The-Style-Tag/test.js b/exercises/01.1-The-Style-Tag/test.js index a4be505b..0b3c714b 100644 --- a/exercises/01.1-The-Style-Tag/test.js +++ b/exercises/01.1-The-Style-Tag/test.js @@ -7,16 +7,16 @@ jest.dontMock('fs'); const p = document.querySelector("p"); -test("There should be a p tag", ()=>{ +test("There should be a

    tag", ()=>{ expect(p).toBeTruthy(); }) -test("The p tag color should be blue", ()=>{ +test("The

    tag color should be blue", ()=>{ let styles = window.getComputedStyle(p); expect(styles["color"]).toBe("blue"); }); -test("The p tag should not contain any inline style", ()=>{ +test("The

    tag should not contain any inline style", ()=>{ let emptyBodyInlineStyle = {}; expect(p.style._values).toEqual(emptyBodyInlineStyle); -}); \ No newline at end of file +}); From 9ecb581595a0dc757ae532212cd4c03b858b3c03 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:31:03 +0200 Subject: [PATCH 270/407] Update tests.js --- exercises/01.2-Your-First-Style/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/01.2-Your-First-Style/tests.js b/exercises/01.2-Your-First-Style/tests.js index 0eabdf65..32bf609b 100644 --- a/exercises/01.2-Your-First-Style/tests.js +++ b/exercises/01.2-Your-First-Style/tests.js @@ -13,7 +13,7 @@ describe("All the styles should be applied", ()=>{ expect(styles["color"]).toBe("yellow"); }); - test("The body tag should not contain any inline style", ()=>{ + test("The tag should not contain any inline style", ()=>{ let bodyInlineStyle = document.getElementsByTagName("body"); let emptyBodyInlineStyle = {}; expect(bodyInlineStyle[0].style._values).toEqual(emptyBodyInlineStyle); @@ -24,7 +24,7 @@ describe("All the styles should be applied", ()=>{ expect(a.style._values).toEqual(emptyBodyInlineStyle); }); - test("You should not change the existing head tag elements", ()=>{ + test("You should not change the existing tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() From 2cd2ff5aa6bfd125bf781e0691755660d3baac4a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:32:06 +0200 Subject: [PATCH 271/407] Update tests.js --- exercises/02-Separate-Stylesheet/tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/02-Separate-Stylesheet/tests.js b/exercises/02-Separate-Stylesheet/tests.js index e3f44fc4..2a46c829 100644 --- a/exercises/02-Separate-Stylesheet/tests.js +++ b/exercises/02-Separate-Stylesheet/tests.js @@ -10,13 +10,13 @@ describe("All the styles should be applied", ()=>{ const link = document.querySelector("link"); const body = document.querySelector("body"); - test("The body tag should not contain any inline style", ()=>{ + test("The tag should not contain any inline style", ()=>{ document.querySelector("head").innerHTML = ``; let emptyBodyInlineStyle={}; expect(body.style._values).toEqual(emptyBodyInlineStyle) }); - test("You should not change the existing head tag elements", ()=>{ + test("You should not change the existing tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() @@ -27,7 +27,7 @@ describe("All the styles should be applied", ()=>{ expect(href).toEqual('./styles.css') }); - test("Your body tag background color should be blue", ()=>{ + test("Your tag background color should be blue", ()=>{ let styles = window.getComputedStyle(body) expect(styles["background-color"]).toBe("blue") }) From 58022d125dc64847b5163ea9cbc197200cc4a157 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:33:18 +0200 Subject: [PATCH 272/407] Update tests.js --- exercises/02.1-Background/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js index eacf944a..b0612a23 100644 --- a/exercises/02.1-Background/tests.js +++ b/exercises/02.1-Background/tests.js @@ -11,7 +11,7 @@ describe("All the styles should be applied", ()=>{ const link = document.querySelector("link"); const title = document.querySelector('title'); - test("The body tag should not contain any inline style", ()=>{ + test("The tag should not contain any inline style", ()=>{ document.querySelector( "head" ).innerHTML = ``; @@ -37,7 +37,7 @@ describe("All the styles should be applied", ()=>{ expect(styles["background-repeat"]).toBe("repeat"); }); - test("You should not change the existing head tag elements", ()=>{ + test("You should not change the existing tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() From 1d76734376f1bdbc0bdad0805045b01e45d6359d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:35:48 +0200 Subject: [PATCH 273/407] Update tests.js --- exercises/03-Inline-Styles/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Inline-Styles/tests.js b/exercises/03-Inline-Styles/tests.js index af82a4b3..e37fcb80 100644 --- a/exercises/03-Inline-Styles/tests.js +++ b/exercises/03-Inline-Styles/tests.js @@ -7,7 +7,7 @@ jest.dontMock("fs"); describe("The Table tag should contain inline style background: green", ()=>{ - test("You should not change the existing head tag elements", ()=>{ + test("You should not change the existing tag elements", ()=>{ let head = document.querySelector('head') expect(head).toBeTruthy() From 2be6b49a03b7b80b514529a58f48f33f6f1811f7 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:36:58 +0200 Subject: [PATCH 274/407] Update test.js --- exercises/04-Class-Selector/test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/04-Class-Selector/test.js b/exercises/04-Class-Selector/test.js index bd342616..320b80ea 100644 --- a/exercises/04-Class-Selector/test.js +++ b/exercises/04-Class-Selector/test.js @@ -6,10 +6,10 @@ document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("Both p tags should have a blue background", () => { +describe("Both

    tags should have a blue background", () => { const body = document.querySelector("body") const p = document.querySelectorAll("p"); - test("You should not change the existing head tag elements", () => { + test("You should not change the existing tag elements", () => { let head = document.querySelector('head') expect(head).toBeTruthy() @@ -20,7 +20,7 @@ describe("Both p tags should have a blue background", () => { expect(title).toBe('04 Class selector') }); - test("The body tag should not contain any inline style", () => { + test("The tag should not contain any inline style", () => { document.querySelector( "head" ).innerHTML = ``; @@ -28,10 +28,10 @@ describe("Both p tags should have a blue background", () => { expect(body.style._values).toEqual(emptyBodyInlineStyle) }); - test("There should be two p tags", () => { + test("There should be two

    tags", () => { expect(p.length).toBe(2) }); - test("Both p tags should have a class name 'b-blue'", () => { + test("Both

    tags should have a class name 'b-blue'", () => { p.forEach(e=>{ let eClass = e.getAttribute("class"); expect(eClass).toBe("b-blue") From f5f4148debd506029d51d8557af2103e1fdb09c6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:38:13 +0200 Subject: [PATCH 275/407] Update tests.js --- exercises/04.1-Combined-Rules/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04.1-Combined-Rules/tests.js b/exercises/04.1-Combined-Rules/tests.js index ab8cc62f..e325ce5f 100644 --- a/exercises/04.1-Combined-Rules/tests.js +++ b/exercises/04.1-Combined-Rules/tests.js @@ -11,7 +11,7 @@ describe("All the styles should be applied", ()=> { const link = document.querySelector("link"); const title = document.querySelector('title'); - test("The body tag should not contain any inline style", ()=> { + test("The tag should not contain any inline style", ()=> { document.querySelector( "head" ).innerHTML = ``; @@ -113,7 +113,7 @@ describe("All the styles should be applied", ()=> { expect(padLeft).toBeFalsy(); }); - test("You should not change the existing head tag elements", ()=> { + test("You should not change the existing tag elements", ()=> { let head = document.querySelector('head') expect(head).toBeTruthy() From d78f767fe2c84dd8d86dee46dd6c008b95ec8667 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:41:25 +0200 Subject: [PATCH 276/407] Update tests.js --- exercises/11-Font-Awesome-Icons/tests.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js index a1e11eee..b481bcfc 100644 --- a/exercises/11-Font-Awesome-Icons/tests.js +++ b/exercises/11-Font-Awesome-Icons/tests.js @@ -10,23 +10,23 @@ let cssArray = null; describe("All the styles should be applied", ()=>{ const icons = document.querySelectorAll("i"); - test("The ul tag should exist", ()=>{ + test("The