Skip to content

Commit

Permalink
main: Flesh out more defined behavior for a myriad of cases
Browse files Browse the repository at this point in the history
  • Loading branch information
solomonkinard committed Apr 24, 2024
1 parent e3f3c28 commit 6e6af62
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions proposals/dark_mode_extension_icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,21 @@ N/A.

### Manifest File Changes

1. If icon_variants are supplied, icons can be ignored.
1. If icon_variants contain an icon object with duplicate conditions, the first
1. Any icon object that does not contain a "color_scheme" key will apply to all
available options, e.g. both "light" and "dark".

1. If icon_variants contain an icon object with matching conditions, the first
match will be used.
1. Any icon object that does not contain a "color_scheme" key will apply to both
light and dark.
* "\<size\>" will be used used instead of "any" in case in case there are
matching conditions.
* If there is more than one matching icon object, any without `color_scheme` will be applied to every possible color scheme. Therefore, a subsequent matching icon object with a color_scheme will not be used.
* Non-exact size matches will return an icon nearest the requested size, or the smallest in case of a tie.
* Incorrectly typed `color-scheme`'s in manifest.json lead to undefined
behavior.
* If e.g. only one icon object is defined with a specific color scheme, that
icon object will be applied to all color schemes. It will be treated as the
default.

1. If only one icon object is supplied, it will be used for both light and dark.
1. icon_variants will not cause an error in the event that it is invalid
Instead, only the fauly icon object(s) will be ignored, with an optional
Expand Down

0 comments on commit 6e6af62

Please sign in to comment.