You will need a few pieces, in Slate, namely:
- One parent container that will hold all the rest of the Slate
- The child if any in the container
Then, you need to:
- Drop the below CSS content in the CSS configuration of your Slate instance
// Utility Classes
// ===============
.u-posFullScreen {
position : absolute !important;
top : 0 !important;
bottom : 0 !important;
left : 0 !important;
right : 0 !important;
}
.u-fluidSize {
height : auto !important;
width : auto !important;
}
//
// Expand the Slate document canvas to take up
// the full screen.
//
sl-app-canvas .canvas-body {
// Position
.u-posFullScreen();
// Box Model
.u-fluidSize();
// Miscellaneous
overflow : hidden !important;
}
//
// Expand the app container to take up the
// full screen.
//
#widget-w_container {
// Position
.u-posFullScreen();
// Box Model
.u-fluidSize();
}
- Make sure the name of the parent container matches what is in the CSS configuration
- Make the parent container widget a “flex” type
- From there you can configure the child widget(s) with their position, flex-size (grow)
Note: You can create a slate with the starting template called “Full Width” when you create a Slate application to have more information.
Note: this works with resizable component in Workshop
If the min-width is problematic for you, you can add body { min-width: 0 !important; }
to override it.