Freecodecamp: I had inline style color as green and the test, Give your h1 element the inline style of color: white, passed.

Created on 16 Oct 2016  ยท  35Comments  ยท  Source: freeCodeCamp/freeCodeCamp

Challenge Override Class Declarations with Inline Styles has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text blue-text" style="color:green">Hello World!</h1>

first timers only help wanted

All 35 comments

@nwolisa Thanks for the report. It seems that the test in question is checking that the h1 element has a style attribute and the style attribute has a property of color.

This test need to be more specific.

First-timers Only

Familiarise yourself with CONTRIBUTING.md, this will help you test up a test environment.

Concentrate on this line

If you have any issues, please get in touch with the folks in the Contributor Chat Room.

Happy Coding :+1:

Use an in-line style to try to make our h1 element white. Remember, in line styles look like this:

<h1 style="color: green">

Leave the blue-text and pink-text classes on your h1 element.

This was the assignment and when I changed in-line style to white it worked right away.
screenshot from 2016-10-16 10-45-04

nice

Hey if this issue is still open can I work on this one??

I have submitted a pull request to fix this issue. The change allows common valid characters such as extra spaces while also validating exact keyword color as well as allowing the value white and it's hex version #ffffff

cat-photo-form {

background-color: green;
}

IDK why its not turning green :(

I applied the Id#

@kodackoder Try to read the assignment again.
Your job is to change color of inline-style, not of class or id. Change from original code, color from green to white in your style of h1 element at the bottom

Can I help with this Issue?

I'm a first timer. Can I do it?

Just check my screenshot. I changed my inline style to white and worked flawlessly.
screenshot from 2016-12-15 11-05-51

If this issue is not closed, Can I take it up - First timer here

Done

On 3 Jan 2017 20:02, "RishuK" notifications@github.com wrote:

If this issue is not closed, Can I take it up - First timer here

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/11226#issuecomment-270126186,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPssHcRRMIByrju8KC4jt2d45L76cnGks5rOlwUgaJpZM4KX07_
.

You mean you did it?

Yeah I had solved the issue and posted the screenshot.

Regards
Akshay Iyer

On Tue, Jan 3, 2017 at 9:01 PM, RishuK notifications@github.com wrote:

You mean you did it?

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/11226#issuecomment-270140146,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPssFJCU11NqeOQq_87bWblWQm6aQfmks5rOmnZgaJpZM4KX07_
.

Stop

On Jan 3, 2017 11:08 PM, "Akshay Iyer" notifications@github.com wrote:

Yeah I had solved the issue and posted the screenshot.

Regards
Akshay Iyer

On Tue, Jan 3, 2017 at 9:01 PM, RishuK notifications@github.com wrote:

You mean you did it?

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
270140146>,
or mute the thread
87bWblWQm6aQfmks5rOmnZgaJpZM4KX07_>
.

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/11226#issuecomment-270307286,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXtMU6Of859euZiq8UA8CxzW5MKkBNTBks5rO0VfgaJpZM4KX07_
.

@RishuK You can still work on this issue! Akshay knows how to work around it now, but this challenge can still use the improvement. Be sure to check out https://github.com/FreeCodeCamp/FreeCodeCamp/pull/11318, there's some talk about how to solve it there.

@getoutb1 You may be getting notifications because you watched Free Code Camp. There should be a button to unsubscribe in the email. There's also a button to unwatch at the top right of this page.

Thanks @systimotic. I just want to understand if this has been solved, why is this still open?

I guess I am missing something but I do not see any issue with the code. When you set style="white", the test passes with the right message. Then, what exactly is the issue?

@RishuK see comment

Happy Coding!

@RishuK To clarify, with the example code in the original report, the second to last test is passing, but it shouldn't be.

@systimotic @Bouncey @RishuK I'm confused right now. Did i solve the issue or not? I mean like was my solution correct?

@AkshayIyer12 You passed the challenge, so you're good ๐Ÿ™‚
This issue is about something else. When the value you set is wrong (for example: style="color: nonsensetext"), this test:

Give your h1 element the inline style of color: white

Still gets a green checkmark, while it shouldn't.
That still needs to be resolved, so the issue is not solved. I hope that clears things up.

Okay cool Thanks Timo

Regards
Akshay Iyer

On Mon, Jan 9, 2017 at 3:29 PM, Timo notifications@github.com wrote:

@AkshayIyer12 https://github.com/AkshayIyer12 You passed the challenge,
so you're good ๐Ÿ™‚
This issue is about something else. When the value you set is wrong (for
example: style="color: nonsensetext"), this test:

Give your h1 element the inline style of color: white

Still gets a green checkmark, while it shouldn't.
That still needs to be resolved, so the issue is not solved. I hope that
clears things up.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/11226#issuecomment-271246034,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPssJszwo_sl_Q4SOnLgGpaY2mFFmCOks5rQgUOgaJpZM4KX07_
.

@RishuK How's your progress on this?

Hey @systimotic - I will work on this by this weekend and post here.

If its still open. Can I work on this?

I have started working on this. Sorry I got late.

I am seeing that this issue is also present in this test - override-all-other-styles-by-using-important

assert(code.match(/<h1[\\s\\S]*?style[\\s\\S]*?color[\\s]*:[\\s]*white[\\s\\S]*)

This is what I am trying but does not seem to work. Any inputs?

@RishuK Take a look at https://github.com/freeCodeCamp/freeCodeCamp/pull/11318, especially at the review comments. There's a lot of work already done there. You're headed in the right direction!

Hi all, is this issue still open? Can i work on it?

Should the answer allow for other style changes that will not affect the text color? E.g.: will the answer style="background-color:green;color:white;margin-left:40px" be allowed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imhuyqn picture imhuyqn  ยท  3Comments

QuincyLarson picture QuincyLarson  ยท  3Comments

robwelan picture robwelan  ยท  3Comments

vaibsharma picture vaibsharma  ยท  3Comments

ar5had picture ar5had  ยท  3Comments