Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Support for [UIFont preferredFontForTextStyle:] #89

Merged
merged 1 commit into from
Mar 16, 2015
Merged

Support for [UIFont preferredFontForTextStyle:] #89

merged 1 commit into from
Mar 16, 2015

Conversation

dzindra
Copy link
Contributor

@dzindra dzindra commented Mar 14, 2015

This PR adds ability to style font properties with values of [UIFont preferredFontForTextStyle:].

To use it, instead of font name and size, use one of the following as font name:

  • body for UIFontTextStyleBody
  • caption1 for UIFontTextStyleCaption1
  • caption2 for UIFontTextStyleCaption1
  • footnote for UIFontTextStyleFootnote
  • headline for UIFontTextStyleHeadline
  • subheadline for UIFontTextStyleSubheadline

So instead

UILabel {
  font: "Helvetica" 14;
}

you use

UILabel {
  font: body;
}

On iOS6, the fonts will not be recognized, so you should use media queries.

@cloudkite
Copy link
Contributor

Thanks!

cloudkite added a commit that referenced this pull request Mar 16, 2015
Support for [UIFont preferredFontForTextStyle:]
@cloudkite cloudkite merged commit 8586f19 into ClassyKit:master Mar 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants