Sass: Nest CSS with Sass

Sass: Nest CSS with Sass
0

#1
// i also need someone to look at my code to know why i am not passing the challenge:
the url is:
https://learn.freecodecamp.org/front-end-libraries/sass/nest-css-with-sass


<style type='text/sass'>
  .blog-post {background-color:red;
      
    h1 {text-align: center;       
        color: blue;
    p {
    font-size: 20px;
        }
     }
     }
  
</style>

<div class="blog-post">
  <h1>Blog Title</h1>
  <p>This is a paragraph</p>
</div>

#2

You need to nest your styles properly. For ex.

.blog-post {
  h2 {

 }
.text-primary{

 }
}

Take a close look at your curly braces.


#3

i do that but test not pass, i put at the same level of nesting h1 and p

<style type='text/sass'>
  .blog-post {
    background-color:red;
    h1 {
      text-align: center;       
      color: blue;
    }

    p {
      font-size: 20px;
    }
  }
  
</style>

the style are applied but test not pass

image


#4

Can you share a link to your demo?


#5

my demo? i do not understand


#6

I see what’s wrong.

Try removing this line.

You somehow added this even though this line was not part of the exercise.


#7

do not work…

https://learn.freecodecamp.org/front-end-libraries/sass/nest-css-with-sass


#8

In my chrome-browser it worked. The test passed.


#9

IDK why not pass my code…i just need that for finish Sass