Skip to content

Commit 963d6d3

Browse files
docs: explain how you can use tailwind for Components
See the previous commit.
1 parent 25ed17b commit 963d6d3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/plugins/component.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,13 @@ Now that you've added your own `Component` plugin you can simply use it using it
3434

3535
## Overriding existing Components
3636

37-
Since plugins load after the original `Component`s load you can override existing `Component` names. This is intentional, in case an existing `Component` by that name does not suit your needs, however I do recommend adding it under a different name instead.
37+
Since plugins load after the original `Component`s load you can override existing `Component` names. This is intentional, in case an existing `Component` by that name does not suit your needs, however I do recommend adding it under a different name instead, however you got the option.
38+
39+
## Styling
40+
41+
Most of the lines of any `Component` plugin will most likely be the HTML output when rendering. That's why to make it as convenient to write your own components as possible I've added [tailwind](https://tailwindcss.com/) to the mix. You can use [tailwind](https://tailwindcss.com/) to define the looks of your component and the classes will be created for you dynamically later at runtime.
42+
43+
There are a couple alterations to it though:
44+
45+
1. all spacing has been overwritten to use `--unit`, which is a variable computed how large the current presentation window is. This is required because otherwise things would not stretch appropriately as the window scales
46+
2. you can only use the following colors: `foreground`, `background`, `primary`, and `secondary` as those are the only user definable colors. Using custom colors is discouraged but allowed using tailwinds custom classes.

0 commit comments

Comments
 (0)