CSS: Change Color Text - Single Quotes not working
See original GitHub issueChallenge change-the-color-of-text has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
Using Beta.
First line: doesn’t pass with single quote around 'color:red;'
but double quotes "color:red;"
does pass.
As instructed, I first went to chat and was told that there’s an issue with the testing software that doesn’t accept single quotes. When asked for a link I was told to search the main FCC site, I looked at the FAQ and found nothing. I also searched the forums.
If this is in fact a known issue, then it should be made clear in the actual lessons. Up to this point I’ve used single quotes on the challenges and haven’t had an issue.
<h2 style='color:red;'>CatPhotoApp</h2>
<main>
<p>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="/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>
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (8 by maintainers)
Top GitHub Comments
And you did claim it first! Glad you figured it out. I’ll find another bug.
@JBallin Thanks for the issue. Opening this one for first-timers only. Change this line from:
"assert(code.match(/<h2\\s+style\\s*=\\s*\"\\s*color\\s*:\\s*(?:rgb\\(\\s*255\\s*,\\s*0\\s*,\\s*0\\s*\\)|rgb\\(\\s*100%\\s*,\\s*0%\\s*,\\s*0%\\s*\\)|red|#ff0000|#f00|hsl\\(\\s*0\\s*,\\s*100%\\s*,\\s*50%\\s*\\))\\s*\\;?\">\\s*CatPhotoApp\\s*<\\/h2>/), 'message: Your <code>h2</code> element should be red.');"
to:
"assert(code.match(/<h2\\s+style\\s*=\\s*(\'|\")\\s*color\\s*:\\s*(?:rgb\\(\\s*255\\s*,\\s*0\\s*,\\s*0\\s*\\)|rgb\\(\\s*100%\\s*,\\s*0%\\s*,\\s*0%\\s*\\)|red|#ff0000|#f00|hsl\\(\\s*0\\s*,\\s*100%\\s*,\\s*50%\\s*\\))\\s*\\;?(\'|\")>\\s*CatPhotoApp\\s*<\\/h2>/), 'message: Your <code>h2</code> element should be red.');"
Please follow the guidelines on the Contributing Wiki when submitting a pull request.