@canonical/styles 0.0.0-experimental.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,4 @@
1
+ ## Canonical Web Team Styles
2
+
3
+
4
+
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@canonical/styles",
3
+ "description": "Canonical's base styles",
4
+ "version": "0.0.0-experimental.0",
5
+ "main": "src/index.css",
6
+ "files": ["src"],
7
+ "author": {
8
+ "email": "webteam@canonical.com",
9
+ "name": "Canonical Webteam"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/canonical/ds25"
14
+ },
15
+ "license": "LGPL-3.0",
16
+ "bugs": {
17
+ "url": "https://github.com/canonical/ds25/issues"
18
+ },
19
+ "homepage": "https://github.com/canonical/ds25#readme",
20
+ "scripts": {
21
+ "lint": "biome lint src/*.{css}",
22
+ "format": "bun run format:biome",
23
+ "format:biome": "biome format src/*.{css}",
24
+ "check": "bun run check:biome",
25
+ "check:fix": "bun run check:biome:fix",
26
+ "check:biome": "biome check src/* *.json",
27
+ "check:biome:fix": "biome check --write src/* *.json"
28
+ },
29
+ "devDependencies": {
30
+ "@biomejs/biome": "^1.9.2",
31
+ "@canonical/biome-config": "^0.2.1-experimental.0"
32
+ },
33
+ "dependencies": {
34
+ "normalize.css": "^8.0.1"
35
+ }
36
+ }
@@ -0,0 +1,26 @@
1
+ /* Ubuntu font declarations, as per Vanilla */
2
+ @font-face {
3
+ font-family: "Ubuntu variable";
4
+ font-stretch: 100%;
5
+ font-style: normal;
6
+ font-weight: 100 800;
7
+ src: url("https://assets.ubuntu.com/v1/f1ea362b-Ubuntu%5Bwdth,wght%5D-latin-v0.896a.woff2")
8
+ format("woff2-variations");
9
+ }
10
+
11
+ @font-face {
12
+ font-family: "Ubuntu variable";
13
+ font-stretch: 100%;
14
+ font-style: italic;
15
+ font-weight: 100 800;
16
+ src: url("https://assets.ubuntu.com/v1/90b59210-Ubuntu-Italic%5Bwdth,wght%5D-latin-v0.896a.woff2")
17
+ format("woff2-variations");
18
+ }
19
+
20
+ @font-face {
21
+ font-family: "Ubuntu Mono variable";
22
+ font-style: normal;
23
+ font-weight: 100 800;
24
+ src: url("https://assets.ubuntu.com/v1/d5fc1819-UbuntuMono%5Bwght%5D-latin-v0.869.woff2")
25
+ format("woff2-variations");
26
+ }
package/src/index.css ADDED
@@ -0,0 +1,17 @@
1
+ @import url("normalize.css");
2
+ @import url("./tokens.css");
3
+ @import url("./font-faces.css");
4
+ @import url("./intents.css");
5
+
6
+ html {
7
+ color: #000;
8
+ font-family: "Ubuntu variable", "Ubuntu", -apple-system, "Segoe UI", "Roboto",
9
+ "Oxygen", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
10
+ sans-serif;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ -webkit-font-smoothing: antialiased;
13
+ font-weight: 400;
14
+ line-height: 1.5rem;
15
+ text-wrap: pretty;
16
+ font-size: 1rem;
17
+ }
@@ -0,0 +1,7 @@
1
+ .positive {
2
+ --color: green;
3
+ }
4
+
5
+ .negative {
6
+ --color: red;
7
+ }
package/src/tokens.css ADDED
@@ -0,0 +1,31 @@
1
+ /* base tokens */
2
+ :root {
3
+ /* color tokens */
4
+ /* based on: https://docs.google.com/spreadsheets/d/1AY6BLFU-Cnj48ggHUnNVlWRxwWZ6Z-66s7jxJC1HLSU/edit?gid=1738212977#gid=1738212977 */
5
+ --color-background-default: #fff;
6
+ --color-text-default: #000;
7
+ --color-background-hover: rgba(242, 242, 242, 1);
8
+ --color-background-active: rgba(235, 235, 235, 1);
9
+ --color-border-high-contrast: rgba(0, 0, 0, 0.56);
10
+
11
+ --color-background-positive-default: rgba(14, 132, 32, 1);
12
+ --color-background-positive-hover: rgba(12, 109, 26, 1);
13
+ --color-background-positive-active: rgba(10, 95, 23, 1);
14
+ --color-text-button-positive: rgba(255, 255, 255, 1);
15
+
16
+ /* spacing tokens */
17
+ --spacing-horizontal-small: 0.5rem;
18
+ --spacing-horizontal-large: 1.5rem;
19
+
20
+ --spacing-vertical-small: 0.5rem;
21
+
22
+ --spacing-input-margin-bottom: 0.5rem; /* TODO: needs baseline alignment https://github.com/canonical/vanilla-framework/blob/main/scss/_settings_spacing.scss#L122 */
23
+ --spacing-input-padding-vertical: 0.5rem; /* TODO: needs to take baseline into account https://github.com/canonical/vanilla-framework/blob/main/scss/_settings_spacing.scss#L124 */
24
+
25
+ --spacing-border-width: 1.5px; /* TODO: 1.5px was causing some baseline issues in Vanilla */
26
+
27
+ /* font tokens */
28
+ --font-size-default: 1rem;
29
+ --font-weight-default: 400;
30
+ --line-height-default: 1.5rem;
31
+ }