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.

Hex color not working in this problem

See original GitHub issue

Challenge Use a CSS Class to Style an Element has an issue. User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


<style>
  .blue-text {
    color: #00f;
  }
  .red-text {
    //color: red;
    color: #f00;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
erictleungcommented, May 10, 2017

@wikiwiggs thanks for the issue. And you are correct that colors can be described in multiple ways. The reason why the challenge will only take it in this certain way is because our curriculum is designed for people who have never coded before, thus will not know of different ways to encode color. For someone who doesn’t know how to code, just using the color words themselves is easier to understand. Using hex codes and other ways of encoding colors come later on in the curriculum.

So I’m not sure if we want to account for other colors in this challenge. But one thing we could do is to specify to use the word red within the style tags, rather than assume that the user will input the word itself.

cc/ @freeCodeCamp/moderators thoughts?

0reactions
raisedadeadcommented, May 10, 2017

@Margaret2 @erictleung thanks.

@wikiwiggs thanks for the feedback and the pointers to the documentation. Here is our code of conduct in support of the fact if you feel dissatisfied with the way, mods have responded to your request.

Now coming, back to your query, please understand that:

  1. This particular challenge is NOT aimed to be a perfect code interpreter to handle all the possible ways to handle colors in the tests. I confirm that it’s NOT the intention.
  2. We aim to teach concepts, in small bits that are easy enough to grasp for newcomers.
  3. We have challenges, that fulfill the gaps that you have CORRECTLY pointed.

Finally, we are not going to implement the change that is requested here, because of the additional complexity, it adds without adding value than that already is being delivered in this particular challenge.

Thanks. Happy coding!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ARGB Hex color not working in css html - Stack Overflow
An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0...
Read more >
<hex-color> - CSS: Cascading Style Sheets - MDN Web Docs
The <hex-color> CSS data type is a notation for describing the hexadecimal color syntax of an sRGB color using its primary color components ......
Read more >
CSS : ARGB Hex color not working in css html - YouTube
CSS : ARGB Hex color not working in css html [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] CSS : ARGB Hex color not ......
Read more >
CSS HEX Colors - W3Schools
A hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the...
Read more >
I got still have problem with highlight HEX-Color code plugin ...
installed. I was very annoyed, the HEX code color was only underlined with the respective color and not marked as with Notepad# (Sharp)...
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