Store Data with Sass Variables--- possible bug?

Tell us what’s happening:
there’s 4 checkpoints :

(green) Your code should have a Sass variable declared for $text-color with a value of red.
(green) Your code should use the $text-color variable to change the color for the .blog-post and h2 items.
(cross) Your .blog-post element should have a color of red.
(cross) Your h2 elements should have a color of red.

the first two are passed and recognized ,(on green)
but the two lasts , just don’t pass… maybe i am writing something wrong, but it shows and seems to work…
what i am doing wrong ?? (Maybe a bug??) :face_with_monocle:

ps… i tryed to reset the code and change browsers and devices… keeps the same response…

Your code so far


<style type='text/sass'>
  $text-color: red;
  .header{
    text-align: center;
  }
  .blog-post, h2 {
    color: $text-color;
  }
</style>

<h1 class="header">Learn Sass</h1>
<div class="blog-post">
  <h2>Some random title</h2>
  <p>This is a paragraph with some random text in it</p>
</div>
<div class="blog-post">
  <h2>Header #2</h2>
  <p>Here is some more random text.</p>
</div>
<div class="blog-post">
  <h2>Here is another header</h2>
  <p>Even more random text within a paragraph</p>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.68.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/store-data-with-sass-variables

Seems to be a known issue:
https://github.com/freeCodeCamp/freeCodeCamp/issues/12699

1 Like

I have similar issue here too. I have tried so many times thinking the fault was from my end.

SAME ISSUE HERE. just saying. lmk whats up?

All the tests pass correctly in Firefor browser.
Your code is correct, just try it in a different browser :slight_smile:

same code,
Opera browser passed,
chrome not pass,

Came here for this.

I don’t see why I have to switch browsers when something doesn’t work. I’d rather keep going in the same browser window! And am surprised it didn’t pass in the Chrome browser. I do not have Opera installed on my machine.

Firefox 56.0.2
Looks like I will need to skip over this lesson for now… Seems to be a hit or miss kind of error.

Here’s a stupid work around.

<style type='text/sass'>
  $text-color: red;
  
  .header{
    text-align: center;
  }
  .blog-post, h2 {
    color: $text-color;
  }
</style>

<h1 class="header">Learn Sass</h1>
<div class="blog-post" style="color:red">
  <h2 style="color:red">Some random title</h2>
  <p>This is a paragraph with some random text in it</p>
</div>
<div class="blog-post">
  <h2 style="color:red">Header #2</h2>
  <p>Here is some more random text.</p>
</div>
<div class="blog-post" style="color:red">
  <h2 style="color:red">Here is another header</h2>
  <p>Even more random text within a paragraph</p>
</div>

Just to be able to complete it. :slight_smile:

1 Like

I don’t understand, but it happened the same to me and trying different changes on code I deleted h2 from css section and it runs the tests!!! It doesn’t make sense…
(In Google Chrome)

Same problem using Chrome