Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@guardian/source-foundations
Advanced tools
[![npm](https://img.shields.io/npm/v/@guardian/source-foundations)](https://www.npmjs.com/package/@guardian/source-foundations)
Readme
@guardian/source-foundations
The atoms from which all our visual design is built. They may be used with any CSS-in-JS library.
This package is part of the Source design system.
Foundations are installed as a JavaScript package via Yarn:
$ yarn add @guardian/source-foundations
or:
$ npm install @guardian/source-foundations
Guardian colours can be found in the palette
documentation.
Our space system is structured as increments of 4px.
import { space } from '@guardian/source-foundations';
const spaceAfter = css`
margin-bottom: ${space[3]}px;
`;
// margin-bottom: 12px;
Size units may be used to set the height, max-height, width or max-width of a component.
import { width, height } from '@guardian/source-foundations';
const checkbox = css`
width: ${width.inputXsmall}px;
height: ${height.inputXsmall}px;
`;
// width: 24px;
// height: 24px;
Typography is expressed as methods that return snippets of CSS depending on the desired font family and size.
import { headline } from '@guardian/source-foundations';
const h1 = css`
${headline.medium()};
`;
// font-family: GH Guardian Headline, Georgia, serif;
// font-size: 2.13rem;
We provide media queries for each breakpoint in our grid layout.
import { from, until, between } from '@guardian/source-foundations';
const styles = css`
padding: 0 10px;
${from.mobileLandscape} {
padding: 0 20px;
}
${between.phablet.and.desktop} {
padding: 0 32px;
}
${until.wide} {
padding: 0 40px;
}
`;
// padding: 0 10px;
// @media (min-width: 480px) {
// padding: 0 20px;
// }
// @media (min-width: 660px) and (max-width: 979px) {
// padding: 0 32px;
// }
// @media (max-width: 1300px) {
// padding: 0 40px;
// }
FAQs
[![npm](https://img.shields.io/npm/v/@guardian/source-foundations)](https://www.npmjs.com/package/@guardian/source-foundations)
We found that @guardian/source-foundations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).