Skip to content

Conversation

@xuhcc
Copy link
Contributor

@xuhcc xuhcc commented Dec 19, 2019

PR Checklist

What is the current behavior?

  • Customizing the font, text color and link color using CSS is not supported.
  • Text is not selectable on Android.
  • Unnecessary left padding on IOS.

What is the new behavior?

  • Allow to set text color with color CSS property.
  • Allow to set link color with link-color CSS property.
  • Allow to set font attributes with font-family and font-size CSS properties.
  • Make text selectable on Android by default (for consistency with IOS).
  • Remove extra padding on IOS.

Implements #1266
Related: #1268 #4358 #4746

BREAKING CHANGES:

The appearance of HtmlView component may change in existing apps.

- Allow to set text color with `color` CSS property.
- Allow to set link color with `link-color` CSS property.
- Allow to set font attributes with `font-family` and `font-size` CSS properties.
- Make text selectable on Android by default (for consistency with IOS).
- Remove extra padding on IOS.
@cla-bot cla-bot bot added the cla: yes label Dec 19, 2019

const majorVersion = ios.MajorVersion;

function uiColorToHex(uiColor: UIColor): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better if you move the function in the nativescript-core/color/color-common.ts file and use it from there, as it seems like something that can be used in other places as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it a static method in Color class.

@vtrifonov
Copy link
Contributor

vtrifonov commented Jan 8, 2020

@xuhcc I've added the new properties in the e2e test by committing directly in your branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants