• Resolved dmcpro

    (@dmcpro)


    Your plugin is great, it offers free features that would otherwise be paid on other plugins. That’s why your plugin is a good choice, but since in my case, I still need to support IE11 I tried to make a workaround on the issue. The workaround is based on WordPress’s Star Rating on Add New Plugin Page. Instead of using SVG to mask on a background color to render the Star Rating, they used the font-family dashicons. The dashicons has characters \f155 for star-solid, \f459 for star-half and \f154 for star-regular. Using these characters I override your CSS to use these when rendering on IE.
    Here is my code solution:

    
    @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
        .strong-rating span.star::before {
            content: "\f155";
            font-family: dashicons, serif;
            text-align: center;
            background: transparent;
        }
        .strong-rating-wrapper.average .strong-rating span.star.half::before {
            content: "\f459";
        }
        .strong-rating span.current ~ span.star::before {
            content: "\f154";
        }
    
        .strong-rating label::before {
            content: "\f155";
            font-family: dashicons, serif;
            text-align: center;
            background: transparent;
        }
        .strong-rating-wrapper.in-metabox .strong-rating > label::before {
            background: transparent;
        }
        .strong-rating-wrapper.in-metabox input[type='radio']:checked + label::before {
            background: transparent;
        }
        .strong-rating input:checked ~ label::before {
            content: "\f154";
        }
        .strong-rating:hover input ~ label::before, .error .strong-rating:hover input ~ label::before {
            content: "\f155";
        }
        .strong-rating input[type='radio']:checked + label::before, .error .strong-rating input:checked + label::before {
            content: "\f155";
        }
        .strong-rating:hover input:checked + label::before, .error .strong-rating:hover input:checked + label::before {
            background: transparent;
        }
        .strong-rating:hover label:hover ~ input:not(:checked) + label:before {
            content: "\f154";
        }
    }
    
    • This topic was modified 4 years, 3 months ago by dmcpro.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dmcpro

    (@dmcpro)

    I forgot to add that it is needed to enqueue the dashicons css wp_enqueue_style('dashicons'); before the code

    Hello @dmcpro ,

    Thank you for contacting us, immediately after reading your answer we posted the problem on our github and it will be fixed according to your steps. Thank you very much for your involvement in helping us. I wish you a beautiful day !

    Let me know if you have more questions !

    All the best,
    Marian

    Thread Starter dmcpro

    (@dmcpro)

    @visi19
    Thank you for responding! Looking forward to this. By the way, if possible please let me know when it can be released. Thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Solution for Star Rating not rendering correctly on IE’ is closed to new replies.