Tabbed Code Snippets Component
tab-container-element with file icons and other fun stuff
by Nicholas Berlette
HTML
<script
src="https://unpkg.com/@github/tab-container-element@3"
type="module"
></script>
<script
src="https://unpkg.com/@github/clipboard-copy-element"
type="module"
></script>
<script src="https://unpkg.com/@unocss/runtime/preset-typography.global.js"></script>
<script src="https://unpkg.com/@unocss/runtime/preset-attributify.global.js"></script>
<script src="https://unpkg.com/@unocss/runtime/preset-uno.global.js"></script>
<script src="https://unpkg.com/@unocss/runtime/preset-wind.global.js"></script>
<script src="https://unpkg.com/@unocss/runtime/preset-icons.global.js"></script>
<script>
globalThis.__unocss = {
extendTheme(theme) {
return {
fontFamily: {
sans: [
"Gotham Narrow ScreenSmart",
"Gotham Narrow SSm",
"GothamNarrSSm",
"Inter",
"ui-sans-serif",
"system-ui",
"AppleColorEmoji",
"Apple Color Emoji",
"sans-serif",
],
mono: [
"Operator Mono ScreenSmart",
"Operator Mono SSm",
"Operator Mono Lig",
"Operator Mono",
"Dank Mono",
"DM Mono",
"IBM Plex Mono",
"MonoLisa",
"Fira Code",
"Roboto",
"ui-monospace",
"Courier New",
"monospace",
],
serif: [
"Sentinel ScreenSmart",
"Sentinel SSm",
"Sentinel",
"Didot",
"ui-serif",
"serif",
],
display: [
"Decimal",
"Knockout-93",
"Gotham",
...theme?.fontFamily?.sans,
],
},
}
},
presets: [
() => window.__unocss_runtime.presets.presetUno({
variablePrefix: "tw-",
}),
() => window.__unocss_runtime.presets.presetWind({}),
() => window.__unocss_runtime.presets.presetAttributify({}),
()...
CSS
:root {
color-scheme: light dark;
--animate-duration: 400ms;
--animate-delay: 400ms;
--animate-repeat: 1;
--snippet-bg: light-dark(#eee, #111827);
--base00: var(--override-base00, light-dark(#fff, #232a2f));
--base01: var(--override-base01, light-dark(#eaeaeb, #444267));
--base02: var(--override-base02, light-dark(#dbdbdc, #32374d));
--base03: var(--override-base03, light-dark(#a0a1a7, #707a84));
--base04: var(--override-base04, light-dark(#232324, #8796b0));
--base05: var(--override-base05, light-dark(#232324, #939da5));
--base06: var(--override-base06, light-dark(#8c98a2, #535d75));
--base07: var(--override-base07, light-dark(#000, #0184bc));
--base08: var(--override-base08, light-dark(#0184bc, #ff6a80));
--base09: var(--override-base09, light-dark(#986801, #ffa763));
--base0A: var(--override-base0A, light-dark(#4078f2, #ffea6b));
--base0B: var(--override-base0B, light-dark(#50a14e, #5bec95));
--base0C: var(--override-base0C, light-dark(#383a42, #89ddff));
--base0D: var(--override-base0D, light-dark(#4078f2, #82aaff));
--base0E: var(--override-base0E, light-dark(#a626a4, #ba8ef7));
--base0F: var(--override-base0F, light-dark(#dbdbdc, #ff8ad1));
--base0G: var(--override-base0G, light-dark(#f7f9fc, #1a2023));
--highlight-background: var(--override-base0G, light-dark(#d4ebff, #204062));
--highlight-border: var(--override-base0C, light-dark(#69b9ff, #69b9ff));
--prompt-text: var(--override-base07, light-dark(#0069e6, #0069e6));
--cursor-text: var(--override-base00, light-dark(#24292f, #24292f));
--border: var(--override-base00, light-dark(#eaeef2, rgba(0, 0, 0, 0.9)));
}
.light, .syntax-light, .light .syntax-dark {
color-scheme: light !important;
}
.dark, .syntax-dark, .dark .syntax-light {
color-scheme: dark !important;
}
/*
:root {
--base00: #232a2f;
--base01: #444267;
--base02: #32374d;
--base03: #707a84;
--base04: #8796b0;
--base05: #939da5;
--base06: #939da5;
--base07:...