pure-css/grunt-pure-grids is a CSS project with 14 stars. Generate custom units for Pure Grids.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-pure-grids --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-pure-grids');
The "pure_grids" task
Overview
In your project's Gruntfile, add a section named pure_grids to the data object passed into grunt.initConfig().
Determines how many columns your grid should have. If undefined, it only generates the media queries for a 5ths and 24ths-column grid (same as Pure's Default Grid).
options.mediaQueries
Type: Object
Default value: undefined
Used to generate responsive grids. Pass an object where the key denotes the grid key, and the property denotes the media query breakpoint (e.g., { FOO: 'screen and (min-width: 48em)' } would generate .pure-u-FOO-* class names that become active when the viewport is >= 48em).
options.includeOldIEWidths
Type: Boolean
Default value: true
Determines whether or not each grid unit should have an accompanying *width value, to make it work properly in IE 6/7.
options.includeReducedFractions
Type: Boolean
Default value: true
Determines whether or not the output should only include the reduced fractions. Setting this to true means that all grid classnames would be provided in their regular and reduced fractional form reduced form (ex: .pure-u-md-2-4 and .pure-u-md-1-2 will be outputted). Setting this to false will only output class names in their regular form where the denominator is always equal to the value provided at options.units.
options.decimals
Type: Integer
Default value: 4
Determines the width accuracy when constructing the individual grid units. You shouldn't need more than 4 decimals, but you may want fewer.
options.selectorPrefix
Type: String
Default value: .pure-u-
Determines the prefix for each grid class name.
Usage Examples
No Media Queries
In this example, we just create a regular 12-column Pure grid.
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
<link rel="stylesheet" href="path/to/my-responsive-grid.css">
..
<div class="pure-g">
<!--
an element which is:
width: 100% < 48em,
width: 50% >= 48em,
and width: 25% >= 60em
-->
<div class="col-1 col-md-1-2 col-lg-1-4">
...
</div>
</div>
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Does pure-css/grunt-pure-grids have a project website?
No homepage URL was recorded for pure-css/grunt-pure-grids in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How many stars does pure-css/grunt-pure-grids have?
pure-css/grunt-pure-grids has 14 GitHub stars — refresh the page for the live number, or check github.com/pure-css/grunt-pure-grids. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is pure-css/grunt-pure-grids open source?
TopGit's metadata for pure-css/grunt-pure-grids does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is pure-css/grunt-pure-grids?
pure-css/grunt-pure-grids (pure-css/grunt-pure-grids) is a CSS project on GitHub. From the project's own README: Generate custom units for Pure Grids.
Where do I read more about pure-css/grunt-pure-grids?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/pure-css/grunt-pure-grids is the definitive source.
Read full README in the tab above.
Is grunt-pure-grids worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of grunt-pure-grids.