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

Help converting css to stylus

I need help with converting specific css code to stylus:

section.page1 {
    background-image: url(../img/mainBg-green.jpg), linear-gradient(to right,rgba(38,171,98,1),rgba(35,108,71,1))    
    background-blend-mode: multiply;
}

1 Answer

Alex Plaza
Alex Plaza
22,923 Points

It should be something like this

section.page1
  background-image url('../img/mainBg-green.jpg'), linear-gradient(to right,rgba(38,171,98,1),rgba(35,108,71,1))
  background-blend-mode multiply

Exactly what I thought. But I get a compile error. Something to do with the url('') part of the code.

Alex Plaza
Alex Plaza
22,923 Points

Try without the ''

../img/mainBg-green.jpg

But codepen compiles both. With and without commas.

the error message(maybe that will shed some light on the problem): link

Thank you for the help so far.