Giter VIP home page Giter VIP logo

grid-bootstrap5's Introduction

npm npm NPM

grid-bootstrap5

Responsive grid classes for Bootstrap 5. Extends Bootstrap 5 with display: grid utilities. Uses Bootstrap 5 variables and mixins. It will pick up Bootstrap's or your override varaibles such as $grid-breakpoints. To generate responsive grid utilities.

Looking for Bootstrap 4 support?

We've got you covered. Use grid-bootstrap

Install

npm i grid-bootstrap5
yarn add grid-bootstrap5

Use ready css

Link our distributed script in your html's head:

<link rel="stylesheet" type="text/css" href="//unpkg.com/grid-bootstrap5"></script>
<!-- `grid-bootstrap` is now available on the page -->

How to use

For compiling

Include the entry point grid-bootstrap-import.scss into your scss file. Replace {relative/path} with the path of your setup

@import '{relative/path}/node_modules/bootstrap/scss/functions';
@import '{relative/path}/node_modules/bootstrap/scss/variables';
@import '{relative/path}/node_modules/bootstrap/scss/mixins';
@import '{relative/path}/node_modules/bootstrap/scss/grid/grid';
@import '{relative/path}/node_modules/grid-bootstrap/scss/variables';

@import '{relative/path}/node_modules/grid-bootstrap5/scss/grid-bootstrap-import';

Or, if you already imported bootstrap sources just import grid bootstrap files

@import '{relative/path}/node_modules/bootstrap/scss/grid/grid';
@import '{relative/path}/node_modules/grid-bootstrap5/scss/grid-bootstrap-import';

Variables

You can override the following variables to adapt to your setup.

$max-columns: 8 !default;
$max-rows: 8 !default;

Now you can compile your scss.

For using compiled

TBD

Generated css classes

General class

.d-grid

Grid col start/end

.grid-col-start-#
.grid-col-*-start-#
.grid-col-end-#
.grid-col-*-end-#
...etc

Grid row start/end

.grid-row-start-#
.grid-row-*-start-#
.grid-row-end-#
.grid-row-*-end-#
...etc

Grid template columns

This will create classes to set even width grid columns

.grid-cols-#
.grid-cols-*-#
...etc

Grid spacing utilities

Row gap

.grid-rg-#
.grid-rg-*-#
...etc

Column gap

.grid-cg-#
.grid-cg-*-#
...etc

Justify self

.just-self-*-start
.just-self-*-end
.just-self-*-center
.just-self-*-stretch
...etc

grid-bootstrap5's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.