New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@digdir/designsystemet-theme

Package Overview
Dependencies
Maintainers
0
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digdir/designsystemet-theme - npm Package Compare versions

Comparing version 0.15.3 to 0.100.51-next.51

brand/altinn.css

22

package.json
{
"name": "@digdir/designsystemet-theme",
"version": "0.15.3",
"description": "Tokens for Designsystemet",
"version": "0.100.51-next.51",
"description": "Predefined themes for Designsystemet",
"author": "Designsystemet team",
"repository": "https://github.com/digdir/designsystemet",
"repository": {
"type": "git",
"url": "git+https://github.com/digdir/designsystemet.git"
},
"homepage": "https://github.com/digdir/designsystemet/tree/main/packages/theme",
"license": "MIT",
"main": "brand/digdir/tokens.css",
"exports": {
".": {
"types": "./brand/colors.d.ts",
"default": "./brand/digdir.css"
},
"./*": "./brand/*"
},
"files": [

@@ -21,5 +30,4 @@ "brand/**",

"devDependencies": {
"rimraf": "^5.0.5"
},
"gitHead": "aeed6074c31e5e21c7ca9e83a883fe87cd1111d5"
"rimraf": "^6.0.1"
}
}
# @digdir/designsystemet-theme
Themes for Designsystemet
This package contains the following predefined Designsystemet themes for use in Digdir.
This package contains the following predefined brand themes
- `digdir`
- `altinn`
- `digdir`
- `tilsynet`
- `brreg`
- `uutilsynet`
- `portal`
## Installation
Build your own theme on https://theme.designsystemet.no/
```sh
npm install @digdir/designsystemet-theme
```
## Usage
When importing the package make sure to specify which brand tokens you want to import. By default the `digdir` is imported if you don't specify a brand.
Read the Designsystemet [README](https://github.com/digdir/designsystemet) to get started.
When importing the package make sure to specify which theme.
By default `digdir` is used.
```tsx
import '@digdir/designsystemet-theme/brand/<brand>/tokens';
import '@digdir/designsystemet-theme/<theme>.css';
// This imports Digdir brand css tokens
// Digdir theme
import '@digdir/designsystemet-theme';
// This imports Altinn css tokens
import '@digdir/designsystemet-theme/brand/altinn/tokens.css';
// Altinn theme
import '@digdir/designsystemet-theme/altinn.css';
```

@@ -34,9 +31,9 @@

When importing css tokens a set of [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) are added to your `:root {}`.
This package adds Designsystemet [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) to your `:root {}`.
You only need to import this once in your application, preferably somewhere in your "root" html.
All variables are prefixed with `fds`.
All variables are prefixed with `ds`.
```js
import '@digdir/designsystemet-theme/brand/altinn/tokens.css';
import '@digdir/designsystemet-theme/altinn.css';
```

@@ -46,4 +43,5 @@

div {
padding: var(--fds-spacing-1);
padding: var(--ds-size-1);
}
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc