fluxgrid
v6.0.1
Published
Yet another responsive utility-based CSS grid customisable with Sass
Maintainers
Readme
(with debug)
Yet another responsive utility-based CSS grid customisable with Sass.
Install
npm i fluxgridIf you'd like to change the default config, make sure to install Sass as a peer dependency:
npm i sass@^1.89.2Default 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 demo page.
Getting Started
Choose your preferred way:
A. Quick start, with the default config
- Install Fluxgrid
- Import it, either with:
- HTML:
<link rel="stylesheet" type="text/css" href="node_modules/fluxgrid/dist/fluxgrid.css"/> - JS:
import "fluxgrid/dist/fluxgrid.css";
- HTML:
- Optionally (not recommended in production) import
fluxgrid-debug.cssthe same way
B. With a custom config
- Install Fluxgrid, and it's peer dependency
- Import and overwrite any of the default settings defined in
src/_settings.scsswith!default. Eg.:@use "sass:math"; @use "fluxgrid/src/fluxgrid" with ( $fluxgrid-breakpoints: ( sm: 425px, md: 768px, lg: 1024px, xl: 1366px, ), $fluxgrid-gutter: 1.5rem, $fluxgrid-gutter-lg: 4.5rem, $fluxgrid-outside-margin: math.div(4.5rem, 2) ); - Optionally (not recommended in production) import
fluxgrid-debug"the same way - Run the file through your build pipeline. It is advised to Autoprefix and minify them
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.

