dixonandmoe / rellax

Lightweight, vanilla javascript parallax library
https://dixonandmoe.com/rellax/
MIT License
7.08k stars 876 forks source link

Use getComputedStyle for initial transform #148

Closed sergeymorkovkin closed 5 years ago

sergeymorkovkin commented 5 years ago

Recommend using getComputedStyle() for getting initial transform property value. Otherwise each rellax shape should be initialized in multiple places (class and style). E.g.:

.shape {
    right: 0;
    transform-origin: right top;
}

<div class="transform: rotate(-45deg);"></div>

sergeymorkovkin commented 5 years ago

Non-relevant, since it doesn't return what's specified in style attribute. Closing.