postcss-bidirection icon indicating copy to clipboard operation
postcss-bidirection copied to clipboard

Generate polyfill for the transition property

Open erickskrauch opened this issue 3 years ago • 0 comments

The case:

.toggleIcon {
    position: absolute;
    inset-inline-end: $dropdownPadding;
    top: 16px;
    transition: inset-inline-end 0.3s cubic-bezier(0.23, 1, 0.32, 1); // easeOutQuint

    &:hover {
        inset-inline-end: $dropdownPadding - 5px;
    }
}

Output:

.toggleIcon {
    position: absolute;
    inset-inline-end: $dropdownPadding;
    top: 16px;
    font-size: 17px;
    transition: inset-inline-end 0.3s cubic-bezier(0.23, 1, 0.32, 1); // easeOutQuint

    &:hover {
        inset-inline-end: $dropdownPadding - 5px;
    }

    // No polyfill for the transition field!

    html[dir="ltr"] &:hover {
        right: $dropdownPadding - 5px;
    }

    html[dir="rtl"] &:hover {
        right: $dropdownPadding - 5px;
    }
}

erickskrauch avatar Mar 26 '21 02:03 erickskrauch