Skip to content

Support CSS font size keywords #1814

Open
@mhsmith

Description

@mhsmith

Since #2029, font sizes are now consistently measured in CSS points, which makes the default sizes quite similar on all backends:

  • Android: 10.5pt (14dp)
  • Cocoa: 9.75pt (13 "Apple points")
  • GTK: 10 or 11pt
  • iOS 12.75pt (17 "Apple points")
  • Windows: 9pt

But we can't make them identical, because we’re following each platform’s own UI guidelines. This makes it difficult to use the font_size style, e.g. a Toga widget with font_size=11 will appear larger than the default on WinForms but smaller than the default on iOS (see examples/font_size).

I think the best solution to this is to support the CSS font size keywords small, medium, large, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.good first issueIs this your first time contributing? This could be a good place to start!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions