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

not able to sort fonts correctly #30

Closed
anuragphadke opened this issue Dec 31, 2020 · 4 comments
Closed

not able to sort fonts correctly #30

anuragphadke opened this issue Dec 31, 2020 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@anuragphadke
Copy link

anuragphadke commented Dec 31, 2020

Hi,
I am sorting the CSS at https://beta.webfast.co/webfives-com/main.css as mobile-first.
However, the fonts seem to be bit whacky after the sort.

Scroll to the section that says "Make your mobile website load under a second"

Before: https://beta.webfast.co/webfives-com/before.html (uses Proxima font)
After: https://beta.webfast.co/webfives-com/after.html (uses Graphik font)

Question 1: Is there a way to retain the order of CSS that is not included as part of @media query? If I copy the CSS that's not part of @media query to the bottom (CSS specificity maybe?), the page renders w/o any issues.

Question 2: Do I need a custom sort algorithm here?

@yunusga
Copy link
Owner

yunusga commented Dec 31, 2020

Hi, you problem is Graphik insted Proxima after sorting?

after.css:43 - body, .site-title { font-family: Poppins, var(--nv-fallback-ff); }
after.css:806 - body { font-family: Graphik,-apple-system,BlinkMacSystemFont,Segoe UI,var(--nv-fallback-ff); }

Font family is redefined on the 806th line

@yunusga yunusga self-assigned this Dec 31, 2020
@yunusga yunusga added the question Further information is requested label Dec 31, 2020
@anuragphadke
Copy link
Author

anuragphadke commented Dec 31, 2020 via email

@yunusga
Copy link
Owner

yunusga commented Dec 31, 2020

In this case, you need to specify the rules correctly, because sorting MQ does not affect the usual rules in any way, but only groups similar ones, moves them down and sorts. Which reveals the specificity of rules without MQ standing before or after them before sorting. Custom sort algorithm won't help.

@yunusga yunusga pinned this issue Dec 31, 2020
@anuragphadke
Copy link
Author

anuragphadke commented Dec 31, 2020 via email

@yunusga yunusga closed this as completed Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants