Support CSS font size keywords
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
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.
Contributor guide
Research direction
Start with the examples/font_size example and review how font_size is currently measured across the Android, Cocoa, GTK, iOS, and Windows backends. The work is done when CSS font size keywords such as small, medium, and large are supported while respecting each platform’s UI guidelines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100