Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with adding a png background #172

Open
LightningRpper opened this issue Mar 15, 2022 · 1 comment
Open

Problem with adding a png background #172

LightningRpper opened this issue Mar 15, 2022 · 1 comment

Comments

@LightningRpper
Copy link

LightningRpper commented Mar 15, 2022

I'm trying to add in a png called "lightning background.png" as a background to my website. I have the image in app/assets/images and this as my code for the body section of app/stylesheets/scaffolds.

body {
  background-color: #fff;
  //color: #333;
  color: white;
  margin: 33px;
  background-image: image-url('lightning background.png');
  background-repeat: no-repeat;
  background-size: 100%; 
}

However, I am getting an error that says

Error: error in C function image-url: bad URI(is not URI?): "lightning background.png"
        on line 6:21 of app/assets/stylesheets/scaffolds.scss, in function `image-url`
        from line 6:21 of app/assets/stylesheets/scaffolds.scss
>>   background-image: image-url('lightning background.png');

and its pointing me in the direction of line 9 of app/views/layouts/application.html.erb.
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

What's the issue here and how can I adjust it to give the website more of a proper background?

@johnnyshields
Copy link

johnnyshields commented Feb 5, 2023

FYI I'm maintaining dartsass-sprockets which is a fork of this gem. You can try it and see if your issue is resolved; it uses a different engine (Dart Sass) under-the-hood. If not, please file an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants