docs: add sections on dev enviroment setup, auto-generated classes, draft PRs, less mixins, syntax highlighting, mention tips and tricks page (#866)
This commit is contained in:
1 parent
e329082642
commit
cea21f650a
6 files changed
+78
-17
No files matched your search
@@ -18,6 +18,7 @@
|
||||
- [`<img>` elements](#img-elements)
|
||||
- [How do I set a variable to RGB values?](#how-do-i-set-a-variable-to-rgb-values)
|
||||
- [How can I inspect hard-to-grab elements?](#how-can-i-inspect-hard-to-grab-elements)
|
||||
- [How do I theme code blocks / syntax highlighting?](#how-do-i-theme-code-blocks--syntax-highlighting)
|
||||
<!--toc:end-->
|
||||
|
||||
### How can I see my changes in real time?
|
||||
@@ -156,3 +157,50 @@ setTimeout(function () {
|
||||

|
||||
|
||||
<span>Gif via <a href="https://css-tricks.com/set-timed-debugger-web-inspect-hard-grab-elements/">"Set a Timed Debugger To Web Inspect Hard-To-Grab Elements" - CSS Tricks</a>.</span>
|
||||
|
||||
### How do I theme code blocks / syntax highlighting?
|
||||
|
||||
If a website uses [highlight.js](https://highlightjs.org/) or [Pygments](https://pygments.org/) for syntax highlighting, add the corresponding line from below beneath the `@-moz-document` line to import our existing port.
|
||||
|
||||
**highlight.js**:
|
||||
|
||||
```css
|
||||
@import url("https://unpkg.com/@catppuccin/[email protected]/css/catppuccin.variables.css");
|
||||
```
|
||||
|
||||
**Pygments**:
|
||||
|
||||
```css
|
||||
@import url("https://python.catppuccin.com/pygments/catppuccin-variables.important.css");
|
||||
```
|
||||
|
||||
You'll also need to add the following lines beneath the color definition section (`@<color>: @catppuccin[@@lookup][@<color>];`) in the `#catppuccin` mixin:
|
||||
|
||||
```css
|
||||
--ctp-rosewater: @rosewater;
|
||||
--ctp-flamingo: @flamingo;
|
||||
--ctp-pink: @pink;
|
||||
--ctp-mauve: @mauve;
|
||||
--ctp-red: @red;
|
||||
--ctp-maroon: @maroon;
|
||||
--ctp-peach: @peach;
|
||||
--ctp-yellow: @yellow;
|
||||
--ctp-green: @green;
|
||||
--ctp-teal: @teal;
|
||||
--ctp-sky: @sky;
|
||||
--ctp-sapphire: @sapphire;
|
||||
--ctp-blue: @blue;
|
||||
--ctp-lavender: @lavender;
|
||||
--ctp-text: @text;
|
||||
--ctp-subtext1: @subtext1;
|
||||
--ctp-subtext0: @subtext0;
|
||||
--ctp-overlay2: @overlay2;
|
||||
--ctp-overlay1: @overlay1;
|
||||
--ctp-overlay0: @overlay0;
|
||||
--ctp-surface2: @surface2;
|
||||
--ctp-surface1: @surface1;
|
||||
--ctp-surface0: @surface0;
|
||||
--ctp-base: @base;
|
||||
--ctp-mantle: @mantle;
|
||||
--ctp-crust: @crust;
|
||||
```
|
||||
Reference in new issue
Block a user