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

Checkbox consistency detailed design PR #35

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added active/checkboxes/Images/Anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/checkboxes/Images/BaseDesign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions active/checkboxes/checkbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Checkbox detailed design spec / redline
This spec lists out all the details of checkbox design that should be updated as part of [#839](https://github.com/microsoft/microsoft-ui-xaml/issues/839). Depending on schedule and other unforseen circumstances, not all could be implemented so this does not represent a final plan yet.

## The anatomy of checkbox
![anatomy](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/checkboxes/active/checkboxes/Images/Anatomy.png)
### Basic checkbox UI elements
Checkbox has the following UI elements that determines visuals:
1. The box fill
2. The box border
3. The glyph
4. The indeterminate marker
5. Text

### Checkbox colors
Following colors are used to denote the state of the checkbox:
1. Fill color of the box
2. Color of the border
3. Foreground color of the glyph
4. The fill color
chigy marked this conversation as resolved.
Show resolved Hide resolved
5. Foreground color for the text

### Basic checkbox styles
Checkbox has mainly 3 styles:
1. Outline unselected
2. Fill selected
3. Fill unselected

![styles](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/checkboxes/active/checkboxes/Images/BaseDesign.png)

Visually, fill style is little more visible and highlights the controls better than the Outline style.

For Windows, we default to using Outline style for Unselected and Fill style for Selected with exception of GridView.
GridView is often used on top of colored tile or images and default Fill visual is being used to make the checkbox more visible at unselected state.

For details on which control use what style, refer to later section.

## Default design specification
### UI element sizes

| UI element | Size |
| :---------- | :------- |
| The box border | 1px border (if we implement [#835](https://github.com/microsoft/microsoft-ui-xaml/issues/835). Otherwise 2px). Rounded corner following [#524](https://github.com/microsoft/microsoft-ui-xaml/issues/524) design.|
| The glyph | 16px |
| The indeterminate marker | 8x8px |
| Text | 14px (standard text size) |

### Light Theme Color values

| State | 1. Outline unseledted | 2. Fill selected | 3. Fill unselected |
| :---------- | :------- | :------- | :------- |
| Rest | #000000 80% (no change) | SystemAccentColor | #E6E6E6 100% (no change) |
| Hover | #000000 60% (this might be wrong if we implement [#953](https://github.com/microsoft/microsoft-ui-xaml/issues/953)) | #E6E6E6 100% (no change)| SystemAccentColorDark1 (if we implement [#953](https://github.com/microsoft/microsoft-ui-xaml/issues/953)) | #E6E6E6 100% (no change) |
| Pressed | #000000 100% (this might be wrong if we implement [#953](https://github.com/microsoft/microsoft-ui-xaml/issues/953))| SystemAccentColorLight1 (if we implement [#953](https://github.com/microsoft/microsoft-ui-xaml/issues/953)) | #E6E6E6 100% (no change) | #E6E6E6 100% (no change) |
| Disabled | #000000 40% (no change) | #000000 20% | #E6E6E6 100% (no change) |

### Dark Theme Color values

Still waiting for detail

## Checkbox styles
As mentioned earlier, Checkbox has Outine and Fill styles. Following shows which control use what style by default.

| Control | Unseledted | Selected |
| :---------- | :------- | :------- |
| CheckBox | Outline | Fill |
| ListItem | Outline | Fill |
| TreeView | Outline | Fill |
| GridView | Fill | Fill |
| RadioButton* | Outline | Fill |

*Even though RadioButton is not a checkbox, it needs to be following the system pattern to be coherent.