Socket
Socket
Sign inDemoInstall

gridline

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gridline

Flexbox grid system to build layouts


Version published
Maintainers
1
Created

Readme

Source

gridline

npm GitHub package version NPM Downloads

650B 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

Last updated on 06 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc