Community forum for knowledge and support

Updated 11 months ago

Applying margin and padding classes as combo class or creating a separate margin div

At a glance

Should one apply margin-xxx and padding-xxx classes as combo class to container-xxx classes?

Or should one create a separate margin-xxx div inside the container class?

M
R
3 comments

guess that would depend on the design really. Overall I probably wouldn't expect to see any combo classes at all on any of the core structure classes like container, padding-global, padding-section-large - though my favorite little trick with padding-section-large etc classes is to add padding-bottom or padding-top to them if I have two sections with the same background color on them - reducing the spacing a bit.

But yeah, I think a new div with padding classes is likely the answer.

Thank you! Yes, I was seeing that CF guide is mentioning to add padding-section-xxx to the padding-global, that’s why I asked

ah yeah, that was a recent change to combo those two together. But I wouldn't expect to see combo classes or additional styles done to container.

Add a reply
Sign up and join the conversation on Slack