Theme Base
Start values of a skin scoped on an element (data-skin on any element but <html>): the kit font, tracking, radius and shadows, so the element shows its own skin only. Licences of the skins in NOTICE.md.
Install
npx ui8kit add theme-basePreview
No static preview for this item: it needs content or a parent that this page cannot supply. The code is below.
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add theme-basestyles/skins/base.css
/* What a skin scoped on an element inside the page starts from (a tile of /skins/ carries data-skin="<name>"): the kit's
default font, weights, tracking, radius and shadows, so a tile shows its own skin and nothing of the skin of the page.
:where() keeps this rule at zero specificity, so the skin's own rule always wins. <html> itself is never matched here. */
:where([data-skin]:not(:root)) {
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-weight-medium: 500;
--font-weight-semibold: 600;
--tracking-normal: 0em;
--radius: 0.625rem;
--shadow-2xs: 0 1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.1), 0 8px 10px -6px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 25px 50px -12px hsl(0 0% 0% / 0.25);
font-family: var(--font-sans);
letter-spacing: var(--tracking-normal);
background-color: var(--background);
color: var(--foreground);
}
styles/skins/NOTICE.md
# Skins: sources and licences
- `sky.css`, `rose.css`, `base.css`, `default.css`: ui8kit (this repository).
- Every other `.css` file here is a built-in theme preset of **tweakcn** by Sahaj Jain and contributors
(<https://github.com/jnsahaj/tweakcn>, `utils/theme-presets.ts` at commit `a3b47b37cba97dd637de517aab52c45ec0f83456`),
used under the **Apache License, Version 2.0** (<https://www.apache.org/licenses/LICENSE-2.0>). tweakcn ships no NOTICE file.
- Changes made to the tweakcn presets: merged with tweakcn's defaults and converted to CSS by
`packages/skins/tools/tweakcn-skins.ts` (the colours, radius, fonts, shadows and letter spacing are tweakcn's values);
the selectors are ours (`data-skin` on `<html>` or on an element); a preset's `spacing` is not taken (the kit keeps 0.25rem);
fonts without medium or semibold faces have those weights mapped onto the faces that exist.
- `skins.json` lists every skin, where it comes from and the Google Fonts it loads when it is on.
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add theme-basestyles/skins/base.css
/* What a skin scoped on an element inside the page starts from (a tile of /skins/ carries data-skin="<name>"): the kit's
default font, weights, tracking, radius and shadows, so a tile shows its own skin and nothing of the skin of the page.
:where() keeps this rule at zero specificity, so the skin's own rule always wins. <html> itself is never matched here. */
:where([data-skin]:not(:root)) {
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-weight-medium: 500;
--font-weight-semibold: 600;
--tracking-normal: 0em;
--radius: 0.625rem;
--shadow-2xs: 0 1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.1), 0 8px 10px -6px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 25px 50px -12px hsl(0 0% 0% / 0.25);
font-family: var(--font-sans);
letter-spacing: var(--tracking-normal);
background-color: var(--background);
color: var(--foreground);
}
styles/skins/NOTICE.md
# Skins: sources and licences
- `sky.css`, `rose.css`, `base.css`, `default.css`: ui8kit (this repository).
- Every other `.css` file here is a built-in theme preset of **tweakcn** by Sahaj Jain and contributors
(<https://github.com/jnsahaj/tweakcn>, `utils/theme-presets.ts` at commit `a3b47b37cba97dd637de517aab52c45ec0f83456`),
used under the **Apache License, Version 2.0** (<https://www.apache.org/licenses/LICENSE-2.0>). tweakcn ships no NOTICE file.
- Changes made to the tweakcn presets: merged with tweakcn's defaults and converted to CSS by
`packages/skins/tools/tweakcn-skins.ts` (the colours, radius, fonts, shadows and letter spacing are tweakcn's values);
the selectors are ours (`data-skin` on `<html>` or on an element); a preset's `spacing` is not taken (the kit keeps 0.25rem);
fonts without medium or semibold faces have those weights mapped onto the faces that exist.
- `skins.json` lists every skin, where it comes from and the Google Fonts it loads when it is on.
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add theme-basestyles/skins/base.css
/* What a skin scoped on an element inside the page starts from (a tile of /skins/ carries data-skin="<name>"): the kit's
default font, weights, tracking, radius and shadows, so a tile shows its own skin and nothing of the skin of the page.
:where() keeps this rule at zero specificity, so the skin's own rule always wins. <html> itself is never matched here. */
:where([data-skin]:not(:root)) {
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-weight-medium: 500;
--font-weight-semibold: 600;
--tracking-normal: 0em;
--radius: 0.625rem;
--shadow-2xs: 0 1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.1), 0 8px 10px -6px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 25px 50px -12px hsl(0 0% 0% / 0.25);
font-family: var(--font-sans);
letter-spacing: var(--tracking-normal);
background-color: var(--background);
color: var(--foreground);
}
styles/skins/NOTICE.md
# Skins: sources and licences
- `sky.css`, `rose.css`, `base.css`, `default.css`: ui8kit (this repository).
- Every other `.css` file here is a built-in theme preset of **tweakcn** by Sahaj Jain and contributors
(<https://github.com/jnsahaj/tweakcn>, `utils/theme-presets.ts` at commit `a3b47b37cba97dd637de517aab52c45ec0f83456`),
used under the **Apache License, Version 2.0** (<https://www.apache.org/licenses/LICENSE-2.0>). tweakcn ships no NOTICE file.
- Changes made to the tweakcn presets: merged with tweakcn's defaults and converted to CSS by
`packages/skins/tools/tweakcn-skins.ts` (the colours, radius, fonts, shadows and letter spacing are tweakcn's values);
the selectors are ours (`data-skin` on `<html>` or on an element); a preset's `spacing` is not taken (the kit keeps 0.25rem);
fonts without medium or semibold faces have those weights mapped onto the faces that exist.
- `skins.json` lists every skin, where it comes from and the Google Fonts it loads when it is on.
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add theme-basestyles/skins/base.css
/* What a skin scoped on an element inside the page starts from (a tile of /skins/ carries data-skin="<name>"): the kit's
default font, weights, tracking, radius and shadows, so a tile shows its own skin and nothing of the skin of the page.
:where() keeps this rule at zero specificity, so the skin's own rule always wins. <html> itself is never matched here. */
:where([data-skin]:not(:root)) {
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-weight-medium: 500;
--font-weight-semibold: 600;
--tracking-normal: 0em;
--radius: 0.625rem;
--shadow-2xs: 0 1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.1), 0 8px 10px -6px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 25px 50px -12px hsl(0 0% 0% / 0.25);
font-family: var(--font-sans);
letter-spacing: var(--tracking-normal);
background-color: var(--background);
color: var(--foreground);
}
styles/skins/NOTICE.md
# Skins: sources and licences
- `sky.css`, `rose.css`, `base.css`, `default.css`: ui8kit (this repository).
- Every other `.css` file here is a built-in theme preset of **tweakcn** by Sahaj Jain and contributors
(<https://github.com/jnsahaj/tweakcn>, `utils/theme-presets.ts` at commit `a3b47b37cba97dd637de517aab52c45ec0f83456`),
used under the **Apache License, Version 2.0** (<https://www.apache.org/licenses/LICENSE-2.0>). tweakcn ships no NOTICE file.
- Changes made to the tweakcn presets: merged with tweakcn's defaults and converted to CSS by
`packages/skins/tools/tweakcn-skins.ts` (the colours, radius, fonts, shadows and letter spacing are tweakcn's values);
the selectors are ours (`data-skin` on `<html>` or on an element); a preset's `spacing` is not taken (the kit keeps 0.25rem);
fonts without medium or semibold faces have those weights mapped onto the faces that exist.
- `skins.json` lists every skin, where it comes from and the Google Fonts it loads when it is on.
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
No props data for this item.