Use a CSS Class to Style an Element [SOLVED]

Use a CSS Class to Style an Element [SOLVED]
0.0 0

#1

In my case , i found that it wouldn’t let me pass if there is a [space] between [red] and [;].
Entering spaces is a rabbit of mine , cuz to me my code looks neater.

In the following code I’ll illustrate where my 1 xspace was with a [space]

when i got rid of the space i immediately was able to move on.

.red-text { color: red[space] ; }

CatPhotoApp

CatPhotoApp

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

``` **Your browser information:**

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0.

Link to the challenge:


#2

It’s because the regex expression in the code doesn’t include spaces before the semicolon:
"assert(code.match(/\\.red-text\\s*\\{\\s*color\\s*:\\s*red;\\s*\\}/g), 'message: Your stylesheet should declare a <code>red-text</code> class and have its color set to red.');",

source

If you want, you can open an issue on github to get someone to fix it. Or, if you want to try, you should fix it yourself and create a pull request. This would be an easy issue for a beginner to solve and learn about git, learn about regex, and make their first open source contribution.