Classes v Settings

I’m trying to get my head round which trumps which, Classes or Settings?

I’m currently going through my website deleting Margins from Settings, so I can be sure that Custom Classes are ‘taking control’ of my layouts.

Trouble is - unless anybody knows better - I’m having to delete Margins four times over, once for every breakpoint. Ugh!

Any info would be appreciated, I cannot find anything specific in Blocs Docs.

(Also, struggling with understanding Inherit… where is it inherited from?)

Thanks!

1 Like

Due to some behavior with Blocs, I can relate to this. So glad you ask the question. It could be me, but I’ve seen it both ways.

:+1: ditto!

Starting with the smallest (xs) breakpoints will do the trick

1 Like

@Jerry Am I wrong or does this only work if the margin has been added by the same way. If there was a margin set to every breakpoint by hand, then it would only delete the ones on XS?

edit: I think this even works only on Class Manager, not on Settings?

@Jerry
Not for me sadly, that’s what I did as that was where the worst issues were… but the darned critters were still there on other break points.

Settings should have priority over classes. It’s effectively a local class override.
Removing settings on one breakpoint doesn’t mean the settings on another breakpoint are no longer applicable, so it’s correct behaviour that you have to remove settings on each breakpoint.

The moral is use classes not settings as much as possible to have consistency across the website.

We all use settings in times of stress and quick-fixes, but really we shouldn’t.

1 Like

That’s why I use single classes for text and background colors (main, alt, secondary). And once I set the font, color and text-size of my headings, I create separate classes (h1-style, h2-style etc.) where I just copy the style of each heading (everything but the colors). That way I can easily make a h1 look like a h4 and apply my main, alt or secondary text color to them. Keeps it easy, uncluttered and within my set color scheme.

A bit like tailwind css works.

So yes, use classes whenever possible.

1 Like