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

Bug: Extension crashes when user add a local background image file using CSS #18

Open
Droyk opened this issue Jun 16, 2019 · 1 comment

Comments

@Droyk
Copy link

Droyk commented Jun 16, 2019

background-image: url('../background.png');
it crashes.

The reason I want to add a background using CSS it's because I want to add gradient to it.
background-image: url('../background.png'), linear-gradient(0deg, #5b4b87 0%, #222831 79%, #5a4b87 100%);

@heybam
Copy link

heybam commented Nov 15, 2020

i don't think it's a bug. i think you just make some mistake on your css code.

  1. you don't need to insert picture manually with css, just pick your picture normally thru background setting (gear icon) and then add your css code.
  2. if you want to pick picture manually, you need encode the picture into base64 format or put external link of picture, you can't insert the picture by put the picture path on your computer into your css code like you did. try this
    html { background: url(put your base64 picture or link of picture); }
  3. if you want to add the gradient effect your can try to use html:before for your gradient css code.

example:
html { background: url(https://wallup.net/wp-content/uploads/2015/12/111723-landscape-sunset-snow-material_style.jpg); }
html:before {
content: "";
position: absolute;
height: 100%;
width: 100%;
opacity: 0.5;
background: linear-gradient(
45deg,
#f09433 0%,
#e6683c 25%,
#dc2743 50%,
#cc2366 75%,
#bc1888 100%);
}

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