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

Sometimes Does not Apply or Can see font before loaded #8

Open
ctsstc opened this issue May 3, 2015 · 1 comment
Open

Sometimes Does not Apply or Can see font before loaded #8

ctsstc opened this issue May 3, 2015 · 1 comment

Comments

@ctsstc
Copy link

ctsstc commented May 3, 2015

Sometimes if you refresh in Chrome it does not end up downsizing the font like it should, but this doesn't seem to happen when you navigate to the page from another page.

Also sometimes you can see the font jump from large to downsized - right now I'm trying to play with fading the font in or showing it, once MM has been applied.

Could be possible it's loading before the DOM is fully ready?

edit: typo.minMaxFontSize(rule.selector); does not get fired when it doesn't work.

ctsstc added a commit to ctsstc/min-max-font-size that referenced this issue May 5, 2015
Problem:
scount gets passed over into the web request and doesn't call runFills until scount == 1. The problem is that if you have multiple files being requested they will asynchronously complete at different times rather than sequentially as the code would expect to be ran when the last scount comes through. If you have styling that isn't in the first styling sheet and it's first to complete then it calls runFills which will only consist of the first sheet and not the rest. (Assuming it's collecting all the styles before checking for fills)

Fix:
Implemented a global counter that increments for each sheet and decrements when it's finished, whether it's inline or requested. Once all sheets have been collected runFills is then called.

Extra: I was going to implement a 304 check, but it seems it never fired, so I removed it.
@ctsstc
Copy link
Author

ctsstc commented May 5, 2015

Just remembered my IDE uses Tabs, and what may look fine in my IDE will surely look bad in someone elses since this project uses spaces.

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

1 participant