5.1.0 • Published 5 years ago
fluxgrid v5.1.0
(with debug)
Yet another responsive utility-based CSS grid customisable with Sass.
Install
npm i fluxgridDefault config
- Browser support: browserslist defaults (IE 11 safe)
- Columns:
12 - Gutters width:
1rem - Nestable: Yes, flushed with parent
- Direction: Row
- Breakpoints:
| Extra small | Small | Medium | Large | Extra large | |
|---|---|---|---|---|---|
| Device | Phone | Tablet | Desktop | Large desktop | Extra large desktop |
| Breakpoint | > 0 | ≥ 425px | ≥ 768px | ≥ 1024px | ≥ 1366px |
| Prefix | sm: | md: | lg: | xl: |
Syntax
<div class="container container-modifier">
<div class="grid *grid-modifier">
<div class="cell *cell-modifier"></div>
</div>
</div>* Responsive prefix: sm:|md:|lg:|xl:
Options
Head over to the doc page.
Getting Started
Choose your preferred way:
A. Quick start, with the default config
- Install Fluxgrid
- Import it to your build environment, either with:
- Sass:
@import "~fluxgrid/dist/fluxgrid";* - JS:
import "fluxgrid/dist/fluxgrid.css"; - HTML:
<link rel="stylesheet" type="text/css" href="node_modules/fluxgrid/dist/fluxgrid.css"/>
- Sass:
- Optionally (not recommended in production) import
fluxgrid-debug.cssthe same way
B. With a custom config
- Install Fluxgrid
- Overwrite the default config by redefine any of the
!defaultSass variables from_settings.scss:$fluxgrid-division; $fluxgrid-gutter; $fluxgrid-gutter-lg; $fluxgrid-outside-margin; $fluxgrid-breakpoints; - Import it to your build environment, either with:
- Sass:
@import "~fluxgrid/src/fluxgrid";* - JS:
import "fluxgrid/src/fluxgrid.scss";
- Sass:
- Optionally (not recommended in production) import
fluxgrid-debug.scssthe same way - Run these through your build pipeline. It is advised to Autoprefix and minify them
*: ~ is a Webpack feature, replace with node_modules/ if needed
Development
npm Scripts
In the project directory, you can npm run:
dev: Starts up a development server with hot module replacementbuild: Build Fluxgrid and Fluxgrid Debug, ready for deploymentdocs: Build the documentationlint: Runs the stylelint linter, a mighty, modern linter that helps you avoid errors and enforce conventions in your stylesformat: Runs stylelint with the--fixoption, as well as Prettier with the--writeoption to automatically fix problemsdeploy: Run format, build and docs scripts
Deployment
- Update
CHANGELOG.mdfollowing the Keep a Changelog format - Run
npm run deploy - Update
package.jsonandpackage-lock.jsonusing semver:"version": "<semver>" - Once merged to
master, tag:git tag <semver> - Publish to npm:
npm publish
Contribution
Contribution is welcomed, feel free to raise an issue or PR.
