Store Data with Sass Variables

Tell us what’s happening:

I cant find a solution for this code, if anyone cal help it would be awesome! Its the first lesson for Sass:
This is the quote for the exercise.
“Create a variable $text-color and set it to red. Then change the value of the color property for the .blog-post and h2 to the $text-color variable.”

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 color="red">Some random title</h2>
  <p>This is a paragraph with some random text in it</p>
</div>
<div class="blog-post">
  <h2 color="red">Header #2</h2>
  <p>Here is some more random text.</p>
</div>
<div class="blog-post">
  <h2 color="red">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.181 Safari/537.36.

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

1 Like

This is the original code.

.header{ text-align: center; } .blog-post, h2 { color: red; }

Learn Sass

Some random title

This is a paragraph with some random text in it

Header #2

Here is some more random text.

Here is another header

Even more random text within a paragraph

If you find a bug you can report to GitHub - FCC issues

Your code is correct, this lesson appears to be bugged.

Or was, it worked for me a few minutes ago.

It’s not working for me either.

2 Likes

I’m having the same exact issue.

Same problem with me

1 Like

You might have to keep hitting the Run Tests button. I pressed it about 5 billion times… ok…less than 50. Just tried it one more time (after I ‘liked’ the post above mine) and it went through.

I have the same issue

i pressed it five times then it went through. Thanks for the comment Ducky