Layout

Card

Cards are a versatile component that can be used to display content in a structured way. They are often used to group related information together, such as images, text, and buttons. Cards can be used in a variety of contexts, such as product listings, blog posts, and social media feeds.

Designed by Freepik; You need a license from Freepik to use this image.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Designed by Freepik; You need a license from Freepik to use this image.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Lorem ipsum

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

                            
                        

Skeleton (loading animation)

Skeleton is a CSS class that provides a loading animation for elements. It can be used to indicate that an element is loading or that the user has to wait for the content to be loaded. The monster-skeleton-col-xxx classes define the look of the skeleton. The xx defines the width of the skeleton in percent. The monster-skeleton-col-100 is the widest skeleton, while the monster-skeleton-col-10 is the narrowest skeleton.

The monster-skeleton-animated class defines the animation.

.
.
.
.
.
.
.
.
.
.
                            

Level (z-index)

The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. This is especially useful when you have elements that overlap (for example, if you have a modal dialog that appears on top of everything else on the page).

PropertyDescription
--monster-z-index-defaultDefault stacking order for elements.
--monster-z-index-outlineHigher index for outlined elements to float above others.
--monster-z-index-dropdownDefines the stack order for dropdown components.
--monster-z-index-dropdown-overlayZ-index for overlays used with dropdowns.
--monster-z-index-stickyZ-index for sticky positioning elements.
--monster-z-index-sticky-overlayZ-index used for overlays on sticky elements.
--monster-z-index-fixedZ-index for fixed positioning elements.
--monster-z-index-fixed-overlayZ-index for overlays on fixed positioned elements.
--monster-z-index-modal-backdropUsed for modal backdrops to maintain modal focus.
--monster-z-index-modal-backdrop-overlayOverlay z-index for modal backdrops.
--monster-z-index-offcanvasZ-index for offcanvas elements, typically side menus or panels.
--monster-z-index-offcanvas-overlayOverlay z-index for offcanvas components.
--monster-z-index-modalZ-index for modal dialogs to appear above all other content.
--monster-z-index-modal-overlayZ-index for overlays used with modals.
--monster-z-index-popoverZ-index for popover content, higher than most UI elements.
--monster-z-index-popover-overlayOverlay z-index for popover components.
--monster-z-index-tooltipZ-index for tooltip elements, ensuring they float above other components.
--monster-z-index-tooltip-overlayOverlay z-index specifically for tooltips.

Media Queries (Breakpoints)

Media queries are used to apply different styles to a document depending on the size of the screen. Media queries are defined in the `@media` rule. The `@media` rule is used inside a style sheet to apply different styles for different media types/devices.

More information about media queries can be found on MDN Web Docs.

In Monster we use the following media queries:

ClassFromTo
viewport00480px
viewport-40480px
viewport-70768px
viewport-90992px
viewport-1201200px
viewport4480px
viewport7768px
viewport9992px
viewport121200px
viewport4-7480px768px
viewport7-9768px992px
viewport9-12992px1200px

In this illustration, you can see the different media queries and their breakpoints:

Media Queries
Screen sizes and media queries

Spacing (margin, padding)

CSS-Properties

This section defines the CSS properties used for spacing, including margins and padding. Each class can be used to adjust the spacing of elements as specified below:

ClassValue
--monster-space-00
--monster-space-12px
--monster-space-24px
--monster-space-36px
--monster-space-410px
--monster-space-516px
--monster-space-626px
--monster-space-742px

Classes

The following classes are designed to provide flexible spacing adjustments for various components. You can apply these classes to any element to set its margin or padding according to predefined values:

  • monster-margin-<0, 1, 2, 3, 4, 5, 6, 7>
  • monster-padding-<0, 1, 2, 3, 4, 5, 6, 7>
  • monster-margin-<start, end, top, bottom>-<0, 1, 2, 3, 4, 5, 6, 7>
  • monster-padding-<start, end, top, bottom>-<0, 1, 2, 3, 4, 5, 6, 7>

Examples

Below are examples of how to apply these classes to HTML elements:

This div has a padding of 16px.
This div has a bottom padding of 16px.
                            
                        

Display & Visibility

The following classes can be used to set the display and visibility properties of an element. These CSS classes provide a quick way to control how elements are presented in the layout without modifying their intrinsic properties directly in the style sheets.

ClassProperty
.blockdisplay: block;
.inlinedisplay: inline;
.inline-blockdisplay: inline-block;
.griddisplay: grid;
.inline-griddisplay: inline-grid;
.flexdisplay: flex;
.inline-flexdisplay: inline-flex;
.hidden, .none, .hidedisplay: none;
.visiblevisibility: visible;
.invisiblevisibility: hidden;

The current width of the area is too small to display the content correctly.