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

DuplicateProperty should not produce a lint when including a fallback for env() #948

Open
srawlins opened this issue Apr 2, 2018 · 0 comments

Comments

@srawlins
Copy link
Contributor

srawlins commented Apr 2, 2018

iOS 11 and the iPhone X have the notch thing, and safe areas and all, which can be styled around using env() (or constant() in iOS 11.0 I guess). But fallbacks still need to be produced for browsers that don't understand env(). Taken from an ayogo blog post:

header {
    /* ... */

    /* Status bar height on iOS 10 */
    padding-top: 20px;

    /* Status bar height on iOS 11.0 */
    padding-top: constant(safe-area-inset-top);

    /* Status bar height on iOS 11+ */
    padding-top: env(safe-area-inset-top);
}

DuplicateProperty should recognize that: properties with a value that is an env() function call (or I suppose constant() function call) should not be considered duplicate.

In the meantime of course, you can use ignore_consecutive.

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

No branches or pull requests

1 participant