How to Store Data with Sass Variables

Tell us what’s happening:

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/67.0.3396.99 Safari/537.36.

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

I think there is a bug in the exercise and your code should be correct. I declared the variable in the first line and it worked.

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

Your .blog-post element should have a color of red.
Your h2 elements should have a color of red.

im getting these messages in the column of test results

Try using a different browser or clear your cookies and cache then try again. Good luck!