@rokkit/themes 1.0.0-next.50 → 1.0.0-next.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/themes",
3
- "version": "1.0.0-next.50",
3
+ "version": "1.0.0-next.52",
4
4
  "description": "Themes for use with rokkit components.",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",
@@ -12,23 +12,19 @@
12
12
  "access": "public"
13
13
  },
14
14
  "devDependencies": {
15
- "@sveltejs/vite-plugin-svelte": "^2.4.5",
16
- "@vitest/coverage-v8": "^0.34.4",
17
- "@vitest/ui": "~0.34.4",
15
+ "@sveltejs/vite-plugin-svelte": "^2.4.6",
16
+ "@vitest/coverage-v8": "^0.34.6",
17
+ "@vitest/ui": "~0.34.6",
18
18
  "jsdom": "^22.1.0",
19
- "svelte": "^4.2.0",
19
+ "svelte": "^4.2.1",
20
20
  "typescript": "^5.2.2",
21
21
  "vite": "^4.4.9",
22
- "vitest": "~0.34.4",
23
- "@rokkit/core": "1.0.0-next.50",
24
- "shared-config": "1.0.0-next.50"
22
+ "vitest": "~0.34.6",
23
+ "@rokkit/core": "1.0.0-next.52",
24
+ "shared-config": "1.0.0-next.52"
25
25
  },
26
26
  "files": [
27
- "src/**/*.js",
28
- "src/**/*.css",
29
- "src/**/*.svelte",
30
- "!src/fixtures",
31
- "!src/**/*.spec.js"
27
+ "src"
32
28
  ],
33
29
  "exports": {
34
30
  "./modern.css": "./src/modern.css",
@@ -0,0 +1,7 @@
1
+ # write a function to generate a fibonaci sequence of n numbers
2
+
3
+ def fib(n):
4
+ a, b = 0, 1
5
+ for i in range(n):
6
+ print(a)
7
+ a, b = b, a+b
@@ -0,0 +1,66 @@
1
+ @mixin set-theme-colors($theme-colors, $mode, $values: null) {
2
+ @each $name, $color in $theme-colors {
3
+ $hue: hue($color);
4
+ $saturation: saturation($color);
5
+ @if $values != null {
6
+ $start: if($mode == 'dark', length($values), 1);
7
+ $offset: if($mode == 'dark', -1, 1);
8
+ @for $i from 0 to length($values) - 1 {
9
+ $index: $start + $offset * $i;
10
+ $lightness: nth($values, $index);
11
+ $variable: '--#{$name}-#{50 + ($i) * 100}';
12
+ #{$variable}: hsl($hue, $saturation, $lightness);
13
+ }
14
+ } @else {
15
+ @for $i from 0 to 9 {
16
+ $lightness: if($mode == 'dark', $i * 10%, 100 - $i * 10%);
17
+ $variable: '--#{$name}-#{50 + ($i) * 100}';
18
+ #{$variable}: hsl($hue, $saturation, $lightness);
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ /* light theme syntax colors */
25
+ @mixin light-mode-syntax-colors {
26
+ --code-bg: #f3f4f6;
27
+ --code-fill: #f3f4f6;
28
+ --code-normal: #333333; /*hsl(45, 7%, 45%)*/
29
+ --code-string: hsl(41, 37%, 45%); /*#183691 */
30
+ --code-number: hsl(102, 27%, 50%); /* #0086b3;*/
31
+ --code-atrule: var(--code-string);
32
+ --code-keyword: hsl(204, 58%, 45%); /* #795da3;*/
33
+ --code-comment: #969896; /*hsl(210, 25%, 60%)*/
34
+ --code-property: #63a35c;
35
+ --code-selector: var(--code-keyword);
36
+ --code-operator: hsl(19, 67%, 45%);
37
+ --code-function: hsl(19, 67%, 45%); /* #a71d5d; */
38
+
39
+ --code-gutter-marker: black;
40
+ --code-gutter-subtle: #999;
41
+ --code-cursor: #24292e;
42
+ --code-cursor-block: rgba(20, 255, 20, 0.5);
43
+ --code-linenumbers: rgba(27, 31, 35, 0.3);
44
+ }
45
+
46
+ /* one dark theme syntax colors */
47
+ @mixin dark-mode-syntax-colors {
48
+ --code-bg: #282c34;
49
+ --code-fill: #282c34;
50
+ --code-normal: #e06c75; /*#ABB2BF;*/
51
+ --code-string: #98c379;
52
+ --code-number: #d19a66;
53
+ --code-atrule: #61afef;
54
+ --code-keyword: #c678dd;
55
+ --code-comment: #5c6370;
56
+ --code-property: #d19a66;
57
+ --code-selector: #e06c75;
58
+ --code-operator: #56b6c2;
59
+ --code-function: #61afef;
60
+
61
+ --code-gutter-marker: black;
62
+ --code-gutter-subtle: #999;
63
+ --code-cursor: #24292e;
64
+ --code-cursor-block: rgba(20, 255, 20, 0.5);
65
+ --code-linenumbers: rgba(27, 31, 35, 0.3);
66
+ }
@@ -0,0 +1,48 @@
1
+ @import './mixins.scss';
2
+
3
+ $theme-colors: (
4
+ primary: #fb923c,
5
+ secondary: #ef5da8,
6
+ accent: #eb479c,
7
+ skin: #262730
8
+ );
9
+
10
+ $lightness: (95%, 90%, 85%, 80%, 70%, 60%, 50%, 40%, 30%, 20%);
11
+
12
+ @layer base {
13
+ :root {
14
+ --primary-hue: 25;
15
+ --primary-saturation: 95%;
16
+ --secondary-hue: 329;
17
+ --secondary-saturation: 80%;
18
+ --accent-hue: 329;
19
+ --accent-saturation: 80%;
20
+ --skin-hue: 233;
21
+ --skin-saturation: 11.9%;
22
+
23
+ --tab-size: 2;
24
+ }
25
+
26
+ .light {
27
+ @include set-theme-colors($theme-colors, 'light', $lightness);
28
+ @include light-mode-syntax-colors();
29
+ }
30
+ .dark {
31
+ @include set-theme-colors($theme-colors, 'dark', $lightness);
32
+ @include dark-mode-syntax-colors();
33
+ }
34
+
35
+ @media (prefers-color-scheme: light) {
36
+ body:not(.dark) {
37
+ @include set-theme-colors($theme-colors, 'light', $lightness);
38
+ @include light-mode-syntax-colors();
39
+ }
40
+ }
41
+
42
+ @media (prefers-color-scheme: dark) {
43
+ body:not(.light) {
44
+ @include set-theme-colors($theme-colors, 'dark', $lightness);
45
+ @include dark-mode-syntax-colors();
46
+ }
47
+ }
48
+ }