Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1459784

    There are ways to scale checkboxes for safari – because these are very small . But doing this will scale those checkboxes for mobile devices iOS too!
    I tried to circumvent that by detection of touch-device – but it does not work.

    f.e:

    .responsive:not(.touch-device)  input[type=checkbox],
    .responsive:not(.avia_mobile)   input[type=checkbox] {
        -webkit-transform: scale(2,2); 
        transform-origin: left center;
    }
    #1459790

    i managed it now with :

    function detect_ios_device(){
    ?>
    <script type="text/javascript">
    window.addEventListener("DOMContentLoaded", function () { 
        if (navigator.maxTouchPoints > 1) {
          document.documentElement.className += ' ios-device ';
        }
    });
    </script>
    <?php
    }
    add_action('wp_head', 'detect_ios_device');

    so even if you set your iPhone / iPad to show websites as desktop websites – this is an additonal class on html then.

    i can use then :

    .responsive:not(.avia_mobile).avia-safari #top input[type=checkbox] {
        -webkit-transform: scale(2,2); 
        transform-origin: left center;
    }
    .responsive.ios-device.avia-safari #top input[type=checkbox] {
        -webkit-transform: none; 
    }
    #1459804

    Hi,

    Glad to know that you’ve found a working solution. Thanks for sharing!

    Best regards,
    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.