Theme overrides css

Hello,

In WordPress in order to change the design of certain themes/plugins, one need to clone the item then put it in the right folder and then one can add all the changes that one desires.

In HubSpot it seems the changes to the css landscape can be done via adding the new css classes to the theme-overrides.css file.

Question: Is that correct ? Is that how the changes to the themes are done in HubSpot ?

HI @Anonymous1234 the easiest way to overwrite files for a theme is to create a child theme, from there you can overwrite CSS from any of the theme CSS files in the child.css file that’s created. You don’t have to overwrite entire CSS files and miss out on updates, you can pull what you need from the main theme, copy it to the child.css and then make your adjustments.

Thank you for your answer.

Isn’t the theme-overrides.css file meant as a tool to override css from the theme files ?

How does child theme creation work and how one does then override css via it ?

you’re welcome @Anonymous1234,

theme-overrides.css is part of the old structure for theme files, I think they’ve moved away from that with newer themes and the boilerplate.

If your theme has one, and it’s not a marketplace theme, then you can overwrite directly there.

If you have a marketplace theme with a theme-overrides.css, it wouldn’t be directly editable either way, you’d have to clone to a child theme and modify there anyway.

These are the step-by-step directions for creating a child theme from Power Pro (I wrote these when I freelanced with their team) - it would work the same for your theme if it’s in the @marketplace folder, you’d just open the corresponding theme folder instead of what’s shown for Power Pro.

If you have a custom theme, editing directly would be better than creating a child theme.