Notice: The devs are no longer actively involved in the forum, so any bug reports regarding the Stylish extension or this website should be sent to them directly at contact@userstyles.org.
Changing your Avatar.
The only way to currently add or change a forum avatar is through Gravatar.com. The email address used for your Userstyles.org account must be one of the email addresses that is registered to your Gravatar account.

The first time I open a web, sometimes the style is broken. If I refresh it works again.

It's a random bug I found in several themes, including some of my own.
When I first open a website, the css theme is only partly loaded, and some aspects like the backgrounds are still like in the original web (irritating because I use stylish for dark themes). Simply reloading the web or navigating through its sections makes the theme working again... but if I leave and come back, or if I open a new tab in the web, the bug might happen again.

Are those CSS themes defectives or too complex to be loaded fully? (when I simplified my dark theme for nintenderos.com the problem dissapeared)
...Or is it just a bug of the AddOn?

Comments

  • Yes, its the addon problem, use stylus instead
  • Thanks for the tip!
  • o!o!
    [?]
    The problem is the style. The site and the user style are targeting some of the same elements with CSS selectors that have the same specificity. In that case the last rule loaded wins. Often this happens when a selector is copy+pasted from a site style into a user style.

    If the user style is loaded before the site style, then the site style wins those conflicts when it arrives. What you'll see is that some of your style rules are applied and some aren't.

    The first time you load a site there is no cached copy of the site's style. The user style is applied before the site style, and when the site style arrives it wins these conflicts. When you reload the page the site style is loaded (quickly) from a cached copy, the user style is applied after the site style, and the user style wins these conflicts.

    If you've disabled caching in your browser, or if the web site doesn't allow the site style to be cached, then this will happen more often. The browser will still keep a cached copy of the site style in memory until the last tab that uses it is closed (a bit longer really if memory allows, in case you return to the site with the "back" button), and while it does the user style will work as expected, but after that copy is gone the half-styled look will return. It does seem random if you don't know the cause.

    @_33_kk_: Why do you believe this doesn't affect Stylus? Do you have a reason, or just a strong partisan belief in the power of the fork?
  • Impossible to say for sure what OP's issue is without testing the style in question, but Stylish's injection is flakier in general. You can test it yourself by creating two styles in either extension which compete with the same specificity.

    Stylus will win the specificity battle because it ensures styles are always injected last, whereas Stylish isn't even consistent. Often times, they're even injected before the body.

    image
  • edited August 12 [?]
    o! said:


    @_33_kk_: Why do you believe this doesn't affect Stylus? Do you have a reason, or just a strong partisan belief in the power of the fork?

    Well, i don't. Just its still maintained and better overall. And as anagrammar said stylus injects css better so it probably would work with it.
Sign In or Register to comment.