Snapshot của pure-css/grunt-pure-grids: 14★ · CSS. Generate custom units for Pure Grids.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/pure-css/grunt-pure-grids là nguồn chính thức.
pure-css/grunt-pure-grids có bao nhiêu sao?
pure-css/grunt-pure-grids có 14 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/pure-css/grunt-pure-grids. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
pure-css/grunt-pure-grids có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho pure-css/grunt-pure-grids. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
pure-css/grunt-pure-grids có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho pure-css/grunt-pure-grids. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
pure-css/grunt-pure-grids là gì?
pure-css/grunt-pure-grids (pure-css/grunt-pure-grids) là dự án CSS trên GitHub. Theo mô tả gốc: Generate custom units for Pure Grids.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc grunt-pure-grids có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về grunt-pure-grids.