![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@amsterdam/design-system-css
Advanced tools
Stylesheets for all components from the Amsterdam Design System and some general utilities. Use it to apply the visual design of the City of Amsterdam to your HTML elements or non-React components.
This package provides stylesheets for all components in the Amsterdam Design System and some general utilities. Use it to apply the visual design of the City of Amsterdam to your HTML elements or non-React components.
We publish our components’ stylesheets as a separate package to help replicating them in other libraries, platforms, or Saas-applications. The classes are a contract between the component’s definition and its implementations and they facilitate ongoing upgrades.
Our React components use these classes in the HTML they render. You should use that package if your application uses React.
The stylesheets reference our design tokens. Both packages need to be installed.
npm install @amsterdam/design-system-css @amsterdam/design-system-tokens
The set of classes for a component can be seen as a blueprint for its markup and features.
An .ams-component
root selector applies the essential styles of the component to its element, and additional classes like .ams-component--variant
modify its appearance or behaviour.
The classes employ the naming convention of NL Design System. Other communities only need to overwrite design tokens to use our components with their branding.
Import the main stylesheet and use the class names in your markup.
import "@amsterdam/design-system-assets/font/index.css"
import "@amsterdam/design-system-css/dist/index.css"
import "@amsterdam/design-system-tokens/dist/index.css"
export const App = () => (
<p className="ams-paragraph">Hello, world!</p>
)
Although it is not a typical use case, the stylesheet can be included in an HTML page directly.
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="node_modules/@amsterdam/design-system-assets/font/index.css" />
<link rel="stylesheet" href="node_modules/@amsterdam/design-system-css/dist/index.css" />
<link rel="stylesheet" href="node_modules/@amsterdam/design-system-tokens/dist/index.css" />
</head>
<body class="ams-body">
<p class="ams-paragraph">Hello, world!</p>
</body>
</html>
Load the compact tokens to use the compact appearance of the design system, e.g. for applications. They override the spacious ones; the stylesheets can remain unchanged.
Some elements of your document are out of reach for the Design System components. However, their styles can influence the appearance of the components.
Do not change the base font-size – e.g. through html { font-size: 62.5% }
.
Out typography system expects 1rem
to be the browser default of 16 pixels.
If you can’t easily remove such an approach from your application, adopt the Design System components gradually by setting font-size: 100%
on elements that use them.
If you haven’t removed the margin on the <body>
element that browsers set by default, you can add our ams-body
class to it to do so.
We only use the regular and extra bold weights of our font, Amsterdam Sans.
Apply font-weight: var(--ams-text-font-weight-bold)
to elements that display bold text like b
, strong
, and dt
.
We follow semantic versioning and publish a change log to guide you through updates. The classes are a public API of the design system. Note that detecting changed or deleted classes is still a manual process.
Contact us if you have a question, find an issue, or want to contribute. Find ways to reach us on designsystem.amsterdam.
FAQs
Stylesheets for all components from the Amsterdam Design System and some general utilities. Use it to apply the visual design of the City of Amsterdam to your HTML elements or non-React components.
The npm package @amsterdam/design-system-css receives a total of 0 weekly downloads. As such, @amsterdam/design-system-css popularity was classified as not popular.
We found that @amsterdam/design-system-css 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.