Broken Test Case [Responsive Web Design - Basic CSS - Import a Google Font]
See original GitHub issueAffected page Responsive Web Design - Basic CSS - Import a Google Font
Your code
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
p {
font-size: 16px;
font-family: monospace;
}
h2 {
font-family : Lobster; // REPORTED BUG
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
Expected behavior Should pass all test cases 100%, but instead fails on the third test case “You should only use an h2 element selector to change the font”.
System (please complete the following information):
- Device: Laptop
- OS: Windows 8.1 Pro Latest Update
- Browser: Firefox, Chrome, Opera
- Version: Latest All
Additional context The bug exists at the rule declaration colon where adding a space breaks the test fixtures. The following piece of CSS doesn’t pass the tests, despite being valid and correct:
h2 {
font-family : Lobster; // Extra space before colon
}
While the following passes:
h2 {
font-family: Lobster; // Removed space before colon
}
Per the W3C Syntax and basic data types documentation, the declaration : property S* ':' S* value;
regex is used to verify CSS rule declarations. I’d like to work on a fix for this if this will be fixed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
freeCodeCamp/import-a-google-font.md at main - GitHub
Google Fonts is a free library of web fonts that you can use in your CSS by referencing the font's URL. So, let's...
Read more >Import a Google Font Broken? - HTML-CSS
I've placed the h2 CSS selector to change the font within the style element. It says I have not done that? Your code...
Read more >Basic CSS: Import a Google Font | freeCodeCamp - YouTube
Today we write some basic HTML and CSS to import a google font to our web application and display that font on an...
Read more >Basic CSS (7/44) | Import a Google Font | freeCodeCamp - YouTube
Solution to Responsive Web Design Certification - Basic CSS (7/44) Import a Google FontFull playlist ...
Read more >Making Google Fonts Faster in 2022
Loading Google fonts in the HTML reduces the critical request depth and speeds up page load Always import your fonts from HTML, not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @KL13NT , I suggest you open a new issue with a list of the affected challenges if you are up to the task.
Sure thing.