Freecodecamp: [beta] Challenge won't pass test despite body font changing to Open Sans

Created on 23 Jan 2017  路  8Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge use-a-google-font has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

```html

Alphabet


Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

```

All 8 comments

@Incredibl3dible thanks. Confirmed.

Yes, the tests are checking for both the "Open Sans" part and the family-name (sans-serif). I can get the challenge to pass with both of those in the CSS rule. It's in the hint, but the test message should be clear about that, too. Maybe we revise the test to say something like: "The body tag should have a font of "Open Sans" and a family name of sans-serif, in that order".

@HKuz thanks. I think the issue is also with the Instructions that say:

Set the font-family of the body to "Open Sans".

without mentioning sans-serif so the instructions should probably be updated too.

Also, the CSS pattern may need to be updated to 'FAMILY-NAME', GENERIC NAME per MDN

Thoughts on this?

@dhcodes agree on both counts, good call with matching the terminology to the MDN article. Based on your comment with their terms, how about the following changes (which come after the link example in the challenge text):

Once the link is in place, the font is available to include in your CSS by using the pattern font-family: "FAMILY_NAME", GENERIC_NAME;.

In this example, "FAMILY_NAME" would be "Open Sans" and GENERIC_NAME would be sans-serif. The quotes around "Open Sans" are required because it has a space in its name. Also, capitalization of the family name matters. Generic names are fallback fonts if the other specified font is not available. Also, generic names are keywords in CSS, so they should not have quotes.

Instructions
Set the font-family of the body to use a family name of "Open Sans" and generic name of sans-serif.

Test text: "The font-family property for the body tag should use a family name of "Open Sans" and a generic name of sans-serif, in that order".

Delete the hint

(Suggestions for any of that language are welcome)

I appeal to @HKuz

Yeah, touche @systimotic - I'm actually not sure what we're doing for very similar challenges. I know the JS section will have ones that cover certain topics across several sections. For example, map and slice come up in BasicJS and Functional Programming, with slightly different spins on the material. I think for now we can keep them in - a little extra practice / redundancy / reinforcement of a concept can't hurt. If we start noticing inconsistencies, we can make a case for removing a specific challenge - does that sound somewhat reasonable?

Okay, I'll submit a PR for this tonight.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QuincyLarson picture QuincyLarson  路  114Comments

QuincyLarson picture QuincyLarson  路  40Comments

tomasvn picture tomasvn  路  47Comments

pbnj picture pbnj  路  45Comments

Ethan-Arrowood picture Ethan-Arrowood  路  56Comments