Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Rita Rani Paul
seal-mask
.a{fill-rule:evenodd;}techdegree
Rita Rani Paul
Front End Web Development Techdegree Student 10,189 Points

How can I change the default colour of a parent div in sass?

Ì tried: .grid_col--3{ .link &{ background-color: white !important; } } and it gives the following output in css .link .grid_col--3 { background-color: white !important; } }

but it doesn't give the required output in the browser. Can somebody please help? Regards

1 Answer

merc1er
merc1er
6,329 Points

I suggest you change the name of your class... .grid-col-3 would be more appropriate since it follows the CSS syntax convention

Also, here is maybe a solution:

.grid-col-3{ 
  background-color: white !important;
  .link{ 
     background-color: white !important; 
  } 
}