Skip to content

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

Open
3noix wants to merge 1 commit into
Gruntfuggly:masterfrom
3noix:use-border
Open

Support border color, width and style in default and custom highlights#838
3noix wants to merge 1 commit into
Gruntfuggly:masterfrom
3noix:use-border

Conversation

@3noix

@3noix 3noix commented Apr 13, 2024

Copy link
Copy Markdown

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

3noix commented Apr 13, 2024

Copy link
Copy Markdown
Author

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