Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #406954

    I need to make heavy CSS changes to the theme and I’d like to keep all of them in my child theme css file. I don’t want to make any changes on the dashboard. The problem is that a dynamic css seems to be loading after my child theme css and overwriting all my styles on it.

    example

    I’m already making my rules far more specific than I’d like to. How can I have my styles applied on top of the parent theme without writing !important everywhere?

    #407203

    Hey usystem!

    Are you adding your custom CSS code into Style.css file of your child theme?

    Regards,
    Yigit

    #407941

    Hi Yigit,

    Yes I am. I have several Sass partials and I import them in a style.scss file, which then I compile into a syle.css file on the root of my child theme.

    On my first post I added an example image but it seems the link expired, here it is again:

    There’s a css file with a very long name that is loading on top and overwriting my styles.

    #408341

    Hey!

    Try adding html #top in front of your CSS rules like so.

    html #top a { color: blue; }
    

    Or just #top like so.

    #top #header { background: red; }
    

    If that does not work then you will need to use the !important override.

    Best regards,
    Elliott

    • This reply was modified 9 years, 9 months ago by Elliott.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.