+
+
diff --git a/exercises/01-inline-styles/tests.js b/exercises/01-inline-styles/tests.js
new file mode 100644
index 00000000..a41ccc11
--- /dev/null
+++ b/exercises/01-inline-styles/tests.js
@@ -0,0 +1,23 @@
+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');
+
+// Run the tests
+test("There should be a table element", () => {
+ const table = document.querySelector("table");
+ expect(table).toBeTruthy();
+});
+
+test("The table background color should be green", () => {
+ const table = document.querySelector("table");
+ const computedStyles = window.getComputedStyle(table);
+ expect(computedStyles.backgroundColor).toBe("green");
+});
+
+test("There should be two table rows", () => {
+ const rows = document.querySelectorAll("tr");
+ expect(rows.length).toBe(2);
+});
\ No newline at end of file
diff --git a/exercises/01.1-The-Style-Tag/README.es.md b/exercises/01.1-The-Style-Tag/README.es.md
deleted file mode 100644
index cb1003a4..00000000
--- a/exercises/01.1-The-Style-Tag/README.es.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# `01.1` Etiqueta Style
-
-Si quieres añadir estilos a tu sitio web escribiendo CSS siempre debes hacerlo dentro de una etiqueta `
-```
-
-## 📝 Instruccciones:
-
-1. Añade una etiqueta `
-```
-
-## 📝 Instructions
-
-1. Add a ``;
- 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);
- });
-
- 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 () {
- 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')
- })
-});
diff --git a/exercises/02-style-tag/README.es.md b/exercises/02-style-tag/README.es.md
new file mode 100644
index 00000000..69fe679c
--- /dev/null
+++ b/exercises/02-style-tag/README.es.md
@@ -0,0 +1,38 @@
+---
+tutorial: "https://www.youtube.com/watch?v=9WrVN0rOg_k"
+---
+# `02` Style tag in CSS
+
+Otra manera que existe de aplicar estilos es utilizar una etiqueta `
+Click me to open google.com
+```
+
+Tenemos un enlace de HTML `` que lleva a las personas a google.com cuando se hace clic.
+Usamos CSS para seleccionar todas las etiquetas `` y luego hacerlas rosa (`pink`).
+
+## 📝 Instrucciones:
+
+1. Pega este código en tu sitio web para ver los resultados.
+
+## 💻 Vista previa:
+
+Debería verse así:
+
+
diff --git a/exercises/02-style-tag/README.md b/exercises/02-style-tag/README.md
new file mode 100644
index 00000000..40cef99d
--- /dev/null
+++ b/exercises/02-style-tag/README.md
@@ -0,0 +1,38 @@
+---
+tutorial: "https://www.youtube.com/watch?v=iDwXZoQR8EM"
+---
+# `02` Style tag in CSS
+
+Another way to apply styles, is by using a `
+Click me to open google.com
+```
+
+We have an HTML anchor `` that takes people to google.com when clicked.
+We use CSS to select all the anchor tags and make them pink.
+
+## 📝 Instructions:
+
+1. Paste this code on your website to see the results.
+
+## 💻 Preview:
+
+It should look like this:
+
+
diff --git a/exercises/02-style-tag/index.html b/exercises/02-style-tag/index.html
new file mode 100644
index 00000000..d88e76dd
--- /dev/null
+++ b/exercises/02-style-tag/index.html
@@ -0,0 +1 @@
+
diff --git a/exercises/02-style-tag/solution.hide.html b/exercises/02-style-tag/solution.hide.html
new file mode 100644
index 00000000..b2ad5b0e
--- /dev/null
+++ b/exercises/02-style-tag/solution.hide.html
@@ -0,0 +1,7 @@
+
+
+Click me to open google.com
diff --git a/exercises/02-style-tag/test.js b/exercises/02-style-tag/test.js
new file mode 100644
index 00000000..479b0469
--- /dev/null
+++ b/exercises/02-style-tag/test.js
@@ -0,0 +1,34 @@
+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 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 contain any inline style", ()=>{
+ let emptyBodyInlineStyle = {};
+ expect(a.style._values).toEqual(emptyBodyInlineStyle);
+});
diff --git a/exercises/02.1-Background/README.es.md b/exercises/02.1-Background/README.es.md
deleted file mode 100644
index 735b222a..00000000
--- a/exercises/02.1-Background/README.es.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# `02.1` Background (fondo)
-
-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.
-
-## 📝 Instrucciones:
-
-1. Construye el ejercicio.
-
-2. Verifica la vista previa.
-
-3. En el archivo styles.css cambia el `background-size` a `contain` (verifica la pestaña styles.css).
-
-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.
-
-6. Construye y previsualiza el ejercicio nuevamente.
-
-## 💡Pista:
-
-Google es tu mejor amigo:
-
-- Como usar el background-size: http://lmgtfy.com/?q=css+background-size
-
-- Como usar el background-repeat: http://lmgtfy.com/?q=css+background-repeat
diff --git a/exercises/02.1-Background/tests.js b/exercises/02.1-Background/tests.js
deleted file mode 100644
index cfde6b1f..00000000
--- a/exercises/02.1-Background/tests.js
+++ /dev/null
@@ -1,67 +0,0 @@
-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
-
-
-
- });
- afterEach(() => {
- jest.resetModules();
- });
- it("The body tag should not contains any inline style", function () {
- 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);
- });
-
- 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 () {
- 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')
- })
-});
diff --git a/exercises/02.1-add-a-style-tag/README.es.md b/exercises/02.1-add-a-style-tag/README.es.md
new file mode 100644
index 00000000..8ca6b5f6
--- /dev/null
+++ b/exercises/02.1-add-a-style-tag/README.es.md
@@ -0,0 +1,24 @@
+---
+tutorial: "https://www.youtube.com/watch?v=rX-0KNBCxrY"
+---
+
+# `02.1` The Style Tag
+
+Veamos otro ejemplo pero esta vez agregando la etiqueta `
+```
+
+## 📝 Instrucciones:
+
+1. Añade una etiqueta `
+```
+
+## 📝 Instructions
+
+1. Add a `
+
+ 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 to code at a young age prepares them for the future. Coding helps children with communication, creativity,
+ math, writing, and confidence.
+
diff --git a/exercises/02.1-add-a-style-tag/test.js b/exercises/02.1-add-a-style-tag/test.js
new file mode 100644
index 00000000..0b3c714b
--- /dev/null
+++ b/exercises/02.1-add-a-style-tag/test.js
@@ -0,0 +1,22 @@
+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 p = document.querySelector("p");
+
+test("There should be a
-
-
\ No newline at end of file
diff --git a/exercises/06-Practicing-Rules/styles.css b/exercises/06-Practicing-Rules/styles.css
deleted file mode 100644
index d89b1a47..00000000
--- a/exercises/06-Practicing-Rules/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-/* add your styles here */
\ No newline at end of file
diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js
deleted file mode 100644
index ae40b996..00000000
--- a/exercises/06-Practicing-Rules/tests.js
+++ /dev/null
@@ -1,148 +0,0 @@
-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
-
- });
- afterEach(() => {
- jest.resetModules();
- });
-
-
-
- it("the background should match", function () {
- document.querySelector(
- "head"
- ).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 () {
- document.querySelector(
- "head"
- ).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 () {
- document.querySelector(
- "head"
- ).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 () {
- 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");
- });
- it("the color in the H1 Tag should be 'red'", function () {
- document.querySelector(
- "head"
- ).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 () {
- 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");
- });
- it("the text-decoration in the H2 Tag should be 'underline'", function () {
- document.querySelector(
- "head"
- ).innerHTML=``;
- // get computed styles of any element you like
- 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 () {
- document.querySelector(
- "head"
- ).innerHTML=``;
- // get computed styles of any element you like
- 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 () {
- 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)");
- });
- it("The a hover underline should be removed", function () {
- document.querySelector(
- "head"
- ).innerHTML=``;
- let cssArray=document.styleSheets[0].cssRules;
- // console.log("$$$:", cssArray)
- let orangeHoverSelector="";
- for (let i=0; i${css.toString()}`;
-
- let cssArray=document.styleSheets[0].cssRules;
- console.log("$$$:", cssArray[0])
- let orangeHoverSelector="";
- for (let i=0; i
- 05 Specificity
+ 06 Specificity
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
diff --git a/exercises/06-specificity/solution.hide.css b/exercises/06-specificity/solution.hide.css
new file mode 100644
index 00000000..fabc5750
--- /dev/null
+++ b/exercises/06-specificity/solution.hide.css
@@ -0,0 +1,12 @@
+ul li {
+ background: blue;
+}
+
+li + #thirditem {
+ background: yellow;
+}
+/**** DO NOT EDIT ANYTHING ABOVE THIS LINE ****/
+
+#thirditem {
+ background: green !important;
+}
diff --git a/exercises/06-specificity/styles.css b/exercises/06-specificity/styles.css
new file mode 100644
index 00000000..1255fbbc
--- /dev/null
+++ b/exercises/06-specificity/styles.css
@@ -0,0 +1,8 @@
+ul li {
+ background: blue;
+}
+
+li + #thirditem {
+ background: yellow;
+}
+/**** DO NOT EDIT ANYTHING ABOVE THIS LINE ****/
diff --git a/exercises/06-specificity/tests.js b/exercises/06-specificity/tests.js
new file mode 100644
index 00000000..3ea381ec
--- /dev/null
+++ b/exercises/06-specificity/tests.js
@@ -0,0 +1,54 @@
+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 () {
+
+ test("You should not change the existing 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)
+ })
+
+ test("You should not delete or edit the existing code", function () {
+ document.querySelector("head").innerHTML = ``;
+
+ let cssArray = document.styleSheets[0].cssRules[0].selectorText;
+ 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;
+
+ expect(thirdItSelector).toBe("li + #thirditem");
+ expect(thirdItBackground).toBe("yellow");
+ expect(cssArray).toBe("ul li");
+ expect(cssArrayBackground).toBe("blue");
+ })
+ test("You should use a more specific rule using the !important annotation", function () {
+
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ let cssArray = document.styleSheets[0].cssRules;
+ let orangeHoverSelector = "";
+ for (let i = 0; i < cssArray.length; i++) {
+ if (cssArray[i].selectorText.endsWith("#thirditem") && cssArray[i].style._importants.background === "important" || cssArray[i].style._importants["background-color"] === "important") {
+ orangeHoverSelector = cssArray[i].style.background || cssArray[i].style["background-color"];
+ }
+ }
+
+ expect(orangeHoverSelector).toBe("green");
+ });
+
+});
diff --git a/exercises/07-Very-Specific-Rules/README.es.md b/exercises/07-Very-Specific-Rules/README.es.md
deleted file mode 100644
index b6295156..00000000
--- a/exercises/07-Very-Specific-Rules/README.es.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# `07` Reglas Muy Especificas
-
-## **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.
-
-## 📝 Instrucciones:
-
-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).
-
-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
deleted file mode 100644
index ac33d20d..00000000
--- a/exercises/07-Very-Specific-Rules/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-tutorial: "https://www.youtube.com/watch?v=2YkLDRZFk40"
----
-
-# `07` Very Specific Rules
-
-# **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.
-
-## 📝 Instructions:
-
-
-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).
-
-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
deleted file mode 100644
index defdb77a..00000000
--- a/exercises/07-Very-Specific-Rules/styles.css
+++ /dev/null
@@ -1,15 +0,0 @@
-/** Insert your code here **/
-
-/*********** READ ONLY BLOCK ******
-You CAN NOT UPDATE anything from here on,
-only add lines of code on top of this lines
-**/
-
-body {
- color: blue;
-}
-
-ul li,
-ol li {
- color: green;
-}
diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js
deleted file mode 100644
index f3b4d5a9..00000000
--- a/exercises/07-Very-Specific-Rules/tests.js
+++ /dev/null
@@ -1,98 +0,0 @@
-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
-
- });
- afterEach(() => {
- jest.resetModules();
- });
-
-
- it("The ul li color has to be red", function () {
- document.querySelector(
- "head"
- ).innerHTML=``;
- let cssArray=document.styleSheets[0].cssRules;
-
- let orangeHoverSelector="";
- for (let i=0; i${css.toString()}`;
- let cssArray=document.styleSheets[0].cssRules;
-
- let orangeHoverSelector="";
- for (let i=0; i${css.toString()}`;
- let cssArray=document.styleSheets[0].cssRules;
-
- let orangeHoverSelector="";
- for (let i=0; i${css.toString()}`;
- 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 () {
- 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)
- })
-
-
-
-
-
-});
\ No newline at end of file
diff --git a/exercises/07-practicing-rules/README.es.md b/exercises/07-practicing-rules/README.es.md
new file mode 100644
index 00000000..a63c9004
--- /dev/null
+++ b/exercises/07-practicing-rules/README.es.md
@@ -0,0 +1,23 @@
+# `07` Practicing Rules
+
+## 📝 Instrucciones:
+
+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-family`) del `h1` a `Courier` y el resto del sitio web a `Times New Roman`.
+
+3. Cambia el color del `h1` a rojo (`red`).
+
+4. Haz que todos los `h2` tengan subrayado (`underline`).
+
+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** 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 pasar el cursor encima del anchor para probarlo).
+
+## 💻 Resultado esperado:
+
+
diff --git a/exercises/07-practicing-rules/README.md b/exercises/07-practicing-rules/README.md
new file mode 100644
index 00000000..cb09ca0d
--- /dev/null
+++ b/exercises/07-practicing-rules/README.md
@@ -0,0 +1,27 @@
+---
+tutorial: "https://www.youtube.com/watch?v=4wguurrl-lU"
+---
+
+# `07` Practicing Rules
+
+## 📝 Instructions:
+
+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-family` of the `h1` to `Courier` and the rest of the website to `Times new Roman`.
+
+3. Change the color of `h1` to `red`.
+
+4. Make all the `h2` have an `underline`.
+
+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).
+
+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).
+
+## 💻 Expected result:
+
+
diff --git a/exercises/07-practicing-rules/index.html b/exercises/07-practicing-rules/index.html
new file mode 100644
index 00000000..b2d40b06
--- /dev/null
+++ b/exercises/07-practicing-rules/index.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ 07 Practicing Rules
+
+
+
+
+
The learning essay
+
3 reasons you know 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.
+
+
+
You are able to complete the exercises by yourself.
+
You understand what the teacher is talking about.
+
You are able to have conversations about the topic.
+
+
3 reasons you love what you are learning
+
+
Time passes fast.
+
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's better than watching videos of cats?
+ click here
+
+
+
+
diff --git a/exercises/07-practicing-rules/solution.hide.css b/exercises/07-practicing-rules/solution.hide.css
new file mode 100644
index 00000000..4026152e
--- /dev/null
+++ b/exercises/07-practicing-rules/solution.hide.css
@@ -0,0 +1,25 @@
+/* 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;
+}
+
+h2 {
+ text-decoration: underline;
+}
+
+a:hover {
+ color: green;
+ text-decoration: none;
+}
diff --git a/exercises/07-practicing-rules/styles.css b/exercises/07-practicing-rules/styles.css
new file mode 100644
index 00000000..9a7fae86
--- /dev/null
+++ b/exercises/07-practicing-rules/styles.css
@@ -0,0 +1 @@
+/* add your styles here */
diff --git a/exercises/07-practicing-rules/tests.js b/exercises/07-practicing-rules/tests.js
new file mode 100644
index 00000000..5c375d55
--- /dev/null
+++ b/exercises/07-practicing-rules/tests.js
@@ -0,0 +1,117 @@
+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", () => {
+ let meta = document.querySelector("meta")
+ let link = document.querySelector("link")
+ let title = document.querySelector('title')
+
+ test("The background should match", () => {
+ document.querySelector(
+ "head"
+ ).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`
+ );
+ });
+ 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"].toLowerCase()).toBe("\"times new roman\"");
+ });
+ test("The padding-left should be '20px'", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ let body = document.querySelector("body");
+ let styles = window.getComputedStyle(body);
+ expect(styles["padding-left"]).toBe("20px");
+ });
+ test("The font-family in the
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"].toLowerCase()).toBe("\"courier\"");
+ });
+ test("The color in the
tag should be 'red'", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ let h1Tag = document.querySelector("h1");
+ let h1TagStyles = window.getComputedStyle(h1Tag);
+ // get computed styles of any element you like
+ expect(h1TagStyles["color"]).toBe("red");
+ });
+ test("The text-decoration in the
tag should be 'underline'", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ // get computed styles of any element you like
+ const h2Tag = document.querySelector("h2");
+ let h2TagStyles = window.getComputedStyle(h2Tag);
+ expect(h2TagStyles["text-decoration"]).toBe("underline");
+ });
+ test("The padding in the p tag should be '5px'", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ // get computed styles of any element you like
+ const idTag = document.querySelector("#id1");
+ let idTagStyles = window.getComputedStyle(idTag);
+ expect(idTagStyles["padding"]).toBe("5px");
+ });
+
+ test("The a:hover underline should be removed", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ let cssArray = document.styleSheets[0].cssRules;
+ let orangeHoverSelector = "";
+ for (let i = 0; i < cssArray.length; i++) {
+ if (cssArray[i].selectorText === "a:hover") {
+ orangeHoverSelector = cssArray[i].style['text-decoration'];
+ }
+ }
+ expect(orangeHoverSelector).toBe("none");
+ });
+
+ test("The a:hover color should be green", () => {
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ let cssArray = document.styleSheets[0].cssRules;
+ 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');
+ });
+ test("You should not change the existing tag elements", () => {
+ let head = document.querySelector('head')
+ expect(head).toBeTruthy()
+
+ expect(meta).toBeTruthy()
+
+ let pathname = link.getAttribute("href")
+ expect(pathname).toBe('./styles.css')
+
+ expect(title).toBeTruthy()
+ })
+
+});
diff --git a/exercises/08-Rounded-Image/README.es.md b/exercises/08-Rounded-Image/README.es.md
deleted file mode 100644
index 956bcbb7..00000000
--- a/exercises/08-Rounded-Image/README.es.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# `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!
-
-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:
-
-
-
-## 📝 Instrucciones:
-
-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).
-
-## 💡 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`.
-
-+ En este articulo puedes leer más [sobre la propiedad object fit](https://css-tricks.com/on-object-fit-and-object-position/)
diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md
deleted file mode 100644
index 7fedd48e..00000000
--- a/exercises/08-Rounded-Image/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# `08` Rounded Image
-
-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:
-
-
-
-## 📝 Instructions:
-
-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).
-
-
-## 💡 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.
-
-+ You can also read [this great article about object fit](https://css-tricks.com/on-object-fit-and-object-position/)
-
diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js
deleted file mode 100644
index fc2abaa5..00000000
--- a/exercises/08-Rounded-Image/tests.js
+++ /dev/null
@@ -1,99 +0,0 @@
-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
-
- });
- afterEach(() => {
- jest.resetModules();
- });
-
- it("The tag has to be removed", function() {
- document.querySelector(
- "head"
- ).innerHTML = ``;
- expect(document.querySelector("img")).toBeFalsy();
- });
- it("The
tag should exists", function() {
- document.querySelector(
- "head"
- ).innerHTML = ``;
- expect(document.querySelector("div")).toBeTruthy();
- });
- it("the width in the div Tag should be '200px'", function() {
- // 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");
- });
- it("the height in the div Tag should be '200px'", function() {
- // 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");
- });
- it("the border radius in the div Tag should be '100%'", function() {
- // get computed styles of any element you like
- document.querySelector(
- "head"
- ).innerHTML = ``;
- const divTag = document.querySelector("div");
- let idTagStyles = window.getComputedStyle(divTag);
- expect(idTagStyles["border-radius"]).toBe("100%");
- });
- it("the background position x in the div Tag should be 'center'", function() {
- // get computed styles of any element you like
- document.querySelector(
- "head"
- ).innerHTML = ``;
- const divTag = document.querySelector("div");
- 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() {
- // get computed styles of any element you like
- document.querySelector(
- "head"
- ).innerHTML = ``;
- const divTag = document.querySelector("div");
- let idTagStyles = window.getComputedStyle(divTag);
- expect(idTagStyles["background-position-y"]).toBe("center");
- });
- it("the background image in the div Tag should exists", function() {
- // get computed styles of any element you like
- document.querySelector(
- "head"
- ).innerHTML = ``;
- const divTag = document.querySelector("div");
- let idTagStyles = window.getComputedStyle(divTag);
- expect(idTagStyles["background-image"]).toBeTruthy();
- });
- it("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)
- })
-});
diff --git a/exercises/08-very-specific-rules/README.es.md b/exercises/08-very-specific-rules/README.es.md
new file mode 100644
index 00000000..dd02d734
--- /dev/null
+++ b/exercises/08-very-specific-rules/README.es.md
@@ -0,0 +1,21 @@
+# `08` Very Specific Rules
+
+## 🔎 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.
+
+## 📝 Instrucciones:
+
+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 la tabla tengan fondo amarillo usando `tr:nth-child`.
+
+
+
+> Importante: **NO** debes modificar el archivo `index.html`.
+
+## 💡 Pista:
+
+- El atributo `!important` ayuda a sobreescribir estilos.
diff --git a/exercises/08-very-specific-rules/README.md b/exercises/08-very-specific-rules/README.md
new file mode 100644
index 00000000..91bcaf0c
--- /dev/null
+++ b/exercises/08-very-specific-rules/README.md
@@ -0,0 +1,25 @@
+---
+tutorial: "https://www.youtube.com/watch?v=2YkLDRZFk40"
+---
+
+# `08` Very Specific Rules
+
+## 🔎 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.
+
+## 📝 Instructions:
+
+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).
+
+3. Change the odd rows of the tables to a yellow background using `tr:nth-child`.
+
+
+
+> Important: You should **NOT** modify the `index.html` file.
+
+## 💡 Hint:
+
+- The `!important` attribute helps to override other attributes.
diff --git a/exercises/07-Very-Specific-Rules/index.html b/exercises/08-very-specific-rules/index.html
similarity index 65%
rename from exercises/07-Very-Specific-Rules/index.html
rename to exercises/08-very-specific-rules/index.html
index 9c691446..3909949d 100644
--- a/exercises/07-Very-Specific-Rules/index.html
+++ b/exercises/08-very-specific-rules/index.html
@@ -4,28 +4,28 @@
- 07 Very Specific Rules
+ 08 Very Specific Rules
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.
You are able to complete the exercises by yourself.
You understand what the teacher is talking about
-
Your are able to have conversations about the topic
+
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?
- click here
+ click here