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

YAML Highlight - Custom color for specific entries #1393

Closed
juicybox opened this issue Apr 15, 2023 · 4 comments
Closed

YAML Highlight - Custom color for specific entries #1393

juicybox opened this issue Apr 15, 2023 · 4 comments

Comments

@juicybox
Copy link

juicybox commented Apr 15, 2023

Usually you highlight important things in your YAML diagram, but sometimes it is also useful to show a highlighted alternative or optional values with a different color.

A possible solution might be a color option like: → '#color', '#red', '#E3E3E3'

@startyaml

#highlight "color"
#highlight "size" #red

fruit: Apple
size: Large
color: 
  - Red
  - Green
@endyaml
@The-Lum
Copy link
Collaborator

The-Lum commented Apr 16, 2023

Hi J., and a ll,

Yes, you can do that with style, as:

Enjoy,
Regard.

@The-Lum
Copy link
Collaborator

The-Lum commented Apr 16, 2023

Here is an example:

@startyaml
<style>
    .h1 {
      BackGroundColor green
      FontColor white
      FontStyle italic
    }
    .h2 {
      BackGroundColor red
      FontColor white
      FontStyle bold
    }
</style>
#highlight "color" <<h1>>
#highlight "size" <<h2>>

fruit: Apple
size: Large
color: 
  - Red
  - Green
@endyaml

Enjoy,
Regards.

@juicybox
Copy link
Author

@The-Lum This is great, thank you for this tip!

@The-Lum The-Lum removed the triage label Apr 21, 2023
@The-Lum
Copy link
Collaborator

The-Lum commented Apr 21, 2023

Hi @juicybox, and all,

Thanks,
We updated also the doc. here:

So we can now close this issue.
Regards.

@The-Lum The-Lum closed this as completed Apr 21, 2023
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