Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add tips and tricks page #543

Merged
merged 20 commits into from
Feb 27, 2024
Merged
Changes from 2 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
33 changes: 33 additions & 0 deletions docs/tips-and-tricks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<p align="center">
<h2 align="center">📖 Tips and Tricks for writing a userstyle</h2>
isabelroses marked this conversation as resolved.
Show resolved Hide resolved
</p>

&nbsp;

### Live reloading

If you want to see your changes in real-time and not have to use the stylus editor. This is the tip for you.
isabelroses marked this conversation as resolved.
Show resolved Hide resolved

1. Head to `chrome://extensions/` or your browser's equivalent.
uncenter marked this conversation as resolved.
Show resolved Hide resolved
2. Locate the stylus extension and click on the `Details` button.
isabelroses marked this conversation as resolved.
Show resolved Hide resolved
3. Enable `Allow access to file URLs`.
4. Now you can open the `catppuccin.user.css` file in your browser by typing `file:///path/to/catppuccin.user.css` in the address bar.
5. Then you should notice stylus will load on that page, at this point ensure `live preview` is enabled.
isabelroses marked this conversation as resolved.
Show resolved Hide resolved
6. Now you can make changes in your preferred editor and see real-time changes.


### Hideing sensitive information in screenshots
isabelroses marked this conversation as resolved.
Show resolved Hide resolved

When taking screenshots of your userstyle, you may want to hide sensitive information such as your username, email, or any other personal information.

To do this we use the [flow circular font](https://fonts.google.com/specimen/Flow+Circular).
isabelroses marked this conversation as resolved.
Show resolved Hide resolved

We achieve this by placing the following snippet at the top of your userstyle, this will change the fonts to use flow circular.

```less
@import url('https://fonts.googleapis.com/css2?family=Flow+Circular&display=swap');

* {
font-family: 'Flow Circular', cursive;
}
```
Loading