
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@locomotivemtl/grid-helper
Advanced tools
Creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines.
The GridHelper
class is a utility that creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines. It provides easy toggling and responsiveness based on screen breakpoints.
Control + g
(customizable key).npm install @locomotivemtl/grid-helper
To initialize the grid with default settings:
const gridHelper = new GridHelper();
You can provide a custom configuration to adjust the grid properties:
const gridHelper = new GridHelper({
columns: 4,
gutterWidth: '10px',
marginWidth: '10px',
color: 'blue',
opacity: 0.2,
key: 'g',
breakpoints: {
'768': { columns: 8, gutterWidth: '15px' },
'1024': { columns: 12, gutterWidth: '20px' }
}
});
You can also use CSS variables to bind them with your CSS logic, especially for columns
, gutterWidth
, and marginWidth
. This can be useful in cases where you dynamically update CSS variables within media queries.
const gridHelper = new GridHelper({
columns: 'var(--grid-columns)',
gutterWidth: `var(--grid-gutter)`,
marginWidth: `var(--grid-margin)`,
});
Option | Default Value | Type | Description |
---|---|---|---|
columns | 12 | number | string | Number of columns in the grid or a CSS variable for columns. |
gutterWidth | '16px' | string | CSSVariable | Width of the gutters between columns or a CSS variable for gutter width. |
marginWidth | '16px' | string | CSSVariable | Width of the margins around the grid or a CSS variable for margin width. |
color | 'red' | string | Color of the grid in CSS format. |
opacity | 0.1 | number | Opacity of the grid. |
key | 'g' | string | Key to toggle the grid visibility (with Control key). |
breakpoints | undefined | object | Breakpoint configurations for responsive grids. |
Option | Type | Description |
---|---|---|
columns | number | string | Number of columns in the grid or a CSS variable for columns. |
gutterWidth | string | CSSVariable | Width of the gutters between columns or a CSS variable for gutter width. |
marginWidth | string | CSSVariable | Width of the margins around the grid or a CSS variable for margin width. |
color | string | Color of the grid in CSS format. |
opacity | number | Opacity of the grid. |
key | string | Key to toggle the grid visibility (with Control key). |
FAQs
Creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines.
The npm package @locomotivemtl/grid-helper receives a total of 59 weekly downloads. As such, @locomotivemtl/grid-helper popularity was classified as not popular.
We found that @locomotivemtl/grid-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.