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

Css.important on Css.batch output only applies to last Css.Style #534

Open
Chadtech opened this issue Jan 22, 2021 · 0 comments
Open

Css.important on Css.batch output only applies to last Css.Style #534

Chadtech opened this issue Jan 22, 2021 · 0 comments

Comments

@Chadtech
Copy link
Contributor

Hello!

Today I ran code like this..

    [ Css.borderTopLeftRadius radiusSize
    , Css.borderTopRightRadius radiusSize
    , Css.borderBottomLeftRadius radiusSize
    , Css.borderBottomRightRadius radiusSize
    ]
        |> Css.batch
        |> Css.important

.. and the important was only applied to the last style.

I managed to reproduce it in this ellie: https://ellie-app.com/c8R5mP4Kvxsa1 , where specialBorderRadius should be applying a border radius to the top right and bottom left corners because of the important, but it is only applied to the top right corner.

I can see the code for why this is. There appears to be a mapLastProperty function that Css.important is using.

I would be happy to make the PR for this. Just let me know!

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