@frontpanel/css 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +100 -2
- package/base.css +41 -0
- package/components.css +1100 -0
- package/fonts/OFL-michroma.txt +93 -0
- package/fonts/OFL-vt323.txt +93 -0
- package/fonts/michroma-latin-400.woff2 +0 -0
- package/fonts/vt323-latin-400.woff2 +0 -0
- package/fonts.css +24 -0
- package/index.css +3 -0
- package/package.json +59 -3
- package/page.css +103 -0
- package/tailwind-base.css +41 -0
- package/tailwind-page.css +103 -0
- package/tailwind.css +1158 -0
- package/tokens.css +135 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2011 The Michroma Project Authors (https://github.com/googlefonts/Michroma-font)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
package/fonts.css
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Opt-in @font-face for the two device faces, self-hosted woff2 (latin subsets) with their SIL Open
|
|
3
|
+
* Font License texts beside them in fonts/. Michroma prints the silkscreened labels
|
|
4
|
+
* (--fp-font-display) and VT323 the LCD text (--fp-font-lcd). Without this file the tokens fall
|
|
5
|
+
* back to Arial Black and Courier New.
|
|
6
|
+
*
|
|
7
|
+
* `@import "@frontpanel/css/fonts.css";` Bundlers rewrite the URLs below; to preload the faces,
|
|
8
|
+
* serve the files at a fixed path and point a <link rel="preload"> at them.
|
|
9
|
+
*/
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: "Michroma";
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
src: url("./fonts/michroma-latin-400.woff2") format("woff2");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: "VT323";
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
font-display: swap;
|
|
23
|
+
src: url("./fonts/vt323-latin-400.woff2") format("woff2");
|
|
24
|
+
}
|
package/index.css
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontpanel/css",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"description": "Early-2000s hardware skin as plain CSS: liquid-chrome bezels, gel buttons, LCDs and LEDs. Tokens, classes and an optional Tailwind 4 entry.",
|
|
6
|
+
"author": "Dulan Katukurundage",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://dulandev.github.io/frontpanel/",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/DulanDev/frontpanel.git",
|
|
12
|
+
"directory": "packages/css"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"css",
|
|
16
|
+
"y2k",
|
|
17
|
+
"skeuomorphic",
|
|
18
|
+
"chrome",
|
|
19
|
+
"ui-kit",
|
|
20
|
+
"design-system",
|
|
21
|
+
"tailwindcss"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"*.css"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
".": "./index.css",
|
|
28
|
+
"./index.css": "./index.css",
|
|
29
|
+
"./tokens.css": "./tokens.css",
|
|
30
|
+
"./base.css": "./base.css",
|
|
31
|
+
"./components.css": "./components.css",
|
|
32
|
+
"./fonts.css": "./fonts.css",
|
|
33
|
+
"./tailwind.css": "./tailwind.css",
|
|
34
|
+
"./page.css": "./page.css",
|
|
35
|
+
"./tailwind-page.css": "./tailwind-page.css",
|
|
36
|
+
"./tailwind-base.css": "./tailwind-base.css"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"base.css",
|
|
40
|
+
"components.css",
|
|
41
|
+
"fonts",
|
|
42
|
+
"fonts.css",
|
|
43
|
+
"icons",
|
|
44
|
+
"index.css",
|
|
45
|
+
"page.css",
|
|
46
|
+
"tailwind-base.css",
|
|
47
|
+
"tailwind-page.css",
|
|
48
|
+
"tailwind.css",
|
|
49
|
+
"tokens.css"
|
|
50
|
+
],
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"postcss": "^8.5.29",
|
|
53
|
+
"tailwindcss": "^4.3.3"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "node scripts/build.ts",
|
|
57
|
+
"build:watch": "node scripts/build.ts --watch",
|
|
58
|
+
"test": "vitest run",
|
|
59
|
+
"test:watch": "vitest",
|
|
60
|
+
"typecheck": "tsc --noEmit"
|
|
61
|
+
}
|
|
6
62
|
}
|
package/page.css
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Generated by scripts/build.ts from src/. Do not edit; edit the source and run `pnpm build`. */
|
|
2
|
+
@layer frontpanel {
|
|
3
|
+
/*
|
|
4
|
+
* Panels and sheets, for <Transition name="fp-sheet">. Enter is 200 ms, exit 150 ms and smaller:
|
|
5
|
+
* the eye is already moving on. Transitions (not keyframes) so a panel toggled mid-flight
|
|
6
|
+
* retargets instead of restarting.
|
|
7
|
+
*/
|
|
8
|
+
.fp-sheet-enter-active,
|
|
9
|
+
.fp-sheet-leave-active {
|
|
10
|
+
transition-property: opacity, translate;
|
|
11
|
+
transition-timing-function: ease-out;
|
|
12
|
+
will-change: translate;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fp-sheet-enter-active {
|
|
16
|
+
transition-duration: 200ms;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fp-sheet-leave-active {
|
|
20
|
+
transition-duration: 150ms;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fp-sheet-enter-from {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
translate: 0 12px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fp-sheet-leave-to {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
translate: 0 8px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Docked columns slide in from their own edge rather than up off the bottom. */
|
|
34
|
+
@media (width >= 64rem) {
|
|
35
|
+
.fp-sheet-enter-from {
|
|
36
|
+
translate: 6px 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.fp-sheet-leave-to {
|
|
40
|
+
translate: 4px 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Reduced motion: no slide, and 1 ms rather than 0, which reads as instant. A 0 ms transition fires
|
|
46
|
+
* no transitionend, so code waiting for the sheet to finish would wait forever.
|
|
47
|
+
*/
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
.fp-sheet-enter-active,
|
|
50
|
+
.fp-sheet-leave-active {
|
|
51
|
+
transition-duration: 1ms;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fp-sheet-enter-from,
|
|
55
|
+
.fp-sheet-leave-to {
|
|
56
|
+
translate: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* The page extra: pieces for a website around a device, not the device itself. They ship in the
|
|
62
|
+
* opt-in page.css and tailwind-page.css, never in the core entries.
|
|
63
|
+
*/
|
|
64
|
+
/** A matte panel lifted over the device as a bottom sheet on phones; dock it as an fp-module on wide screens. */
|
|
65
|
+
.fp-sheet-panel {
|
|
66
|
+
color-scheme: var(--fp-scheme);
|
|
67
|
+
border-radius: 14px 14px 0 0;
|
|
68
|
+
background-color: var(--fp-color-shell-matte);
|
|
69
|
+
box-shadow:
|
|
70
|
+
0 0 0 1px var(--fp-color-edge),
|
|
71
|
+
inset 1px 1px 0 var(--fp-color-bevel-hi),
|
|
72
|
+
0 -10px 28px var(--fp-color-cast);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Inset text field or select on a matte panel. Its border keeps 3:1 against the panel in both skins. */
|
|
76
|
+
.fp-field {
|
|
77
|
+
color-scheme: var(--fp-scheme);
|
|
78
|
+
min-height: 2.75rem;
|
|
79
|
+
width: 100%;
|
|
80
|
+
border-radius: 6px;
|
|
81
|
+
border: 1px solid var(--fp-color-edge-strong);
|
|
82
|
+
padding-inline: 0.625rem;
|
|
83
|
+
color: var(--fp-color-ink);
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
background-color: var(--fp-color-field);
|
|
86
|
+
box-shadow: inset 1px 1px 2px var(--fp-color-bevel-lo);
|
|
87
|
+
|
|
88
|
+
@media (pointer: fine) {
|
|
89
|
+
min-height: 2.25rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* A solid ring with a glow outside it: the glow alone fails non-text contrast on light chrome. */
|
|
93
|
+
&:focus-visible {
|
|
94
|
+
outline: 2px solid var(--fp-color-focus-ring);
|
|
95
|
+
outline-offset: 2px;
|
|
96
|
+
filter: drop-shadow(0 0 3px var(--fp-color-focus));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:disabled {
|
|
100
|
+
opacity: 0.55;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Generated by scripts/build.ts from src/. Do not edit; edit the source and run `pnpm build`. */
|
|
2
|
+
@layer base {
|
|
3
|
+
/*
|
|
4
|
+
* Page defaults, part of the opt-in page extra: for a page that is mostly a device, or a website
|
|
5
|
+
* around one. They style elements outside .fp-* classes, so nothing else in the package does this.
|
|
6
|
+
*
|
|
7
|
+
* Generated into two entries:
|
|
8
|
+
* - base.css, in @layer frontpanel: `@import "@frontpanel/css/base.css";` after index.css.
|
|
9
|
+
* - tailwind-base.css, straight in Tailwind's base layer so they follow preflight and its
|
|
10
|
+
* utilities still win: `@import "@frontpanel/css/tailwind-base.css";` after tailwindcss,
|
|
11
|
+
* with no layer().
|
|
12
|
+
*/
|
|
13
|
+
/* The page wears the skin. Native controls and scrollbars follow it, forced or not. */
|
|
14
|
+
:root {
|
|
15
|
+
color-scheme: var(--fp-scheme);
|
|
16
|
+
background-color: var(--fp-color-backdrop);
|
|
17
|
+
color: var(--fp-color-ink);
|
|
18
|
+
font-family: var(--fp-font-ui);
|
|
19
|
+
-webkit-text-size-adjust: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
margin: 0;
|
|
24
|
+
min-height: 100dvh;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* Everything else that takes focus gets the controls' ring: solid, with a glow outside it, since
|
|
29
|
+
* the glow alone fails non-text contrast on light chrome.
|
|
30
|
+
*/
|
|
31
|
+
:focus-visible {
|
|
32
|
+
outline: 2px solid var(--fp-color-focus-ring);
|
|
33
|
+
outline-offset: 2px;
|
|
34
|
+
filter: drop-shadow(0 0 3px var(--fp-color-focus));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
::selection {
|
|
38
|
+
background: var(--fp-color-gel);
|
|
39
|
+
color: var(--fp-color-gel-ink);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Generated by scripts/build.ts from src/. Do not edit; edit the source and run `pnpm build`. */
|
|
2
|
+
@layer components {
|
|
3
|
+
/*
|
|
4
|
+
* Panels and sheets, for <Transition name="fp-sheet">. Enter is 200 ms, exit 150 ms and smaller:
|
|
5
|
+
* the eye is already moving on. Transitions (not keyframes) so a panel toggled mid-flight
|
|
6
|
+
* retargets instead of restarting.
|
|
7
|
+
*/
|
|
8
|
+
.fp-sheet-enter-active,
|
|
9
|
+
.fp-sheet-leave-active {
|
|
10
|
+
transition-property: opacity, translate;
|
|
11
|
+
transition-timing-function: ease-out;
|
|
12
|
+
will-change: translate;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fp-sheet-enter-active {
|
|
16
|
+
transition-duration: 200ms;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fp-sheet-leave-active {
|
|
20
|
+
transition-duration: 150ms;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fp-sheet-enter-from {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
translate: 0 12px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fp-sheet-leave-to {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
translate: 0 8px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Docked columns slide in from their own edge rather than up off the bottom. */
|
|
34
|
+
@media (width >= 64rem) {
|
|
35
|
+
.fp-sheet-enter-from {
|
|
36
|
+
translate: 6px 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.fp-sheet-leave-to {
|
|
40
|
+
translate: 4px 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Reduced motion: no slide, and 1 ms rather than 0, which reads as instant. A 0 ms transition fires
|
|
46
|
+
* no transitionend, so code waiting for the sheet to finish would wait forever.
|
|
47
|
+
*/
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
.fp-sheet-enter-active,
|
|
50
|
+
.fp-sheet-leave-active {
|
|
51
|
+
transition-duration: 1ms;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fp-sheet-enter-from,
|
|
55
|
+
.fp-sheet-leave-to {
|
|
56
|
+
translate: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
* The page extra: pieces for a website around a device, not the device itself. They ship in the
|
|
63
|
+
* opt-in page.css and tailwind-page.css, never in the core entries.
|
|
64
|
+
*/
|
|
65
|
+
/** A matte panel lifted over the device as a bottom sheet on phones; dock it as an fp-module on wide screens. */
|
|
66
|
+
@utility fp-sheet-panel {
|
|
67
|
+
color-scheme: var(--fp-scheme);
|
|
68
|
+
border-radius: 14px 14px 0 0;
|
|
69
|
+
background-color: var(--fp-color-shell-matte);
|
|
70
|
+
box-shadow:
|
|
71
|
+
0 0 0 1px var(--fp-color-edge),
|
|
72
|
+
inset 1px 1px 0 var(--fp-color-bevel-hi),
|
|
73
|
+
0 -10px 28px var(--fp-color-cast);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Inset text field or select on a matte panel. Its border keeps 3:1 against the panel in both skins. */
|
|
77
|
+
@utility fp-field {
|
|
78
|
+
color-scheme: var(--fp-scheme);
|
|
79
|
+
min-height: 2.75rem;
|
|
80
|
+
width: 100%;
|
|
81
|
+
border-radius: 6px;
|
|
82
|
+
border: 1px solid var(--fp-color-edge-strong);
|
|
83
|
+
padding-inline: 0.625rem;
|
|
84
|
+
color: var(--fp-color-ink);
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
background-color: var(--fp-color-field);
|
|
87
|
+
box-shadow: inset 1px 1px 2px var(--fp-color-bevel-lo);
|
|
88
|
+
|
|
89
|
+
@media (pointer: fine) {
|
|
90
|
+
min-height: 2.25rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* A solid ring with a glow outside it: the glow alone fails non-text contrast on light chrome. */
|
|
94
|
+
&:focus-visible {
|
|
95
|
+
outline: 2px solid var(--fp-color-focus-ring);
|
|
96
|
+
outline-offset: 2px;
|
|
97
|
+
filter: drop-shadow(0 0 3px var(--fp-color-focus));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:disabled {
|
|
101
|
+
opacity: 0.55;
|
|
102
|
+
}
|
|
103
|
+
}
|