Skip to content

Rule idea: check for values that work in browser, but not in React Native #6

@kristerkari

Description

@kristerkari

Instead of having a huge list of possible values that the properties can have in React Native, it would be a lot easier to just warn for values that work in browser, but not in React Native.

There are at least two examples that I can think of currently:

box-shadow's spread-radius works in browser, not in React Native (styled-components and css-modules):

box-shadow: 10px 20px 30px 40px red;

This works in RN:

box-shadow: 10px 20px 30px red;

line-height with multiplier value works in browser, not in React Native:

line-height: 1.41;
line-height: 150%;

This works in RN:

line-height: 24px;

There are probably many other CSS property values that have small differences in values that could be linted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions