This library uses a set of breakpoints to work with the responsiveness.
There are several classes to help you with the display of elements. Their use is pretty simple, just add a class to an element. They also work with the responsive breakpoints of Grid Row CSS
You can use breakpoints to decide wether or not to apply a style to the element based on the viewport width.
<div class="d-block">Block Element</div>
<div class="d-inline-block">Inline block Element</div>
<div class="d-flex">Flex Element</div>
<div class="d-inline-flex">inline flex Element</div>
<div class="d-grid">Grid Element</div>
<div class="d-none">Not showing Element</div>
<div class="d-xs-none d-sm-block">
Element that only appears on +576px screens (Rezise your
brwoser to see it)
</div>
There are a few classes to help with the height and width of the elements, these classes are:
<div class="is-fullwidth">Full width Element</div>
<div class="is-fullheight">Full height Element</div>
<div class="is-half-vh">Half viewport height Element</div>
<div class="is-full-vh">Full viewport height Element</div>
<div class="is-full-size">Full height and width Element</div>
<div class="is-half-size-vh">
Half viewport height and full width Element
</div>
<div class="is-full-size-vh">
Full viewport height and full width Element
</div>
Flexbox is a pretty neat and useful technology to align elements in one direction, when combined with a grid system it becomes extremely powerful and it is often enough to make any type of layout with little CSS. Grid Row CSS comes with a bunch of flex based classes to make your life easier. Note: These classes need to be applied to a parent element with its display propertie set as Flex. (You can do this easily by adding a ".d-flex" class to the element).
The following classes can help you to align your elements on the X axis while the flex direction is set to row. Or the Y axis if the flex direction is set to column
The following classes can help you to align your elements on the Y axis while the flex direction is set to row. Or the X axis if the flex direction is set to column
One of the most common needs in web developement its to center elements. The next class can help you to do so.
While using flexbox you can set an element to justfiy or align itself based on the align-self and justify-self properties. The following classes will do the job. Note: These classes need to be applied to a child element.
<div class="f-wrap d-flex wrap">
<div>Item wrap 1</div>
<div>Item wrap 2</div>
<div>Item wrap 3</div>
<div>Item wrap 4</div>
<div>Item wrap 5</div>
<div>Item wrap 6</div>
</div>
<div class="f-nowrap d-flex nowrap">
<div>Item nowrap 1</div>
<div>Item nowrap 2</div>
<div>Item nowrap 3</div>
<div>Item nowrap 4</div>
<div>Item nowrap 5</div>
<div>Item nowrap 6</div>
</div>
<div class="d-flex f-row">
<div>Item row 1</div>
<div>Item row 2</div>
<div>Item row 3</div>
</div>
<div class="d-flex f-column">
<div>Item column 1</div>
<div>Item column 2</div>
<div>Item column 3</div>
</div>
<div class="d-flex f-justify-start">
<div>Item justify start 1</div>
<div>Item justify start 2</div>
<div>Item justify start 3</div>
</div>
<div class="d-flex f-justify-center">
<div>Item justify center 1</div>
<div>Item justify center 2</div>
<div>Item justify center 3</div>
</div>
<div class="d-flex f-justify-end">
<div>Item justify end 1</div>
<div>Item justify end 2</div>
<div>Item justify end 3</div>
</div>
<div class="d-flex f-justify-stretch">
<div>Item justify stretch 1</div>
<div>Item justify stretch 2</div>
<div>Item justify stretch 3</div>
</div>
<div class="d-flex f-justify-between">
<div>Item justify between 1</div>
<div>Item justify between 2</div>
<div>Item justify between 3</div>
</div>
<div class="d-flex f-justify-evenly">
<div>Item justify evenly 1</div>
<div>Item justify evenly 2</div>
<div>Item justify evenly 3</div>
</div>
<div class="d-flex f-justify-around">
<div>Item justify around 1</div>
<div>Item justify around 2</div>
<div>Item justify around 3</div>
</div>
<div class="d-flex f-align-start">
<div>Item align-start 1</div>
</div>
<div class="d-flex f-align-center">
<div>Item align-center 1</div>
</div>
<div class="d-flex f-align-end">
<div>Item align-end 1</div>
</div>
<div class="d-flex f-align-stretch">
<div>Item align-stretch 1</div>
</div>
<div class="d-flex f-center">
<div>Item vertically and horizontally centered</div>
</div>
Grid Row CSS provides a grid based on the CSS grid system, it is a 12 columns grid that supports nesting rows and it also has many classes to work with the responsiveness and the breakpoints.
A grid consist of an element with the ".grid-row" class, and its children with the ".grid-column" class.
These are the following classes to work with the grid.
By default, Grid Row CSS doesn't set any gap to the grid, so you won't have to overwrite those styles for you design.
Instead, it provides classes to set the gap between columns and rows.
Multiple classes were made to fit into any kind of design, for the gap the numbers go from 1 to 10.
e.g: ".g-gap-7" -> grid-gap: 7 * 0.5rem;
Grid Row CSS provides a lot of classes to set the size of the columns in the row, it also provides a responsive functionality to set these values for certain breakpoints
They follow the boostrap grid style, in which you write the breakpoint followed by the number of columns,
eg: md-6, xs-12, xl-4, xxl-3, sm-6.
Note: in order for this to work, the element must have a ".grid-column" class.
<div class="grid-row mb-5 g-gap-2">
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 1</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 2</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 3</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column </div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 5</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 6</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 7</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 8</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 9</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 10</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 11</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">Grid column 12</div>
</div>
<div class="grid-row g-gap-4 mb-5">
<div class="grid-column xs-12 md-6 lg-12 d-flex f-center">12 Columns</div>
<div class="grid-column xs-12 md-6 lg-11 d-flex f-center">11 Columns</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">1 Column</div>
<div class="grid-column xs-12 md-6 lg-10 d-flex f-center">10 Columns</div>
<div class="grid-column xs-12 md-6 lg-2 d-flex f-center">2 Columns</div>
<div class="grid-column xs-12 md-6 lg-9 d-flex f-center">9 Columns</div>
<div class="grid-column xs-12 md-6 lg-3 d-flex f-center">3 Columns</div>
<div class="grid-column xs-12 md-6 lg-8 d-flex f-center">8 Columns</div>
<div class="grid-column xs-12 md-6 lg-4 d-flex f-center">4 Columns</div>
<div class="grid-column xs-12 md-6 lg-7 d-flex f-center">7 Columns</div>
<div class="grid-column xs-12 md-6 lg-5 d-flex f-center">5 Columns</div>
<div class="grid-column xs-12 md-6 lg-6 d-flex f-center">6 Columns</div>
<div class="grid-column xs-12 md-6 lg-6 d-flex f-center">6 Columns</div>
<div class="grid-column xs-12 md-6 lg-5 d-flex f-center">5 Columns</div>
<div class="grid-column xs-12 md-6 lg-7 d-flex f-center">7 Columns</div>
<div class="grid-column xs-12 md-6 lg-4 d-flex f-center">4 Columns</div>
<div class="grid-column xs-12 md-6 lg-8 d-flex f-center">8 Columns</div>
<div class="grid-column xs-12 md-6 lg-3 d-flex f-center">3 Columns</div>
<div class="grid-column xs-12 md-6 lg-9 d-flex f-center">9 Columns</div>
<div class="grid-column xs-12 md-6 lg-2 d-flex f-center">2 Columns</div>
<div class="grid-column xs-12 md-6 lg-10 d-flex f-center">10 Columns</div>
<div class="grid-column xs-12 md-6 lg-1 d-flex f-center">1 Column</div>
<div class="grid-column xs-12 md-6 lg-11 d-flex f-center">11 Columns</div>
<div class="grid-column xs-12 md-6 lg-12 d-flex f-center">12 Columns</div>
</div>
<div class="grid-row g-gap-5 mb-5">
<div class="grid-column xs-12 md-6 lg-4 d-flex f-center">Column gapped 1</div>
<div class="grid-column xs-12 md-6 lg-4 d-flex f-center">Column gapped 2</div>
<div class="grid-column xs-12 md-6 lg-4 d-flex f-center">Column gapped 3</div>
</div>
Utility classes are always needed, they can be used to rapidly modify the styles of an element with a class. Grid Row CSS provides these utility classes to help you make modular and reusable elements.
padding classes are used to add padding to the elements based on the selected number.
They go form 1 through 10, and can be set for any side.
E.g: p-5 -> padding: 5 * 0.5rem;
margin classes are used to add margin to the elements based on the selected number.
They go form 1 through 10, and can be set for any side.
E.g: m-5 -> margin: 5 * 0.5rem;
Sometimes you need to move an element with a margin auto.
Inline-block elements often have issues with how they show on the browser, this class can help you that annoying white-space on those elements.
The following are classes to define the position of elements.
Classes to set different useful aspects of typography
This class can help you removing the default styling for lists.
<a href="#" class="d-inline-block p-2 text-d-none text-white">Anchor element without text decoration and with padding
<div class="m-3">Div with margins</div>
<div class="pos-relative relative text-white text-center">
Relative element
<div class="pos-absolute absolute text-center text-black">
Absolute box within a relative element
</div>
</div>