mdgriffith / style-elements

Create styles that don't mysteriously break!
http://package.elm-lang.org/packages/mdgriffith/style-elements/latest
BSD 3-Clause "New" or "Revised" License
445 stars 49 forks source link

Rendered some transforms #131

Closed miyamoen closed 6 years ago

miyamoen commented 6 years ago

My style looks like this:

style MyStyle
            [ translate 0 -30 0
            , scale 0.7 0.7 1
            , variation MyVariation
                [ rotate <| degrees 180
                , translate 0 30 0
                , scale 0.7 0.7 1
                ]
            ]

I expected this style is rendered like this:

.style-elements .my-style-my-variation__956448198 {
    transform: rotate(3.141592653589793rad) translate3d(0px, 30px, 0px) scale3d(0.7, 0.7, 1);
}

But actual is:

.style-elements .my-style-my-variation__956448198 {
    transform: rotate(3.141592653589793rad);
    transform: translate3d(0px, 30px, 0px);
    transform: scale3d(0.7, 0.7, 1);
}

This does not work as expected.

https://github.com/mdgriffith/style-elements/blob/2c4585dcb20090d60459f6d8d0c2506398957284/src/Style/Internal/Render.elm#L118 Style.Internal.Render.preprocess does not process Style.Internal.Model.Variation and Style.Internal.Model.PseudoElement branches.

I want to process...

Versions