Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gridline

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridline

Flexbox grid system to build layouts

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gridline

npm GitHub package version NPM Downloads

450B gzipped

Demo


Install

yarn add gridline

Import

CSS

@import "gridline/dist";

SCSS

@import "gridline/src";

Usage

<div class="gridline">
  <div>
    ...
  </div>
  ...
</div>

Settings

Container

HTML classRequires a childDescription
.gridlineWill create a container that will occupy the full width of the layout.
.gridline--centerCreates a container aligned to the center of the layout.
.gridline--leftCreates a container, the left edge of which will be stretched to the left edge of the layout.
.gridline--rightCreates a container, the right edge of which will be stretched to the right edge of the layout.
.gridline--scrollingrequiredWill create a container that, when overflowing with content horizontally, will receive a horizontal scroll.
.gridline--collapseLines up the grid in a single column.

CSS styling

VariableTargetDefaultUnitDescription
--width.gridline100%pxWidth of the layout.
--padding.gridline20pxpx, vwSets indents between columns.
--gap.gridline20pxpx, vwSets indents between columns. 0px to turn off gap.
--columnchild1integer or decimalSets column width.
--offsetchild0integer or decimalSets the column offset to the right.

Continue to the edge

To extend the left or right column to the edge of the window, you need to add the `.edge` class to the column, or a class that has `edge` in its name.


Scrolling

In order for a horizontal scroll to appear when the container overflows, it is necessary to add a styling class to the parent container `.gridline--scrolling`, and add a `.scrolling` class or a class containing `scrolling` in the name to the child block.


License

gridline is released under MIT license

FAQs

Package last updated on 14 Dec 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc