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

Support border color, width and style in default and custom highlights #838

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

3noix
Copy link

@3noix 3noix commented Apr 13, 2024

This PR resolves #582 by adding support of:

  • border color
  • border width
  • border style
    for default and custom highlights.

I treated the border color similarly to foreground and background colors:

Default values:

  • border color: the background color
  • border width: 0
  • border style: solid

Here is the result of a test:
test

With these settings in todo-tree.highlights.customHighlight and no foreground and background set in todo-tree.highlights.defaultHighlight:
settings1

@3noix
Copy link
Author

3noix commented Apr 13, 2024

I had a problem with the VSCode API: I only wanted to add a horizontal line above my comment, without applying a background or a foreground change, and I had a foreground in the todo-tree.highlights.defaultHighlight... and in this case it is impossible to reference the color of comments of the theme:

  • editor.tokenColorCustomizations.comments:
    • shows a warning when settings.json is saved (because invalid)
    • same result as if "editor.foreground" was used
  • editor.foreground:
    • no warning
    • not the color of comments
  • hard coded hex value: works obviouslybut will not change with the theme
  • null:
    • shows a warning when settings.json is saved (because invalid)
    • has the expected effect

And this is some weird behavior that 2 different invalid values (as said by the warning) have different results.

settings

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

Successfully merging this pull request may close these issues.

Add control on border attribute
1 participant