• Resolved sunclouddesign

    (@sunclouddesign)


    Hi there,

    This plugin looks great. I’m wondering – if I wrote some custom css for an element that has a responsive setting in my child theme css, will my custom css overwrite that responsive setting?

    For example, if I write in custom css:

    .child_page {
    width: 100%;
    }

    And my child theme contains:

    @media only screen and (max-width: 768px) {

    .child_page {
    width: 50%;
    }

    Will the Custom CSS still honor the responsive setting in the child theme, or should I paste the responsive css from the child theme into the Custom CSS to ensure those settings remain?

    Thanks!

    https://www.ads-software.com/plugins/simple-custom-css/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The @media css will always apply to the set screen size, regardless of what else you put in the Custom CSS admin area. This is because the css for @media is nested and requires the screen size (768px in this case) to be encountered before it is applied.

    I hope that makes sense.

    To be honest, I put all custom css in the plugin area anyway, and just use child themes for adding to functions.php etc. I find it much easier than editing the child theme css via FTP.

    Thread Starter sunclouddesign

    (@sunclouddesign)

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Will custom CSS override @media queries?’ is closed to new replies.