Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
The root of all projects.
Groot is a class-based declarative CSS Grid system, originally derived from the amazing work Nicolas Gallagher produced with Griddle. I've been using Griddle for many years professionally and whilst I love the overall package, its not perfect and could do with a upgrade. I've started Groot with the intention of being that.
Groot prides itself on the following:
Groot is available through a number of package managers, including:
npm install --save-dev groot-sass
bower install --save groot-sass
Alternatively, you could always download/clone this repo and use it in your own way.
Groot is pretty easy to get to grips with. Once you've imported to the Groot system, use the groot
mixin provided to build out the grids you need.
@import "groot";
@include groot($columns, $extension);
It takes two parameters:
$columns
: A space-separated list of integers, each of which results in the build of that particular grid.$suffix
: The suffix for the class. This is optional and is intended when you're setting up a Groot instance within a Media Query.While Groot may have defaults for the configuration, you still have a lot of freedom in how you'd like to setup your version.
Each of the following variables should be declared above the import of Groot.
For example:
// Override default config here
@import "groot";
// Include mixin here
Available options and defaults:
Avaiable confirgurations can be seen by visiting the _variables.scss
file. Here's a list for your convenience:
// Core
$gr-grid: "grid" !default; // Main grid container which holds all elements
$gr-item: "grid__item" !default; // Individual grid item/cell/unit/whatever you want to call it.
$gr-item-unit: "grid__item" !default; // The class chained onto the same element as above which controls the sizing.
// Modifiers
$gr-grid-spaced: "grid--spaced" !default; // Increase gutter size
$gr-grid-compact: "grid--compact" !default; // Remove all gutters
$gr-grid-reversed: "grid--reversed" !default; // Reverse direction of the grid. i.e. direction: rtl;
$gr-grid-centered: "grid--centered" !default; // Centers the entire Grid, which grid items will inherit.
$gr-item-centered: "grid__item--centered" !default; // Center an individual item, rather than all items.
// Sizing
$gr-gutter: 1em !default; // The size between each grid item. Can use any CSS unit of measurement.
// Grid Alignment
$gr-grid-direction: inherit !default; // Initial direction of the $gr-grid
$gr-grid-align-x: inherit !default; // Initial horizontal alignment of the $gr-grid.
// Item Alignment
$gr-item-direction: inherit !default; // Initial direction of the $gr-item
$gr-item-align-x: inherit !default; // Initial horizontal alignment of the $gr-item
$gr-item-align-y: top !default; // Initial vertical alignment of the $gr-item
Here's a list of the modifier's are their default class names. You can see examples of all these by going to the examples section of the README.
.grid--spaced
Add this to the containing grid and the gutters width will be doubled.
.grid--compact
Add this to the containing gird and the gutters will be removed.
.grid--reversed
Add this to the container grid to reverse direction of it.
.grid--centered
Add this to the containing grid centers it and anything within (through CSS inheritance).
.grid__item--centered
Adding this to a grid item centers only it, rather than all items.
An accompanying website has been created to demonstrate Groot's capabilities and how to correctly use it.
Groot has been tried and tested within the latest browsers, but also works great for those older versions of IE that you may still need to support (I feel your struggle). Here's a full list of the browser/device combinations that Groot has been verified in. If you feel theres a problem with any of these, please open an issue and we'll try to resolve it together.
Mac/Windows:
Mobile:
!! Whilst Groot does support IE8, there are caveats. IE8 doesn't support media queries and therefore you'll need to make sure you use something like respond.js. However, I'd recommend if you need IE8 support that you give Jake Archibold's Media Query Mixin a read. Its great! Here's an example of Groot working in IE8 without any media queries.
Here's a quick roadmap on where I'd like to take Groot in the coming months.
With any project, theres always special thanks and recognition to be given:
MIT License (MIT)
Copyright (c) 2015 Luke Whitehouse, https://github.com/lukewhitehouse/groot
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
The root of all projects
The npm package groot-sass receives a total of 11 weekly downloads. As such, groot-sass popularity was classified as not popular.
We found that groot-sass 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.