Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/userstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ body:
type: input
attributes:
label: Browser version(s) this issue occurs on
description: "To get the browser version, see https://userstyles.catppuccin.com/reference/browsers."
description: "To get the browser version, see https://userstyles.catppuccin.com/getting-started/faq/#what-version-of-my-browser-am-i-using."
placeholder: Firefox v112.0.2
validations:
required: true
Expand Down
32 changes: 9 additions & 23 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import catppuccin from "@catppuccin/starlight";
import starlightLinksValidator from "starlight-links-validator";
import starlightImageZoom from "starlight-image-zoom";
import starlightGitHubAlerts from "starlight-github-alerts";
import starlightAutoSidebar from "starlight-auto-sidebar";
import mermaid from "astro-mermaid";
import { remarkHeadingId } from "remark-custom-heading-id";

Expand Down Expand Up @@ -57,37 +58,22 @@ export default defineConfig({
{
label: "Contributing",
collapsed: true,
items: [
"contributing",
"contributing/creating-userstyles",
"contributing/userstylesyml",
{
label: "How can I theme ...?",
autogenerate: { directory: "contributing/guides" },
},
{
label: "Tutorials",
autogenerate: { directory: "contributing/tutorials" },
},
{
label: "Tips and Tricks",
autogenerate: { directory: "contributing/tips-and-tricks" },
},
"contributing/standard-library",
"contributing/library-modules",
],
},
{
label: "Reference",
autogenerate: { directory: "reference" },
autogenerate: { directory: "contributing" },
},
],
plugins: [
catppuccin(),
starlightLinksValidator(),
starlightGitHubAlerts(),
starlightImageZoom(),
starlightAutoSidebar(),
],
}),
],
redirects: {
"/contributing/standard-library/":
"/contributing/reference/libraries/standard/",
"/reference/browsers/":
"/getting-started/faq/#what-version-of-my-browser-am-i-using",
},
});
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"mermaid": "^11.10.1",
"remark-custom-heading-id": "^2.0.0",
"sharp": "^0.34.2",
"starlight-auto-sidebar": "^0.2.0",
"starlight-github-alerts": "^0.1.0",
"starlight-image-zoom": "^0.13.0",
"starlight-links-validator": "^0.18.0",
Expand Down
14 changes: 14 additions & 0 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { defineCollection } from "astro:content";
import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from "@astrojs/starlight/schema";
import { autoSidebarLoader } from "starlight-auto-sidebar/loader";
import { autoSidebarSchema } from "starlight-auto-sidebar/schema";

export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
autoSidebar: defineCollection({
loader: autoSidebarLoader(),
schema: autoSidebarSchema(),
}),
};
2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/creating-userstyles.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Creating Userstyles
description: Overview of the userstyle creation process.
sidebar:
order: 2
---

import { Steps } from '@astrojs/starlight/components';
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/guides/_meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: How can I theme ...?
order: 5
4 changes: 2 additions & 2 deletions docs/src/content/docs/contributing/guides/raw-color-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ sidebar:

## Obtaining RGB values

See [`#lib.rgbify()`](/contributing/standard-library/#librgbify).
See [`#lib.rgbify()`](/contributing/reference/libraries/standard/v/v1#librgbify).

## Obtaining HSL values

See [`#lib.hslify()`](/contributing/standard-library/#libhslify).
See [`#lib.hslify()`](/contributing/reference/libraries/standard/v/v1#libhslify).
1 change: 1 addition & 0 deletions docs/src/content/docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Contributing
description: Contribution guidelines for the Catppuccin Userstyles project.
sidebar:
label: Overview
order: 1
---

If it is your first time contributing to a project on GitHub, please see the popular [first-contributions](https://github.com/firstcontributions/first-contributions) repository. This will give you hands-on experience with the features of GitHub required to make a contribution. As always, feel free to join our [Discord](https://discord.com/servers/catppuccin-907385605422448742) to ask any questions and clarify your understanding, we are more than happy to help!
Expand Down
6 changes: 0 additions & 6 deletions docs/src/content/docs/contributing/library-modules.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/reference/_meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Reference
order: 7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: Libraries
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
label: Modules
badge:
text: Beta
variant: caution
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Library Modules
description: Reference for library modules.
sidebar:
label: Overview
---

Library modules consist of collections of mixins which target design systems or commonly used libraries.

They follow a standard structure and should be built to be modular and reusable across several userstyles.

## Structure

The [standard library](/contributing/reference/libraries/standard/) is a good reference as to how libraries can be structured.

All libraries are in lib/ with subdirectories per library name, and versioned files (e.g., `v1.less`, `v2.less`, etc).

They must have a top level mixin in the format `#__libraryname`. All constants and variables should be under a nested `.base` mixin. The nested mixin is used like `#__libraryname.base()` after all other standard library statements.

Other mixins and constants may be included, but they must be under the top level mixin for scoping purposes.

## Creation

Identify what your library module will achieve. Are you targeting a design system, framework, or a library?

If a design system or framework, is it specific to one userstyle or reusable across multiple? What are the popularity metrics of it? Is the increased maintenance workload worth the benefit it provides in DRY (Don't Repeat Yourself)?

If the target is a web library, check if there is an [existing port](http://catppuccin.com/ports) for it. The methods outlined in [Syntax Highlighting](/contributing/guides/syntax-highlighting/) may be used to import the theme for the library in question. Some ports may need changes upstreamed to work for userstyles purposes; in these cases, please coordinate with userstyles staff to determine the most suitable approach.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Standard Library
order: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Overview
description: Reference to using the standard library.
sidebar:
order: 1
---

import { Badge } from '@astrojs/starlight/components';


| Version | Documentation | Source Code |
| -------------------------------------------------------------------------------- | -------------------------------------------------- | -------------- |
| v1 <Badge text="Latest" variant="success" style={{ marginLeft: '0.5rem' }} /> | [/v/v1](/contributing/reference/libraries/standard/v/v1/) | [`lib/std/v1.less`](https://github.com/catppuccin/userstyles/blob/main/lib/std/v1.less) |

---

The standard library is a collection of mixins to deduplicate and simplify code in userstyles. It is imported in every userstyle, alongside with other [library modules](/contributing/reference/libraries/modules/) if applicable.

## Importing

```less
@import "https://userstyles.catppuccin.com/lib/std/v1.less";
```

## Changelog

### v1

v1 is the first versioned release of the standard library. To migrate from "v0", update your standard library import URLs at the top of the userstyle:

```diff
-@import "https://userstyles.catppuccin.com/lib/lib.less";
+@import "https://userstyles.catppuccin.com/lib/std/v1.less";
```

This release contains no API changes and is safe to upgrade to for all userstyles.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: Versions
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
title: Standard Library
description: Reference to using the standard library.
title: v1
description: Reference to using the v1 version of the standard library.
sidebar:
badge:
text: Latest
variant: success
---

The standard library is a collection of mixins to simplify and prevent redundant code in userstyles. The source code is at [`lib/lib.less`](https://github.com/catppuccin/userstyles/blob/main/lib/lib.less) and the library is hosted at https://userstyles.catppuccin.com/lib/lib.less.

In userstyles, the standard library is imported at the top like so (along with other [library modules](/contributing/library-modules/)):
## Usage

```less
@import "https://userstyles.catppuccin.com/lib/lib.less";
@import "https://userstyles.catppuccin.com/lib/std/v1.less";
```

## API
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/tips-and-tricks/_meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Tips and Tricks
order: 6
2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/tutorials/_meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Tutorials
order: 4
2 changes: 2 additions & 0 deletions docs/src/content/docs/contributing/userstylesyml.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: userstyles.yml
description: Guide for adding and removing userstyles and maintainers.
sidebar:
order: 3
---

import { Steps } from "@astrojs/starlight/components";
Expand Down
16 changes: 16 additions & 0 deletions docs/src/content/docs/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,19 @@ Sorry to hear that! Please [open an issue](https://github.com/catppuccin/usersty
## Can I request a userstyle?

To request a website to be themed, please create a [Port Request](https://github.com/catppuccin/catppuccin/discussions/new?category=port-requests) discussion on [catppuccin/catppuccin](https://github.com/catppuccin/catppuccin).

## What version of my browser am I using?

**To find your browser's version:**

- Find your browser in the table below and follow the matching link to visit the page with the version.
- _Chrome/Chromium_: the version should be the first entry in the table that appears. There is a copy to clipboard button after the version number which you can use.
- _Firefox_: the version is under the "Application Basics" section in the row labeled "Version".

| Browser | Version |
| -------------- | ------------------- |
| Chromium | `chrome://version/` |
| Firefox | `about:support` |
| Opera (GX) | `opera://about/` |
| Microsoft Edge | `edge://version/` |
| Arc | `arc://version/` |
25 changes: 0 additions & 25 deletions docs/src/content/docs/reference/browsers.md

This file was deleted.

Loading
Loading