Sorry another question today... Reusing or global settings?

Sorry Foundry newbie alert again with second question of the day. Is there a way to apply global settings for common settings such as margin, padding etc?

For instance if I use a Margin stack over and over again with settings that aren’t default is there a way to save these so I donlt have to set them manually everytime? Or with a container for instance that has different padding or site width that is different to default?

I suppose there is copy and paste or possibly create a custom layout partial that I can bring in and unpack. Just thinking for commonly used things used over and over again.

But thought I’d ask in case there is some method others are using or I am missing.

Also is there a way to set CSS Classes within Foundry? I see you can add custom CSS classes with an entry field in the stacks, but not sure if there is a function of Foundry to create CSS Classes, for instance if I create margins of 5pxls but at a later date I decide that actually I wanted 10pxls so changing the setting of the class would filter through to the others throughout the page were I have applied the custom class.

Sorry I’m just adapting to Foundry so obviously using my other framework way of working and trying adapt. Please be ensured I am thoroughly enjoying getting to grips with Foundry, lots of ‘out of the box’ features to play with :grinning:

You could create a Partial in Stacks with the content unpinned. Watch this quick video I just recorded.

This allows you to place any content you like within your partial, but it retains your settings. Additionally if you edit that Partial and change the settings on the included element, in this case the Margins tool, then it would change on ALL instances of that Partial throughout your entire site.

None of this though is Foundry related but instead just the built-in functionality of Stacks itself. Hope that helps.

5 Likes

That’s great, that was kind of what I was thinking along that lines if it wasn’t a definable global preset, that will work for me. Thank you so much for your considerate and detailed response, it really is appreciated, thanks again.