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

Custom background of the sidebar #2731

Closed
opqriu opened this issue Oct 2, 2020 · 9 comments
Closed

Custom background of the sidebar #2731

opqriu opened this issue Oct 2, 2020 · 9 comments

Comments

@opqriu
Copy link

opqriu commented Oct 2, 2020

After installing the tree style tabs I removed the default tab bar in Firefox. Since then I always use Firefox with a tree style tab on the right. By the way, it is not visually beautiful. It would be nice if the tree style tab had a background theme function.
Thanks.

@piroor piroor changed the title Nice addon. Custom background of the sidebar Oct 2, 2020
@piroor
Copy link
Owner

piroor commented Oct 2, 2020

TST is designed to apply Firefox's theme. If you install any theme including background image, it will be applied to the sidebar also.

And you can set your custom background image with a user style, like:

#background {
  background: url("https://example.com/something-image.jpg");
}

For more details please read documents about CSS background images.

Direct reference of remote images will grow traffics needlessly, so I recommend you to embed the image as a data: URI. You'll get data: URI of an image by something converter like: https://ezgif.com/image-to-datauri (Please remind that you can use only small images due to restrictions of the quota for a Firefox addon.)

@piroor
Copy link
Owner

piroor commented Oct 2, 2020

I have no plan to add a special option to customize background image because there are two main reasons:

  • It can be done with simple user style.
  • Even if I add such an option to TST, you'll still cannot use large images due to the quota restriction. So, I think that making the feature built-in won't help you.

Ah, but I've realized that embedding data URI of a dropped image will convenient. I'll try it later.

@opqriu
Copy link
Author

opqriu commented Oct 2, 2020

Thank you for your reply.
But
I applied it to "chrome/userChrome.css" and the background does not come out.

#background {
background: url("https://example.com/something-image.jpg");
}

Thank you. Happy Today :)

@irvinm
Copy link
Contributor

irvinm commented Oct 3, 2020

You want to apply the CSS code in the TST options under: Advanced -> Extra Style Rules. (Not in your chrome/userChrome.css file)

@piroor
Copy link
Owner

piroor commented Oct 3, 2020

After the commit ccae58d TST allows you to embed the data: URI of a dropped image on the style editor field. However, due to a bug of Firefox itself the feature does not work at the about:addons page, instead you need to open TST's options page in a separate tab.

@piroor
Copy link
Owner

piroor commented Oct 3, 2020

I've done more changes. Now the button "Load from File" allows you to embed data: URI of images.

@opqriu
Copy link
Author

opqriu commented Oct 3, 2020

Thank You.
I was successful.

#background {
background: url(https://cdn.clien.net/web/api/file/F03/10645410/59c65e28f09a24.jpg?w=1200);
}

@irvinm
Copy link
Contributor

irvinm commented Oct 3, 2020

@opqriu can you close this item?

@piroor did you want to add a wiki entry for this feature?

@opqriu opqriu closed this as completed Oct 4, 2020
@piroor
Copy link
Owner

piroor commented Oct 4, 2020

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

No branches or pull requests

3 participants