Store data with Sass variable

Tell us what’s happening:
I can’t pass the second case with this code. However, when I remove the extra space after $text-color while using it for color property, it passes. Why?

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

Challenge: Store Data with Sass Variables

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

to check if you used a variable it needs to check what you have written

that’s the standard way to write it, without the space after

Remove extra space before semicolon

your first point is wrong
challenge instructions:

Then change the value of the color property for the .blog-post

1 Like