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

Fix false positives for system fonts in font-family-no-missing-generic-family-keyword #3794

Merged
merged 1 commit into from Nov 12, 2018

Conversation

regseb
Copy link
Member

@regseb regseb commented Nov 9, 2018

Which issue, if any, is this issue related to?

Closes #3793

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@regseb Thanks for your contribution.

Is there somewhere in the specs we can find out more about these font values? I believe the current list is based on the one found in this spec.

@regseb
Copy link
Member Author

regseb commented Nov 9, 2018

@jeddy3 I got list from MDN. Here are the spec.

@jeddy3
Copy link
Member

jeddy3 commented Nov 9, 2018

Fascinating! Thanks for the sharing the link to the spec. I had no idea there were such things are system fonts and they are set using the font shorthand property which is sometimes not a shorthand property!

Here's the relevant bit from the spec for those interested:

System fonts may only be set as a whole; that is, the font family, size, weight, style, etc. are all set at the same time. These values may then be altered individually if desired. If no font with the indicated characteristics exists on a given platform, the user agent should either intelligently substitute (e.g., a smaller version of the 'caption' font might be used for the 'small-caption' font), or substitute a user agent default font. As for regular fonts, if, for a system font, any of the individual properties are not part of the operating system's available user preferences, those properties should be set to their initial values.

That is why this property is "almost" a shorthand property: system fonts can only be specified with this property, not with 'font-family' itself, so 'font' allows authors to do more than the sum of its subproperties. However, the individual properties such as 'font-weight' are still given values taken from the system font, which can be independently varied.

[Emphasis mine]

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR LTGM. Nice work :)

@jeddy3 jeddy3 changed the title Fix system font values on font property Fix false positives for system fonts in font-family-no-missing-generic-family-keyword Nov 9, 2018
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @regseb 👍

@ntwb
Copy link
Member

ntwb commented Nov 12, 2018

Chengelog updated in: 384f201

Fixed: false positives for system fonts in font-family-no-missing-generic-family-keyword (#3794).

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

Successfully merging this pull request may close these issues.

None yet

3 participants