These css questions just keep giving me issues. At first switching to chrome worked and solved my issues for 3 .css() functions inside jQuery.
I’m now on Sass and can’t complete anything. I’ve tried using chrome and firefox to no avail. I can see my code working and changing the color of the text (I’ve tested blue, purple, red, etc.)
I looked at the answer code and it was almost exactly the same as mine (they have " style type=‘text/sass’ " instead of ‘text/scss’ for mine. I tried using this and all my styling went away (assuming that’s a legacy answer).
I also tried separating my working .blog-post, h2 { . . . } to be:
.blog-post { . . . }
.h2 { . . . }
to see if it was not reading them for some grouping issue, did not work.
I have reloaded my pages on both browsers, reset my code…many times.
The only thing I haven’t tried was using a different computer, because I don’t have access to one at the moment.
I really want to learn this stuff but if every question I have goes like this I may just move on to the react part of the course -_-;
Any help would be greatly appreciated =]
Your code so far
<style type='text/scss'>
$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; rv:77.0) Gecko/20100101 Firefox/77.0
.
Challenge: Store Data with Sass Variables
Link to the challenge: