docs: the PR to end all PRs maybe (#681)
Co-authored-by: Hamothy <[email protected]> Co-authored-by: uncenter <[email protected]>
This commit is contained in:
5 files changed
+234
-98
No files matched your search
+43
-14
@@ -12,22 +12,51 @@ request.
|
||||
|
||||
It is important to note that there are **two types of PRs** for this repository:
|
||||
|
||||
1. **New Userstyles:** Please see [userstyle-creation.md](userstyle-creation.md).
|
||||
2. **Other improvements:** These should follow the recommendations below, to help
|
||||
improve the chances of a merged PR.
|
||||
1. **New Userstyles:** Please see [userstyle-creation.md](./userstyle-creation.md).
|
||||
2. **Other improvements:** These should follow the recommendations below, to help improve the chances of a merged PR.
|
||||
|
||||
## General Recommendations
|
||||
## Recommendations
|
||||
|
||||
- Create a
|
||||
[topic branch](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows#_topic_branch)
|
||||
on your fork for your specific PR.
|
||||
- Catppuccin uses the [Conventional Commits
|
||||
](https://www.conventionalcommits.org/en/v1.0.0/) standard for creating explicit and meaningful commit messages. This repository requires pull request _titles_ to be in the conventional commit format, however we do not require it for individual commits within a pull request.
|
||||
- Update the version in the `==UserStyle==` header of the `catppuccin.user.css` file. This is to enable version control of the style.
|
||||
### Root Variables
|
||||
|
||||
While writing a userstyle, you may have come across [custom properties / CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/--*), typically wrapped in a `:root` selector. We refer to these variables as "root variables", and they can be thought of as global variables used all across a website. For Catppuccin userstyles, we prefer that these variables are themed (if they exist) rather than individual elements. As the website hopefully uses these variables themselves, it saves yourself a lot of work in theming and maintaining the userstyle.
|
||||
|
||||
### Opinionated Changes
|
||||
|
||||
When writing or updating a userstyle, it is important to keep in mind that different users have different preferences. To avoid lengthy discussion over user interface aesthetics, we have a set of rules for what a userstyle may include; importantly, **changes to font or layout (padding, margin, hiding/moving elements) are prohibited.**
|
||||
|
||||
|
||||
### General Recommendations
|
||||
|
||||
- Create a [topic branch](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows#_topic_branch) on your fork for your specific PR.
|
||||
- Catppuccin uses the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
||||
standard for creating explicit and meaningful commit messages. This repository
|
||||
requires pull request _titles_ to be in the conventional commit format,
|
||||
however we do not require it for individual commits within a pull request.
|
||||
- Update the version in the `==UserStyle==` header of the `catppuccin.user.css`
|
||||
file. This is to enable version control of the style.
|
||||
- If it's your first time contributing to a project then you should look to the
|
||||
popular
|
||||
[first-contributions](https://github.com/firstcontributions/first-contributions)
|
||||
popular [first-contributions](https://github.com/firstcontributions/first-contributions)
|
||||
repository on GitHub. 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
|
||||
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!
|
||||
- Changes to docs may need to use [marksman](https://github.com/artempyanykh/marksman) to generate the table of contents.
|
||||
|
||||
## Pull Request Review Process
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A[New userstyle];
|
||||
B[Other improvements];
|
||||
A --> C[Review by userstyles staff];
|
||||
B --> D[Review by maintainer];
|
||||
C --> E{Feedback};
|
||||
D --> F{Feedback};
|
||||
E -->|Changes made| E;
|
||||
F -->|Changes made| F;
|
||||
E -->|Approved by userstyles staff| K;
|
||||
F -->|Approved by maintainer or userstyles staff| L[Merged by maintainer];
|
||||
K[Waiting period*] --> M[Merged by userstyles staff];
|
||||
```
|
||||
|
||||
*A waiting period is usually started if a website is particularly complex or for any other reason could not be thoroughly/completely tested. Waiting periods typically last between 1 and 2 days.
|
||||
@@ -8,6 +8,19 @@
|
||||
|
||||
|
||||
|
||||
### Table of Contents
|
||||
|
||||
<!--toc:start-->
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Setup](#setup)
|
||||
- [Usercss Metadata](#usercss-metadata)
|
||||
- [`@-moz-document`](#moz-document)
|
||||
- [The lookup table](#the-lookup-table)
|
||||
- [The `#catppuccin` mixin](#the-catppuccin-mixin)
|
||||
- [Applying the theme](#applying-the-theme)
|
||||
- [Putting it all together](#putting-it-all-together)
|
||||
<!--toc:end-->
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Stylus](https://github.com/openstyles/stylus) ([Firefox](https://addons.mozilla.org/en-GB/firefox/addon/styl-us/) / [Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne)
|
||||
|
||||
+29
-2
@@ -4,6 +4,20 @@
|
||||
|
||||
|
||||
|
||||
### Table of Contents
|
||||
|
||||
<!--toc:start-->
|
||||
- [How can I see my changes in real time?](#how-can-i-see-my-changes-in-real-time)
|
||||
- [How can I hide sensitive information in preview screenshots?](#how-can-i-hide-sensitive-information-in-preview-screenshots)
|
||||
- [How do I convert preview images to WebP?](#how-do-i-convert-preview-images-to-webp)
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
- [How do I theme images and SVGs?](#how-do-i-theme-images-and-svgs)
|
||||
- [SVG background images](#svg-background-images)
|
||||
- [`<img>` elements](#img-elements)
|
||||
- [How do I set a variable to RGB values?](#how-do-i-set-a-variable-to-rgb-values)
|
||||
<!--toc:end-->
|
||||
|
||||
### How can I see my changes in real time?
|
||||
|
||||
See [Stylus Wiki - Initial installation and live reload](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#initial-installation-and-live-reload).
|
||||
@@ -36,8 +50,8 @@ The Catppuccin project prefers to use the [WebP image format](https://en.wikiped
|
||||
|
||||
| Method | Instructions |
|
||||
| ------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| [Homebrew](https://brew.sh/) | `brew install webp` [[view cask]](https://formulae.brew.sh/formula/webp) |
|
||||
| [MacPorts](https://www.macports.org/) | `sudo port install webp` [[view port]](https://ports.macports.org/port/webp/) |
|
||||
| [Homebrew](https://brew.sh/) | `brew install webp` [[view cask]](https://formulae.brew.sh/formula/webp) |
|
||||
| [MacPorts](https://www.macports.org/) | `sudo port install webp` [[view port]](https://ports.macports.org/port/webp/) |
|
||||
| Binaries | See https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html. |
|
||||
|
||||
#### Usage
|
||||
@@ -120,3 +134,16 @@ img.twitter-icon {
|
||||
background: url("data:image/svg+xml,@{svg}") no-repeat !important;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### How do I set a variable to RGB values?
|
||||
|
||||
You can use the following snippet to get the raw RGB values from a color.
|
||||
|
||||
```less
|
||||
#rgbify(@color) {
|
||||
@rgb-raw: red(@color), green(@color), blue(@color);
|
||||
}
|
||||
|
||||
--ctp-base: #rgbify(@base) []; // -> 30, 30, 46
|
||||
```
|
||||
@@ -8,14 +8,16 @@
|
||||
|
||||
|
||||
|
||||
### Table of Contents
|
||||
|
||||
<!--toc:start-->
|
||||
- [Requesting Userstyles](#requesting-userstyles)
|
||||
- [Creating Userstyles](#creating-userstyles)
|
||||
<!--toc:end-->
|
||||
|
||||
### Requesting Userstyles
|
||||
|
||||
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).
|
||||
While this may seem odd, this ensures to keep all of our requests in one place
|
||||
and makes it easier for all people to request what they want without needing to
|
||||
learn what "Stylus" exactly is.
|
||||
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). While this may seem odd, this ensures to keep all of our requests in one place and makes it easier for all people to request what they want without needing to learn what "Stylus" exactly is.
|
||||
|
||||
**If you have already created a userstyle, please raise a
|
||||
[Pull Request](https://github.com/catppuccin/userstyles/compare)!**
|
||||
@@ -38,7 +40,7 @@ To create a userstyle, follow the instructions listed below:
|
||||
userstyles based on the template.**
|
||||
5. [Write the userstyle](./how-to-write-a-userstyle.md).
|
||||
6. Edit the [`userstyles.yml`](../scripts/userstyles.yml) file and put in the details
|
||||
of your port. **More details given below.**
|
||||
of your port. **More details given in [`userstylesyml.md`](./userstylesyml.md).**
|
||||
7. Create your image preview.
|
||||
- Take a screenshot of the themed website in each flavor, and then convert all four images [to WebP](./tips-and-tricks.md#how-do-i-convert-preview-images-to-webp) (e.g. `mocha.webp`,
|
||||
`macchiato.webp`, `frappe.webp` & `latte.webp`).
|
||||
@@ -47,78 +49,3 @@ To create a userstyle, follow the instructions listed below:
|
||||
`styles/<name-of-website>/preview.webp`.**
|
||||
8. Raise a [pull request](https://github.com/catppuccin/userstyles/compare),
|
||||
making sure to read and fill out the template properly. The title of your pull request should follow the format of `feat(<port-name>): init`.
|
||||
|
||||
|
||||
|
||||
### `userstyles.yml`
|
||||
|
||||
**Please note that the `README`s for each port are auto-generated by scripts
|
||||
defined in [`scripts/generate/`](../scripts/generate)**, along with many other parts of
|
||||
this repository. This file, [`userstyles.yml`](../scripts/userstyles.yml), is responsible for holding the
|
||||
necessary data to auto-generate everything.
|
||||
|
||||
[`userstyles.schema.json`](../scripts/userstyles.schema.json) is the schema
|
||||
specification for this file. The fields in the following instructions are based
|
||||
on the schema:
|
||||
|
||||
1. Add your name to the list of collaborators.
|
||||
|
||||
```yaml
|
||||
collaborators:
|
||||
- &<github-username>
|
||||
name: <your name, this is optional>
|
||||
url: https://github.com/<github-username>
|
||||
```
|
||||
|
||||
2. Locate the `userstyles` section and add your port to the list.
|
||||
|
||||
You should make changes to everything wrapped in `<>` and remove the `<>`
|
||||
characters. If you need help with any of the fields, you should refer to
|
||||
other ports in the `userstyle.yml` file. If you would like extra guidance,
|
||||
you can ask for help in the pull request or join our
|
||||
[Discord](https://discord.com/servers/catppuccin-907385605422448742).
|
||||
|
||||
`Required Fields:`
|
||||
|
||||
```yaml
|
||||
<port>:
|
||||
name: <name>
|
||||
# Up to 3 categories are allowed, and having at least one is required.
|
||||
# The first category is considered the "primary" category and impacts where the userstyle appears on the README.
|
||||
categories: [<primary-category>]
|
||||
color: <color>
|
||||
readme:
|
||||
app-link: <url>
|
||||
current-maintainers: [*<github-username>]
|
||||
```
|
||||
|
||||
`All Fields:`
|
||||
|
||||
These extra `usage` & `faq` keys will ensure that you can add important
|
||||
information about the port to the README.
|
||||
|
||||
The `icon` key is best explained the schema specification itself.
|
||||
|
||||
The `past-maintainers` key is a list of people who have maintained the port
|
||||
in the past. We encourage all maintainers to add/remove themselves from this
|
||||
list as they see fit.
|
||||
|
||||
Remember that these 5 fields are **optional**.
|
||||
|
||||
```yaml
|
||||
<port>:
|
||||
name: <name>
|
||||
categories: [<primary-category>, <optional-secondary-category>, <optional-third-category>]
|
||||
color: <color>
|
||||
icon: <icon> # OPTIONAL
|
||||
readme:
|
||||
app-link: "<url>"
|
||||
usage: |+ # OPTIONAL
|
||||
> [!NOTE]
|
||||
> <your notes>
|
||||
faq: # OPTIONAL
|
||||
- question: <question>
|
||||
answer: <answer>
|
||||
current-maintainers: [*<github-username>]
|
||||
past-maintainers: [*<github-username>] # OPTIONAL
|
||||
```
|
||||
@@ -0,0 +1,140 @@
|
||||
<p align="center">
|
||||
<h2 align="center">📖 <code>userstyles.yml</code></h2>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
The <a href="../scripts/userstyles.yml"><code>userstyles.yml</code></a> file is responsible for tracking all information about each userstyle.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
### Table of Contents
|
||||
|
||||
<!--toc:start-->
|
||||
- [Adding a new userstyle](#adding-a-new-userstyle)
|
||||
- [Adding yourself as a maintainer](#adding-yourself-as-a-maintainer)
|
||||
- [Removing yourself as a maintainer](#removing-yourself-as-a-maintainer)
|
||||
<!--toc:end-->
|
||||
|
||||
### Adding a new userstyle
|
||||
|
||||
[`userstyles.schema.json`](../scripts/userstyles.schema.json) is the schema
|
||||
specification for `userstyles.yml`. The properties in the following instructions are based
|
||||
on the schema. Please refer to it for clarification.
|
||||
|
||||
1. See [Adding yourself as a maintainer](#adding-yourself-as-a-maintainer).
|
||||
|
||||
2. Locate the `userstyles` section and add your port to the list, following the
|
||||
existing alphabetical order.
|
||||
|
||||
You should make changes to everything wrapped in `<>` and remove the `<>`
|
||||
characters. If you need help with any of the fields, refer to
|
||||
other ports in the `userstyles.yml` file. If you would like extra guidance,
|
||||
you can ask for help in the pull request or join our
|
||||
[Discord](https://discord.com/servers/catppuccin-907385605422448742).
|
||||
|
||||
`Required Fields:`
|
||||
|
||||
```yaml
|
||||
<port>:
|
||||
name: <name>
|
||||
# Up to 3 categories are allowed, and having at least one is required.
|
||||
# The first category is considered the "primary" category and impacts where the userstyle appears on the README.
|
||||
categories: [<primary-category>]
|
||||
color: <color>
|
||||
readme:
|
||||
app-link: <url>
|
||||
current-maintainers: [*<github-username>]
|
||||
```
|
||||
|
||||
`All Fields:`
|
||||
|
||||
These extra `usage` & `faq` keys will ensure that you can add important
|
||||
information about the port to the README.
|
||||
|
||||
The `icon` key is best explained the schema specification itself.
|
||||
|
||||
The `past-maintainers` key is a list of people who have maintained the port
|
||||
in the past. We encourage all maintainers to add/remove themselves from this
|
||||
list as they see fit.
|
||||
|
||||
Remember that these 5 fields are **optional**.
|
||||
|
||||
```yaml
|
||||
<port>:
|
||||
name: <name>
|
||||
categories: [<primary-category>, <optional-secondary-category>, <optional-third-category>]
|
||||
color: <color>
|
||||
icon: <icon> # OPTIONAL
|
||||
readme:
|
||||
app-link: "<url>"
|
||||
usage: |+ # OPTIONAL
|
||||
> [!NOTE]
|
||||
> <your notes>
|
||||
faq: # OPTIONAL
|
||||
- question: <question>
|
||||
answer: <answer>
|
||||
current-maintainers: [*<github-username>]
|
||||
past-maintainers: [*<github-username>] # OPTIONAL
|
||||
```
|
||||
|
||||
### Adding yourself as a maintainer
|
||||
|
||||
To add yourself as a maintainer, you need to add your GitHub username to the
|
||||
`collaborators` array in the `userstyles.yml` file. This file is located in the
|
||||
`scripts` directory. The `collaborators` array, is an array of objects, each
|
||||
object should contain a `name` and a `url` key. And optionally a `name` key,
|
||||
which is your preferred name.
|
||||
|
||||
```yaml
|
||||
collaborators:
|
||||
- &<github-username>
|
||||
name: <preferred-name> # OPTIONAL
|
||||
url: https://github.com/<github-username>
|
||||
```
|
||||
|
||||
Then you need to add your username to the `current-maintainers` array in for the
|
||||
userstyle you want to maintain, in this case `youtube`.
|
||||
|
||||
```yaml
|
||||
userstyles:
|
||||
youtube:
|
||||
name: YouTube
|
||||
categories: [entertainment, social_networking, photo_and_video]
|
||||
icon: youtube
|
||||
color: red
|
||||
readme:
|
||||
app-link: "https://youtube.com"
|
||||
current-maintainers: [*isabelroses, *your-username]
|
||||
past-maintainers: [*elkrien]
|
||||
```
|
||||
|
||||
If the change is accepted, you will receive an invitation to the `catppuccin` organization,
|
||||
and become a member of the [`userstyles-maintainers` team](https://github.com/orgs/catppuccin/teams/userstyles-maintainers).
|
||||
As a maintainer you will be expected to:
|
||||
- Review and merge PRs for the userstyle you maintain.
|
||||
- Keep the userstyle up to date with the latest changes. If you no longer wish to maintain a userstyle, see [Removing yourself as a maintainer](#removing-yourself-as-a-maintainer).
|
||||
- Follow our code of conduct and guidelines.
|
||||
|
||||
### Removing yourself as a maintainer
|
||||
|
||||
To remove yourself as a maintainer, you will need to move your username from the
|
||||
`current-maintainers` array to the `past-maintainers` array for each of the userstyles you no longer wish to maintain. In the example for YouTube below, the user `elkrien` has been moved from the `current-maintainers` array to the `past-maintainers` array.
|
||||
|
||||
```diff
|
||||
userstyles:
|
||||
youtube:
|
||||
name: YouTube
|
||||
categories: [entertainment, social_networking, photo_and_video]
|
||||
icon: youtube
|
||||
color: red
|
||||
readme:
|
||||
app-link: "https://youtube.com"
|
||||
- current-maintainers: [*isabelroses, *elkrien]
|
||||
- past-maintainers: []
|
||||
+ current-maintainers: [*isabelroses]
|
||||
+ past-maintainers: [*elkrien]
|
||||
|
||||
If you would not like to be listed as a past maintainer, you can remove yourself from
|
||||
`collaborators` array entirely. Upon removal, you will also be removed from the
|
||||
`userstyles-maintainers` team.
|
||||
Reference in new issue
Block a user