• Resolved Joanne

    (@bluejpro)


    Hello ThemeAWESOME
    I am using a child theme of your wonderful TotalPress theme.

    When using the parent theme directly, the media query breakpoint at 1023px works as desired. The primary div and sidebar go to full width.

    But when I make a fresh child theme, using unaltered parent theme styles, the media query does not execute. The primary div and sidebar do not change width at the 1023px breakpoint. They just get thinner.

    I tried again to make a fresh child theme, thinking maybe it was something in the child theme calling the parent incorrectly. However, the media query does not work in the new child theme either.

    I realize I’m responsible for child theme code. However, I am curious why the parent theme styles do not work as expected for a child theme.

    I ran the parent theme style.css through a validator and found a few parse errors:

    23 Parse Error }@page{margin:.5cm}
    23 Parse Error }}
    23 too few values for the property width
    601 .comment-fields Value Error : margin-bottom Parse Error :

    Any suggestions for this?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thread Starter Joanne

    (@bluejpro)

    Update: (in case it helps anyone else)
    I updated the parent style sheet at line 23 to add a second curly bracket after @page
    23 @page{{

    This made things worse — nothing after the second curly bracket executed in my child theme.

    But after backing this change out and re-loading the original TotalPress style.css, the media queries for primary and sidebar divs worked as desired.

    The breakpoint at 1023px triggers full-width primary and sidebar now, even in the child theme.

    So for now this problem seems to be resolved.

    Thread Starter Joanne

    (@bluejpro)

    @anevins thank you for your reply.

    You are correct, there are no style rules (yet) in Child CSS because the child theme is calling parent styles:

    rendered HTML Line 35:

    <link rel=’stylesheet’ id=’parent-css’ href=’https://uncommonconsulting.com/2018dev/wp-content/themes/totalpress/style.css?ver=ParentTheme&#8217; type=’text/css’ media=’all’ />

    • This reply was modified 6 years, 9 months ago by Joanne.
    • This reply was modified 6 years, 9 months ago by Joanne.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m not sure I understand. Are you saying you had issues when you put certain CSS inside your Child Theme style.css file?

    Thread Starter Joanne

    (@bluejpro)

    Hello Andrew thanks for your question

    The issue came up when I created a child theme of TotalPress, and activated the child theme, without making any additional changes.

    The child theme links to the TotalPress parent stylesheet, https://uncommonconsulting.com/2018dev/wp-content/themes/totalpress/style.css

    But for some reason, the parent media queries did not fully execute in the child theme. They worked only when the parent theme was active.

    After re-loading the parent style.css from a local copy, and refreshing the browser, the child theme appears to be using all the media queries in the parent now.

    I wish I knew why it’s working now. I don’t but I’ll take it.

    I hope that answers your question.

    Joanne

    Theme Author ThemeAWESOME

    (@tsquez)

    Hi Joanne,

    It sounds as if this was a cache issue. The reason I say this is because you say you added an extra { (@page is part of the @media print query), which made things worse and then you undid that change and everything works fine.

    In any case, glad you got it worked out. Thanks again for using TotalPress

    Thread Starter Joanne

    (@bluejpro)

    Thank you @tsquez

    I agree.

    Nice to have your theme to work with! And I appreciate all the feedback.

    Joanne

    Theme Author ThemeAWESOME

    (@tsquez)

    You are very welcome Joanne. Glad you like the theme. If at all possible, please leave a rating and a review and let everyone know what you think ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Some media queries not running in child theme’ is closed to new replies.