docs!: restructure documentation (#1445)

This commit is contained in:
uncenter authored and GitHub committed 2024-12-17 12:41:48 -05:00
1 parent edafec20ed
commit b2788a328b
22 files changed
+361 -372

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# Tips and Tricks
- [Convert images to WebP](./convert-images-to-webp.md)
- [Hide sensitive information from preview screenshots](./hide-sensitive-information-from-previews.md)
- [Inspect hard-to-grab elements](./inspect-hard-to-grab-elements.md)
- [See changes in real time (hot reloading)](./see-changes-in-real-time.md)
@@ -0,0 +1,20 @@
The Catppuccin project prefers to use the [WebP image format](https://en.wikipedia.org/wiki/WebP) for the asset preview images. We recommend using Google's [`cwebp`](https://developers.google.com/speed/webp/docs/cwebp) conversion utility to convert images to WebP.
## Installation
| 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/) |
| Binaries | See <https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html>. |
## Usage
> [!TIP]
> See [the full documentation on `cwebp`](https://developers.google.com/speed/webp/docs/cwebp) for further reference.
```
cwebp -lossless old-image.png -o new-image.webp
```
The command above is converting the input image `old-image.png` to the output file `new-image-webp`, with a lossless quality conversion.
@@ -0,0 +1,15 @@
When taking screenshots of userstyles, you may want to hide sensitive information (such as your username, email, etc.).
You can use the [Flow Circular](https://fonts.google.com/specimen/Flow+Circular) font to redact details by obscuring any text on the page.
Use this snippet at the top of your userstyle to import and use the font:
```less
@import url("https://fonts.googleapis.com/css2?family=Flow+Circular&display=swap");
* {
font-family: "Flow Circular", cursive;
}
```
Make sure to remove the snippet once you have taken the preview screenshots.
@@ -0,0 +1,11 @@
Paste the following snippet into your browser console, then trigger the event. Adjust the delay (in milliseconds) as needed.
```js
setTimeout(function () {
debugger;
}, 3000);
```
![](https://i0.wp.com/css-tricks.com/wp-content/uploads/2017/02/debugger.gif?ssl=1)
GIF via ["Set a Timed Debugger To Web Inspect Hard-To-Grab Elements" - CSS Tricks](https://css-tricks.com/set-timed-debugger-web-inspect-hard-grab-elements/).
@@ -0,0 +1 @@
See ["Initial installation and live reload" - Stylus Wiki](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#initial-installation-and-live-reload).