Skip to content

Commit efa2418

Browse files
committed
Ch. 31 - CSS Theory jonasschmedtmann#1: Conflicts Between Selectors
1 parent 1dd7e75 commit efa2418

File tree

6 files changed

+37
-5
lines changed

6 files changed

+37
-5
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h4>Related posts</h4>
160160
</aside>
161161

162162
<footer>
163-
<p id="copy" class="related-author">
163+
<p id="copyright" class="copyright text">
164164
Copyright &copy; 2027 by The Code Magazine.
165165
</p>
166166
</footer>
Loading
Loading

starter/03-CSS-Fundamentals/notes.html renamed to starter/03-CSS-Fundamentals/notes/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>CSS Fundamentals Notes</title>
6+
<link rel="stylesheet" href="style.css" />
67
</head>
78
<body>
89
<article>
@@ -133,6 +134,20 @@ <h2>Ch. 30 Using Chrome Dev Tools</h2>
133134
corresponding pseudo-class.
134135
</p>
135136
</article>
137+
138+
<article>
139+
<h2>Ch. 31 CSS Theory #1: Conflicts Between Selectors</h2>
140+
<img src="img/conflicting_selectors_and_declarations.png" />
141+
<img src="img/resolving_conflicing_selectors.png" />
142+
<p>
143+
In VSCode, mousing over a CSS selector will show the "Selector
144+
Specificity".
145+
</p>
146+
<p>
147+
Selector Specificity indicates the priority of the selector, highest
148+
to lowest priority read from left to right.
149+
</p>
150+
</article>
136151
</article>
137152
</body>
138153
</html>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
img {
2+
width: 1000px;
3+
}

starter/03-CSS-Fundamentals/style.css

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ li {
5151
font-size: 18px;
5252
}
5353

54-
#copyright {
55-
font-size: 16px;
56-
}
57-
5854
.related-author {
5955
font-size: 18px;
6056
font-weight: bold;
@@ -134,3 +130,21 @@ a:active {
134130
background-color: black;
135131
font-style: italic;
136132
}
133+
134+
/* resolving conflicts */
135+
/*
136+
#copyright {
137+
color: red;
138+
}
139+
140+
.copyright {
141+
color: blue;
142+
}
143+
144+
.text {
145+
color: yellow;
146+
}
147+
148+
footer p {
149+
color: green !important;
150+
} */

0 commit comments

Comments
 (0)