Freecodecamp: Typo: "color" instead of "class"

Created on 3 May 2016  ·  3Comments  ·  Source: freeCodeCamp/freeCodeCamp

Challenge Taste the Bootstrap Button Color Rainbow has an issue.
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0.

screenshot at 2016-05-03 13 39 54

I think, 'class' should be used instead of 'color' in the first line.

discussing

Most helpful comment

I think the issue is a bit more complex than that. The text is trying to convey that the btn-primary class in Bootstrap applies a style (including color) to a button that helps the user to see it as an action they can take, but it isn't written clearly. Obviously that blue color isn't the main color of the app.

Also it looks like users can pass the test by adding the btn, btn-block, and btn-primary classes to the submit button at the bottom of the code and ignoring the first button (which already has the btn and btn-block classes mentioned in the instructions), and so the instructions are not entirely clear in that regard either.

All 3 comments

I think the issue is a bit more complex than that. The text is trying to convey that the btn-primary class in Bootstrap applies a style (including color) to a button that helps the user to see it as an action they can take, but it isn't written clearly. Obviously that blue color isn't the main color of the app.

Also it looks like users can pass the test by adding the btn, btn-block, and btn-primary classes to the submit button at the bottom of the code and ignoring the first button (which already has the btn and btn-block classes mentioned in the instructions), and so the instructions are not entirely clear in that regard either.

Here's a suggested edit to the instructions:

The btn-primary class styles app elements you apply it to in order to indicate the primary action on a page. It essentially highlights actions you want your user to take.

Add Bootstrap's btn-primary class to your Like button.

Note that the Like button will still need the btn and btn-block classes.

The tests should be changed a little too so it can look for the correct button.

@erictleung @BKinahan
I was trying to fix this issue but if I applied any conditions to check for parents or siblings or any other thing, it was still looking at both the buttons and thus by changing any of the buttons, it was passing the tests. If I change the challenge seed to indicate which line has to be changed by using comments and modify the challenge description as discussed above, would this be accepted as a reasonable fix?

Was this page helpful?
0 / 5 - 0 ratings