Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
postcss-structure
Advanced tools
http://francoisromain.github.io/postcss-structure/
A PostCSS plugin to create CSS grids based on a fixed column width.
The rule: The fewer differences in the size of the illustrations, the quieter the impression created by the design.
(Josef Muller Brockmann in The designer and the grid)
Install PostCSS-structure from npm:
$ npm install postcss-structure --save-dev
Check PostCSS usage instructions to setup with Gulp, Grunt, Webpack, Npm scripts…
Add PostCSS-structure to the required PostCSS plugins:
postcss([ require('postcss-structure') ])
For example with a Npm script and postcss-cli, add this to package.json:
"scripts": {
"start": "postcss -u postcss-structure -i src/styles.css -o dist/styles.css"
}
// -i is the input -o is the output
Run the script:
$ npm start
A media-query is created for each unit multiple, from min to max.
/* default values */
@structure {
unit: 20.5rem,
gutter: 1.5rem,
padding: 1.5rem,
max: 8,
min: 2,
align: center,
display: flex
}
structure: container
The container width is defined for each media-query.
.my-container {
structure: container;
}
Example: input, output, markup
structure: row
Rows have a negative right margin and are intended to contain either a bloc or a blob element.
.my-row {
structure: row;
}
Example: input, output, markup
structure: bloc [breakpoint]-[width](-[offset])
Blocs have a fixed width.
.my-bloc {
structure: bloc 3-2;
}
.my-bloc-with-offset {
structure: bloc 3-2-3;
}
Example: input, output, markup
Example (with offset): input, output, markup
structure: fraction [ratio]/[total]
.my-fraction {
structure: fraction 3/2;
}
Example: input, output, markup
structure: blob [breakpoint]-[ratio]/[total]
Unlike blocs, blobs width will change depending on the breakpoint.
.my-blob {
structure: blob 3-2/3;
}
Example: input, output, markup
structure: columns [breakpoint]-[columns](-[offset])
.my-columns {
structure: columns 3-4;
}
.my-columns-with-offset {
structure: columns 3-4-2;
}
Example: input, output, markup
Example (with offset): input, output, markup
structure: show [breakpoint]
.my-element {
structure: show 3;
}
Example: input, output, markup
structure: hide [breakpoint]
.my-element {
structure: hide 3;
}
structure: right [breakpoint]
.my-element {
structure: right 3;
}
FAQs
A bundle of PostCSS plugins.
The npm package postcss-structure receives a total of 9 weekly downloads. As such, postcss-structure popularity was classified as not popular.
We found that postcss-structure 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.