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

refactor(transforms): add platform option 'basePxFontSize' #505

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

jbarreiros
Copy link
Contributor

Issue #, if available:
NA

Description of changes:
Per this conversation, this PR adds a basePxFontSize platform option, and updates each remTo* transform to use it.

Also added missing unit tests for size/swift/remToCGFloat.

I realize that either this PR or #491 will need a quick update, depending which is merged first. Let me know what you want me to do.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@chazzmoney chazzmoney changed the base branch from main to 3.0 December 15, 2020 00:29
@chazzmoney
Copy link
Collaborator

chazzmoney commented Dec 15, 2020

I realize that either this PR or #491 will need a quick update, depending which is merged first. Let me know what you want me to do.

#491 has been merged; feel free to make updates to this as needed.

Also, would it be possible to rebase this to the 3.0 branch?

Thank you for these contributions!

@jbarreiros jbarreiros force-pushed the basePxFontSize-option branch from a50fc78 to 499f6c3 Compare December 15, 2020 02:46
@jbarreiros jbarreiros force-pushed the basePxFontSize-option branch from 95e7836 to 69018bc Compare December 15, 2020 03:06
@jbarreiros
Copy link
Contributor Author

Rebased, and updated size/pxToRem to use the new getBasePxFontSize() method.

This should be good to go.

Copy link
Member

@dbanksdesign dbanksdesign left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@dbanksdesign dbanksdesign merged commit 88a0046 into amzn:3.0 Dec 22, 2020
dbanksdesign pushed a commit that referenced this pull request Jan 25, 2021
Adds basePxFontSize platform option which allows you to set the base px font size for pixel transforms. The default remains the same, 16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants