question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS: Change Color Text - Single Quotes not working

See original GitHub issue

Challenge 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:closed
  • Created 6 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
JBallincommented, May 31, 2017

And you did claim it first! Glad you figured it out. I’ll find another bug.

On May 30, 2017, at 10:13 PM, theycallmebruce notifications@github.com wrote:

Apologies, I saw the ticket get re-opened. I had already invested the time actually reading the docs and doing the work. So I sent my PR.

Sent from my iPhone

On 30 May 2017, at 23:57, JBallin notifications@github.com wrote:

@chrisrymer So you ended up solving this one? I thought we agreed I would?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

1reaction
dhcodescommented, May 30, 2017

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Css text color change not working? [closed] - Stack Overflow
I am trying to create a presentation for a site, and the background is black so I need the text to be white....
Read more >
quotes - CSS-Tricks
The quotes property in CSS allows you to specify which types of quotes are used when quotes are added via the content: open-quote; ......
Read more >
quotes - CSS: Cascading Style Sheets - MDN Web Docs
The quotes CSS property sets how the browser should render quotation marks that are added using the open-quotes or close-quotes values of ...
Read more >
CSS quotes | How do quotes work in CSS with Examples
This CSS quote specifies which type of quotation marks to use in the code. We call also use hex codes to show various...
Read more >
HTML Attributes - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found