Sass: Store Data with Sass Variables

Sass: Store Data with Sass Variables
0

#1
// i cant pass the challenge with my code so far...can some one tell me what i need to do...the link is:
https://learn.freecodecamp.org/front-end-libraries/sass/store-data-with-sass-variables
<style>
$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>

#2

looks right to me. Here is what i did using the link you provided and it worked .

/***Variable declared***/ $text-color: red; .header{ text-align: center; } /***Variable used***/ .blog-post, h2 { color: $text-color; }

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


#3

What is the difference? You haven’t marked your code so it’s hard to read.


#4

Ok. See again.

/***Variable declared***/ 
$text-color: red; 
.header{ text-align: center; } 
/***Variable used***/ 
.blog-post, h2 { color: $text-color; }