Can't solve : Store Data with Sass Variables

Tell us what’s happening:
I am doing something wrong not sure what

There is also no hint here:

Your code so far


<style type='text/scss'>
$text-color = red;

.blog-post, h2{
$text-color: red;
};

.header{
  text-align: center;
}
.blog-post, h2 {
  color: red;
}
</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/84.0.4147.105 Safari/537.36.

Challenge: Store Data with Sass Variables

Link to the challenge:

$a : red;

color: $a;
1 Like

this is not correct syntax for assigning a variable

plus you have two blocks for .blog-post, h2, make sure you have only one
and that one uses the variable to assign that value

1 Like

Thanks a lot I got the sollution now :3

$text-color: red;

 .blog-post, h2 {
   color: $text-color;
 }