Negative margin classes

In bootstrap there are some negative margin classes, which I cannot find in bss? How can Indie them? :slight_smile:

Yeah, I noticed that too. You can still create your own class and add some negative margin to it.

Negative margin

In CSS, margin properties can utilize negative values (padding cannot). These negative margins are disabled by default, but can be enabled in Sass by setting $enable-negative-margins: true.

I take it that’s nothing that can be done from inside BSS?

Classic. Not reading the most important and bold part correctly :smiley: thank you. Where would I add this?

Many thanks :pray:t2:

Since they are not enabled by default you could just import them as a stylesheet. My understanding is that “gap” has replaced some of the need for negative margins.

Compiled negative margins

You could also use a theme (compile your own) that has the negative margins enable. You would have to import as a theme in the settings and choose it for your new Bootstrap locked source (also in settings).

Or just compile the Bootstrap source code in Bootstrap Studio…and import theme after exporting when moving from development to production. Make sure to turn the theme off after exporting with a partial _ underscore on the file name. Then import theme and export and your are ready to publish or if you want to just import theme and publish same deal…-or+

By the way the theme in the above +or- has no offcanvas or forms included …

I have just updated my theme generator to Bootstrap 5.2.2, I have turned negative margins on by default (this will be an option in the next version). You can find it here:

1 Like

Thank you! :slight_smile: Then I use it as theme setting in BSS?

That is pretty awesome. Thank you @richards
@Seb yes, you can use that as a theme in BSS.

Superb! I will dig into that