Container

The b.Container constructor creates a container element. Its maximum width depends on the applied modifier:

ModifierUp to 1023pxDesktop (1024px-1215px)Widescreen (1216px-1407px)FullHD (1408px and above)
NoneFull width960px1152px1344px
b.WidescreenFull width1152px1344px
b.FullHDFull width1344px
b.MaxDesktopFull width960px
b.MaxWidescreenFull width960px1152px
b.Fluid100% with 32px gap on both sides

Bulma examples

Default behavior

Example
ResultHTML
This container is centered on desktop and larger viewports.
Code
b.Container(
	b.Notification(
		b.Primary,
		"This container is ", e.Strong("centered"), " on desktop and larger viewports.",
	),
)

Widescreen or FullHD only

Example
ResultHTML
This container is fullwidth until the $widescreen breakpoint.
Code
b.Container(
	b.Widescreen,
	b.Notification(
		b.Primary,
		"This container is ", e.Strong("fullwidth"), " ", e.Em("until"), " the ", e.Code("$widescreen"), " breakpoint.",
	),
)
Example
ResultHTML
This container is fullwidth until the $fullhd breakpoint.
Code
b.Container(
	b.FullHD,
	b.Notification(
		b.Primary,
		"This container is ", e.Strong("fullwidth"), " ", e.Em("until"), " the ", e.Code("$fullhd"), " breakpoint.",
	),
)

Desktop and Widescreen maximum widths

Example
ResultHTML
This container has a max-width of $desktop - $container-offset on widescreen and fullhd.
Code
b.Container(
	b.MaxDesktop,
	b.Notification(
		b.Primary,
		"This container has a ", e.Code("max-width"), " of ", e.Code("$desktop - $container-offset"), " on widescreen and fullhd.",
	),
)
Example
ResultHTML
This container has a max-width of $widescreen - $container-offset on fullhd.
Code
b.Container(
	b.MaxWidescreen,
	b.Notification(
		b.Primary,
		"This container has a ", e.Code("max-width"), " of ", e.Code("$widescreen - $container-offset"), " on fullhd.",
	),
)

Fluid container

Example
ResultHTML
This container is fluid: it will have a 32px gap on either side, on any viewport size.
Code
b.Container(
	b.Fluid,
	b.Notification(
		b.Primary,
		"This container is ", e.Strong("fluid"), ": it will have a 32px gap on either side, on any viewport size.",
	),
)