Giter Site home page Giter Site logo

bootstrap-4-grid's Introduction

Bootstrap 4 Grid System (Flex)

Bootstrap v4.4.1 grid system and layout utilities.

What's Included

Why?

Here's what you get that Bootstrap 4 currently doesn't provide out of the box:

If you don't need any of the above, Bootstrap 4 already includes a grid only version with its Bootstrap CSS and JS bundle.

How to Use

Sass and CSS files are ready to be used in your project.

CSS

Pretty straightforward. Just get css/grid.min.css or css/grid.css and add it to your project.

Sass

You will need to include the whole scss folder contents to your project. Then, just import grid.scss into your project's sass file.

NPM

npm install bootstrap-4-grid

Yarn

yarn add bootstrap-4-grid

Browser Support

We use autoprefixer to add prefixes to the css files. By default, the last 2 versions for each major browser is supported. To change this, follow the customization instructions bellow.

NOTE: Sass files do not include any browser specific prefixes. If you include them in your project, you will need to use your own post css tool to add prefixes for different browsers. If you are using Angular CLI though, then autoprefixer is included by default and you don't need to worry.

Grid Options

The grid options are located inside the scss/grid.scss file. If you are going to be using the sass files in your project, changing those will suffice. If you are going to be using the CSS files, then you will need to change the options and then compile. For more details, see the customization instructions bellow.

NOTE: If you are using the sass files and you want to avoid your options getting overridden by an update, then copy and paste the options to your own sass file and include them before the grid file.

Customization

You can roll your own build and/or change browser support.

Requirements

Then install the dependencies:

npm install

Change Browser Support

To change the default browser support (last 2 versions currently), you will need to first change the query in the browserlist file, located at the root of this project. Read more about the supported queries.

Then, run:

grunt browser

Change Grid Options

Open scss/grid.scss and change the default options. Then, run:

grunt

bootstrap-4-grid's People

Contributors

dependabot[bot] avatar m-spyratos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-4-grid's Issues

Duplicated css code for spacing

Spacing.scss has been imported twice, one in bootstrap-grid.scss and the other in grid.scss. This results in duplicated css code for spacing related part.

Remove unnecessary code from _variables.scss

I'm using this project to add support for basic grid and positioning utilities from bootstrap without having bootstrap take over my entire project. I wanted to use the breakpoint mixins provided by bootstrap (imported from this project), but I found that, in order to do so, I have to import the variables file, which still has all of the variables from bootstrap.

Is there a reason why all of the variables are still part of the file? I want to remove them (I've forked this repo, and I'll make a PR), but I wanted to ask first, to see if there was a reason why they're still included.

I also was curious why there was file duplication? There are multiple copies of _display and _visibility.

dart-sass 2.0 warnings

Is there are plan to address dart sass warnings as shown below?

Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($spacer, 2) or calc($spacer / 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

node_modules/bootstrap-4-grid/scss/grid/_variables.scss 306:31 @import
node_modules/bootstrap-4-grid/scss/grid/bootstrap-grid.scss 20:9 @import
node_modules/bootstrap-4-grid/scss/grid.scss 54:9 @import
src/styles/index.scss 25:9 root stylesheet

SCSS version Not Working

Hi
I installed your package then import your grid.scss in my stylesheet
but it didn't work
css worked fine any explain for that.?

Update the bootstrap version

Please, update the bootstrap version to 4.6.x (LTS)
Not an issue but rather enhancement.

Maybe pass the version that the user want as an argument during npm install so
npm install bootstrap-grid will always get the LTS from bootstrap other wise npm install bootstrap-grid xxx

Thanks!

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.