Skip to content

Commit c8135eb

Browse files
Merge pull request #108 from josemoracard/jose1-4.2-to-07
fixed text, link, styles 4.2 to 07
2 parents f64047e + c8c602e commit c8135eb

File tree

8 files changed

+37
-35
lines changed

8 files changed

+37
-35
lines changed

exercises/04.2-Apply-several-classes/styles.css

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
.card {
2-
display: inline-block;
3-
width: 50px;
4-
height: 80px;
5-
position: relative;
2+
width: 150px;
3+
height: 240px;
64
border: 1px solid black;
75
text-align: center;
8-
line-height: 80px;
6+
line-height: 240px;
97
border-radius: 5px;
8+
font-size: 1.5rem;
109
}
1110
.card:after {
12-
font-size: 70%;
11+
font-size: 80%;
1312
font-weight: bold;
1413
}
1514

exercises/04.2-Apply-several-classes/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jest.dontMock("fs");
88
describe("You should change the class on the div tag", () => {
99
const div = document.querySelector("div");
1010

11-
test("The div class should NOT have the spades class", () => {
11+
test('The <div> should NOT have the "spades" class', () => {
1212
expect(div.classList.contains("spade")).toBe(false);
1313
});
1414

15-
test("The div class should have the heart class", () => {
15+
test('The <div> should have the "heart" class', () => {
1616
expect(div.classList.contains("heart")).toBe(true);
1717
});
1818
});
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#button1 {
2-
background: #BDBDBD;
3-
border: #5E5E5E;
4-
border-radius: 5px;
2+
background-color: #4caf50; /* Green */
3+
color: white;
4+
padding: 15px 32px;
5+
text-align: center;
6+
display: inline-block;
7+
border-radius: 5px;
58
}

exercises/04.3-id-Selector/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ jest.dontMock('fs');
88
const span = document.querySelector("span");
99
const link = document.querySelector("link");
1010

11-
test("There should be a span tag", () => {
11+
test("There should be a <span> tag", () => {
1212
expect(span).toBeTruthy()
1313
});
1414

15-
test("The span tag should have the id 'button1'", () => {
15+
test("The <span> tag should have the id 'button1'", () => {
1616
expect(span).toBeTruthy();
1717
let id = span.id
1818
expect(id).toBeTruthy();
1919
expect(id).toBe('button1');
2020
});
2121

22-
test("The span tag should not contain any inline style", () => {
22+
test("The <span> tag should not contain any inline style", () => {
2323
let emptyBodyInlineStyle = {};
2424
expect(span).toBeTruthy()
2525
expect(span.style._values).toEqual(emptyBodyInlineStyle);
2626
});
2727

28-
test("You should not change the existing head tag elements", () => {
28+
test("You should not change the existing <head> tag elements", () => {
2929
let head = document.querySelector('head');
3030
expect(head).toBeTruthy();
3131

exercises/05-Specificity/tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jest.dontMock('fs');
88

99
describe("All the styles should be applied", function () {
1010

11-
test("You should not change the existing head tag elements", function () {
11+
test("You should not change the existing <head> tag elements", function () {
1212
let head = document.querySelector('head')
1313
expect(head).toBeTruthy()
1414

@@ -35,7 +35,7 @@ describe("All the styles should be applied", function () {
3535
expect(cssArray).toBe("ul li");
3636
expect(cssArrayBackground).toBe("blue");
3737
})
38-
test("You should use a more specific rule using the !important annotation ", function () {
38+
test("You should use a more specific rule using the !important annotation", function () {
3939

4040
document.querySelector(
4141
"head"
@@ -51,4 +51,4 @@ describe("All the styles should be applied", function () {
5151
expect(orangeHoverSelector).toBe("green");
5252
});
5353

54-
});
54+
});

exercises/06-Practicing-Rules/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h2>3 reasons you love what you are learning</h2>
2727
</ul>
2828
<p>
2929
If you can't sleep, what better than watching videos of cats?
30-
<a href="https://www.youtube.com/watch?v=WEgWMOzQ8IE">click here</a>
30+
<a href="https://www.youtube.com/shorts/k931WvWU0Vg">click here</a>
3131
</p>
3232
</div>
3333
</body>

exercises/06-Practicing-Rules/tests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe("All the styles should be applied", () => {
3737
let styles = window.getComputedStyle(body);
3838
expect(styles["padding-left"]).toBe("20px");
3939
});
40-
test("The font-family in the h1 tag should be 'Courier'", () => {
40+
test("The font-family in the <h1> tag should be 'Courier'", () => {
4141
document.querySelector(
4242
"head"
4343
).innerHTML = `<style>${css.toString()}</style>`;
@@ -46,7 +46,7 @@ describe("All the styles should be applied", () => {
4646
// get computed styles of any element you like
4747
expect(h1TagStyles["font-family"].toLowerCase()).toBe("\"courier\"");
4848
});
49-
test("The color in the h1 tag should be 'red'", () => {
49+
test("The color in the <h1> tag should be 'red'", () => {
5050
document.querySelector(
5151
"head"
5252
).innerHTML = `<style>${css.toString()}</style>`;
@@ -55,7 +55,7 @@ describe("All the styles should be applied", () => {
5555
// get computed styles of any element you like
5656
expect(h1TagStyles["color"]).toBe("red");
5757
});
58-
test("the text-decoration in the h2 tag should be 'underline'", () => {
58+
test("the text-decoration in the <h2> tag should be 'underline'", () => {
5959
document.querySelector(
6060
"head"
6161
).innerHTML = `<style>${css.toString()}</style>`;
@@ -102,7 +102,7 @@ describe("All the styles should be applied", () => {
102102
}
103103
expect(orangeHoverSelector).toBe('green');
104104
});
105-
test("You should not change the existing head tag elements", () => {
105+
test("You should not change the existing <head> tag elements", () => {
106106
let head = document.querySelector('head')
107107
expect(head).toBeTruthy()
108108

exercises/07-Very-Specific-Rules/index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>3 reasons you know love what you are learning</h2>
2525
</ul>
2626
<p>
2727
If you can't sleep, what better than watching videos of cats?
28-
<a href="https://www.youtube.com/watch?v=WEgWMOzQ8IE">click here</a>
28+
<a href="https://www.youtube.com/shorts/k931WvWU0Vg">click here</a>
2929
</p>
3030

3131
<table>
@@ -34,47 +34,47 @@ <h2>3 reasons you know love what you are learning</h2>
3434
<td>Gender</td>
3535
</tr>
3636
<tr>
37-
<td>12 years</td>
37+
<td>12</td>
3838
<td>Male</td>
3939
</tr>
4040
<tr>
41-
<td>22 years</td>
41+
<td>22</td>
4242
<td>Female</td>
4343
</tr>
4444
<tr>
45-
<td>11 years</td>
45+
<td>11</td>
4646
<td>Male</td>
4747
</tr>
4848
<tr>
49-
<td>21 years</td>
49+
<td>21</td>
5050
<td>Male</td>
5151
</tr>
5252
<tr>
53-
<td>22 years</td>
53+
<td>22</td>
5454
<td>Female</td>
5555
</tr>
5656
<tr>
57-
<td>10 years</td>
57+
<td>10</td>
5858
<td>Male</td>
5959
</tr>
6060
<tr>
61-
<td>13 years</td>
61+
<td>13</td>
6262
<td>Female</td>
6363
</tr>
6464
<tr>
65-
<td>13 years</td>
65+
<td>13</td>
6666
<td>Male</td>
6767
</tr>
6868
<tr>
69-
<td>10 years</td>
69+
<td>10</td>
7070
<td>Male</td>
7171
</tr>
7272
<tr>
73-
<td>11 years</td>
73+
<td>11</td>
7474
<td>Male</td>
7575
</tr>
7676
<tr>
77-
<td>11 years</td>
77+
<td>11</td>
7878
<td>Male</td>
7979
</tr>
8080
</table>

0 commit comments

Comments
 (0)