Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(core): Typography improvements#10648

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
CatchABus wants to merge13 commits intoNativeScript:main
base:main
Choose a base branch
Loading
fromCatchABus:feat-letter-spacing-dip

Conversation

CatchABus
Copy link
Contributor

@CatchABusCatchABus commentedNov 8, 2024
edited
Loading

PR Checklist

What is the current behavior?

Right now, typography is a bit inconsistent between the two platforms and MDN specs.
More specifically, line-height does not act as a height and its visual result is quite different than that of browser.

What is the new behavior?

  • Small android size defaults cleanup
  • Added support for line-height dip and percentage units and updated calculation to be closer to that of browser
  • Corrected UIButton letter-spacing calculation which used the deprecated font property to read font size
  • Corrected iOS Button formatted text default color (it's different than the button with regular text)

BREAKING CHANGES:

  • Line height will apply like a height as the name indicates while {N} has long been using it as line-spacing. This might cause strange visual changes in apps.

vallemar and farfromrefug reacted with thumbs up emoji
@CatchABus
Copy link
ContributorAuthor

CatchABus commentedNov 18, 2024
edited
Loading

After a bit of consideration, I removed all changes regardingline-height.
The reason is that the css property can also accept a multiplier value which is one of the recommended usages in the web.
NativeScript css dip values are unitless, so if we suddenly treat theline-height value as dip then we have no way of setting a multiplier.
In few words, it's best to leave it as is.

EDITED: Added line-height percentage unit to make up for the lack of multiplier value.
So we can parse raw number as dip without any worries and use percentage value whenever needed.

@CatchABusCatchABus marked this pull request as ready for reviewJanuary 25, 2025 18:11
@CatchABus
Copy link
ContributorAuthor

CatchABus commentedJan 25, 2025
edited
Loading

All changes regarding letter-spacing unit have been removed from this PR.
We might re-visit that case in the future provided that we don't skip theem native support since it's very useful when dealing with responsive layouts.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@CatchABus

[8]ページ先頭

©2009-2025 Movatter.jp