Skip to content
pinegrow.com
Docs menu

CSS/SASS path issue when using Background image attribute

Since we have received numerous messages about this issue – that we plan to adress shortly in a future version of Pinegrow – here is a quick explanation about the situation and a quick temporary workaround.

When you add a background image as an inline Style attribute, the image path is relative to the page.

Pinegrow Style panel with background-image set to url gfx/Gnarly_Bristlecone_Pine.jpg in the style attribute, with an arrow pointing to it.
When you save this rule in a CSS file, all paths are relative to that CSS file.

Save element style to CSS rule dialog with the selector .sample and style.css chosen as the stylesheet.

So the image path - which was set to be relative to the page - is no longer correct since Save as CSS rule doesn’t do any path conversion at the moment.

Pinegrow project tree and style.css showing the .sample rule with its background-image url.

Also, when using relative asset paths in SASS sources, they have to be relative to the compiled CSS location, not to the SASS file.

We have planned to adress both cases shortly in a future version of Pinegrow. In the mean time, you can fix your image background styles by editing the rules through the style panel.

Visual Editor Background section with the Image field set to gfx/Gnarly_Bristlecone_Pine.jpg, with an arrow pointing to it.