Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
McGriddle is a get-out-of-your-way Sass library designed to help you build based a grid system. Suports flexbox (the grid is based on floats, by default). Set up your grid system…
$grid-width : 64em;
$grid-gutter : 1.875em;
$grid-columns: 12;
…and you’re ready to build.
<section class="container">
<article class="article"></article>
<div class="sidebar"></div>
</section>
.container { @include container; }
.article { @include columns(8); }
.sidebar { @include columns(4, last); }
npm install mcgriddle
yarn add mcgriddle
bower install mcgriddle
Also available as a Ruby gem to use within your Rails application—see below for more information.
Or to manually install it, download and unzip the source files. Then copy the files from the _sass/mcgriddle
directory into your project.
_mcgriddle.scss
file in your Sass manifest file:@import "mcgriddle";
gem 'mcgriddle'
bundle install
.@import
*// application.scss
@import "mcgriddle";
* More information on why Sass’s native @import
+ why you should ditch Sprockets directives altogether.
First, create a settings file (_mcgriddle-settings.scss
) and import it before importing McGriddle.
@import "mcgriddle-settings";
@import "mcgriddle";
Then edit the settings file to customize/override default grid settings. The following is a list of settings and its defaults:
$grid-width : 64em;
$grid-gutter : 1.875em;
$grid-columns : 12;
$grid-minor : 1/3;
$grid-collapse : false;
$grid-rtl : false;
$grid-flexbox : false;
$grid-flexbox-wrap : wrap;
$grid-flexbox-justify: flex-start;
Features:
container()
You’ll need a container to wrap the columns in.
.container {
@include container;
}
// Container with no max width ($grid-width)
.container--full {
@include container(false);
}
columns()
Then use columns()
on an element to specify how many columns wide it should be.
.column {
@include columns(8);
}
.column-decimal {
@include columns(5.6);
}
// Last column
.column-last {
@include columns(4, last);
}
// Centered column
.column-center {
@include columns(8, center);
}
// Relative columns
.column-4-9 {
@include columns(4 of 9);
}
.column-5-9 {
@include columns(5 of 9, last);
}
Nest columns by wrapping nested columns in a container.
<div class="container">
<div class="columns-9">
<div class="container">
<div class="columns-6"></div>
<div class="columns-6"></div>
</div>
</div>
<div class="columns-3"></div>
</div>
Push an element however many columns with shift()
.
// Shift a column over 2 columns
.column {
@include columns(6);
@include shift(2);
}
$grid-collapse
Collapse gutters: $grid-collapse: true
. (Default is false
)
$grid-collapse: true;
.container { @include container; }
$grid-flexbox
Flexbox support (as opposed to floats): $grid-flexbox: true
. (Default is false
)
$grid-flexbox: true;
.container { @include container; }
$grid-rtl
Right-to-left support for RTL languages: $grid-rtl: true
. (Default is false
)
$grid-rtl: true;
.container { @include container; }
Be sure to read the documentation for a full list of settings, mixins and functions.
The documentation is still a work-in-progress, so there are features and functionality that have yet to be properly documented. I also have a couple more features I’d like to build (when and if I decide to), but aside from that… yep, that’s it.
I originally created McGriddle for me—I wanted something stupid simple and straight forward. Therefore if you’re looking for something more robust, I’d suggest Bourbon Neat or Susy.
FAQs
Unknown package
We found that mcgriddle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.