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

Help (or documentation) for width, direction, override needed #12

Closed
merlinuwe opened this issue Jun 29, 2024 · 4 comments
Closed

Help (or documentation) for width, direction, override needed #12

merlinuwe opened this issue Jun 29, 2024 · 4 comments

Comments

@merlinuwe
Copy link

Thanks for your great plugin which gives impressive results.

I tested it on Windows 10. Some of the following examples are unchecked, because I don't know how to use them. Can you help me, please?


- [x] `{"height": "40"}`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"height": "40"}
```

- [ ] `{"width": "50"}`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"width": "50"}
```

- [x] `{"direction": "column"}` default

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"direction": "column"}
```

- [ ] `{"direction": "column", "width": "50"}`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"direction": "column", "width": "50"}
```

- [x] `{"direction": "row"}` (default)

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"direction": "row"}
```

- [x] `{"hover": true}` (default)

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"hover": true}
```

- [x] `{"hover": false}`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"hover": false}
```

- [x] `{"gradient": false}` (default)

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"gradient": false}
```

- [x] `{"gradient": true}`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"gradient": true}
```

- [ ] `{"override": true` 

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"override": true, "aliases": ["yellow", "orange", "red", "dark pink", "dark red violet"]}
```

- [x] `"aliases": ["yellow", "orange", "red", "dark pink", "dark red violet"]`

```palette
#FFC300, #FF5733, #C70039, #900C3F, #581845
{"aliases": ["yellow", "orange", "red", "dark pink", "dark red violet"]}
```

(Of course, you can take these examples for the documentations.)

@ALegendsTale
Copy link
Owner

Hello, thank you for creating this issue.

It would appear that the two unchecked palette examples with width are not functioning correctly in my own testing. Thank you for bringing this to my attention.

As for the unchecked palette with override, this setting is for overriding the color-validation system so that other things may be used (css variables for example). I will plan on updating the documentation to include these details.

@ALegendsTale
Copy link
Owner

Hello again, there is now better documentation. I have also fixed the issue with width not applying to regular palettes.

If there is anything missing from the documentation, feel free to let me know or submit a pull request. Thanks!

@merlinuwe
Copy link
Author

Thank you very much.

One question: How does "override" work?

image

I get the message "Colors are defined incorrectly" when I switch true <-> false.

Could you please provide an example that works in Obsidian? Perhaps with an example from here: https://docs.obsidian.md/Reference/CSS+variables/Foundations/Colors which can't be overlooked.

@ALegendsTale
Copy link
Owner

Yes that's a great idea. I used --ctp-peach as an example, but that was silly as it is theme specific. I have updated the override docs with a couple examples.

Here is one example which was added to the docs. It uses a variable Obsidian itself has defined.

```palette
var(--color-orange)
{ "override": true }
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants