Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default defineConfig({
},
"contributing/standard-library",
"contributing/library-modules",
"contributing/style-guide",
],
},
{
Expand Down
43 changes: 43 additions & 0 deletions docs/src/components/ColorTable.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
const { data } = Astro.props;

const flavors = ['latte', 'frappe', 'macchiato', 'mocha'];
---

<table>
<tr>
<th>Function</th>
<th colspan="2">Colors</th>
</tr>
{data.map((row) => (
<tr>
<td class="function">{row.function}</td>
<td class="color-names">{row.colors.map((color) => <span>{color}</span><br>)}</td>
<td class="color-tiles">
{row.colors.map((color) => (
<div class="color-tiles-row">
{flavors.map((flavor) =>
<img src={`https://github.com/catppuccin/catppuccin/raw/main/assets/palette/circles/${flavor}_${color}.png`}
height={15}
width={16}
alt={`${flavor.charAt(0).toUpperCase() + flavor.slice(1)} ${color.charAt(0).toUpperCase() + color.slice(1)}`}
/>
)}
</div>
))}
</td>
</tr>
))}
</table>

<style>
.color-tiles-row {
display: flex;
flex-direction: row;
gap: 0.25rem;

img {
margin-top: 0;
}
}
</style>
27 changes: 27 additions & 0 deletions docs/src/content/docs/contributing/style-guide.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Style Guide
description: Userstyles web elements style guide.
---

import ColorTable from '../../../components/ColorTable.astro';

## Inputs

<ColorTable data={[
{ function: 'Textarea', colors: ['mantle'] },
{ function: 'Text Input', colors: ['mantle'] },
{ function: 'Code Blocks', colors: ['mantle'] },
{ function: 'Inline Code', colors: ['mantle', 'surface0'] },
{ function: 'Overlays', colors: ['overlay0', 'overlay1', 'overlay2'] }
]}
/>


## Links

<ColorTable data={[
{ function: 'Regular', colors: ['blue'] },
{ function: ':hover', colors: ['sky'] },
{ function: ':visited/:followed', colors: ['lavender'] },
]}
/>