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

Maximum style length? #25

Closed
silverwind opened this issue Feb 16, 2017 · 13 comments
Closed

Maximum style length? #25

silverwind opened this issue Feb 16, 2017 · 13 comments

Comments

@silverwind
Copy link

Is it possible that there is a limit on how big a user stylesheet can be in bytes/lines? I'm observing that certain rules from http://userstyles.org/styles/37035 are not being applied with this extension, for example this rule (currently on line 1440 of the style):

.site-header-nav a { color: #e2e2e2 !important; }

When I manually move the rule to the beginning of the style, it is applied correctly. Same rules work in Stylish for Chrome and Firefox (These are the topic tags on Github repos like https://github.com/StylishThemes/GitHub-Dark).

I thought that another explanation could be that something might throwing off Safari's CSS parser,but I'm not seeing anything logged in the browser console at least.

@350d
Copy link
Owner

350d commented Feb 16, 2017

@silverwind did you tried to disable css minification in Stylish settings already?

@silverwind
Copy link
Author

Yes, it's disabled and I reinstalled the style multiple times with that setting.

@350d
Copy link
Owner

350d commented Feb 16, 2017

As i can see - complete style injected without any problems and complete style availabe to edit and update, so, should be a problem in style itself.

@silverwind
Copy link
Author

Do you know if there is there a debug console in Safari that points out CSS errors in user styles?

@350d
Copy link
Owner

350d commented Feb 16, 2017

I've added last line with debug rule * {color: red !important} and everything works fine:

screenshot 2017-02-16 14 48 25

@350d
Copy link
Owner

350d commented Feb 16, 2017

.site-header-nav a available two times in this style and if you trying to move last one to beginning of the style, you still have another rule in other place

@silverwind
Copy link
Author

Sorry, meant to post this better example:

.topic-tag { background: #182030 !important; }

@silverwind
Copy link
Author

Still trying to find the cause, but I guess it's not an issue with the extension. Maybe a unquoted data-uri or something similar is throwing off Safari's parser.

@350d
Copy link
Owner

350d commented Feb 16, 2017

Try latest version 1.9.8 and report back please.

@silverwind
Copy link
Author

It works! I had to reinstall the style two times, but now everything is fine.

@350d
Copy link
Owner

350d commented Feb 16, 2017

cool, i guess problem was in minification and way to check this option status, so, enjoy 😀 I will resubmit this version ASAP to Apple

@silverwind
Copy link
Author

Nice. The issue was looking like a section in the middle of the style was "invisible" to Safari, really weird.

Which minfier (and options) are you using? I can recommend https://github.com/jakubpawlowicz/clean-css btw :)

@350d
Copy link
Owner

350d commented Feb 16, 2017

YUI Compressor

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