scompiler/red-zoom-angular

Not able to change red background color on image hover

Closed this issue · 2 comments

Hi @4Bos , I am not able to change the red background color on the image hover, could you please help me figure out the solution, not able to debug from where exactly red color is getting applied on the class

4Bos commented

Instead of:

@import '~ngx-red-zoom/styles/base.scss';
@import '~ngx-red-zoom/styles/style-window.scss';

You may use the following styles:

@import '~ngx-red-zoom/styles/base.scss';
@import '~ngx-red-zoom/styles/mixins/style-window.scss';

.red-zoom--style--window {
    @include red-zoom-style-window(
        $overlay-color: rgba(#e50032, .5)
    );

    .red-zoom__lens {
        --window-x: calc(var(--red-zoom-thumb-x, 0px) + var(--red-zoom-thumb-w, 0px) + 32px);

        left: var(--window-x, 0px);
        top: var(--red-zoom-thumb-y, 0px);
        width: var(--red-zoom-thumb-w, 0px);
        height: var(--red-zoom-thumb-h, 0px);
    }
}

Where $overlay-color is the "red background color".

Thank you so much!!