Skip to content

Commit

Permalink
fix(checkbox, radio): update border colors to match MD2 spec (#27357)
Browse files Browse the repository at this point in the history
Issue number: resolves #27170

---------

Updates the Material Design border colors for checkbox and radio to
`rgb($text-color-rgb, 0.60)` or `#666666`. This is based on the
[Material Design 2
kit](https://www.figma.com/community/file/778763161265841481/Material-2-Design-Kit).

The border color when disabled is also wrong, but changing this affects
the label so I have reverted this to do as part of FW-4037.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: ionitron <[email protected]>
Co-authored-by: Liam DeBeasi <[email protected]>
  • Loading branch information
3 people authored May 11, 2023
1 parent 7c7fb2b commit eabc6f3
Show file tree
Hide file tree
Showing 54 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/src/components/checkbox/checkbox.md.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $checkbox-md-icon-border-style: solid !default;
$checkbox-md-icon-border-radius: 2px !default;

/// @prop - Border color of the checkbox icon when off
$checkbox-md-icon-border-color-off: rgba($text-color-rgb, .51) !default;
$checkbox-md-icon-border-color-off: rgb($text-color-rgb, 0.60) !default;

/// @prop - Border color of the checkbox icon when on
$checkbox-md-icon-border-color-on: ion-color(primary, base) !default;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion core/src/components/radio/radio.md.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $radio-md-color-on: current-color(base) !default;
$radio-md-background-color-focused: ion-color(primary, tint) !default;

/// @prop - Color of the unchecked radio
$radio-md-color-off: $text-color-step-600 !default;
$radio-md-color-off: rgb($text-color-rgb, 0.60) !default;

/// @prop - Width of the radio icon
$radio-md-icon-width: 20px !default;
Expand Down
26 changes: 21 additions & 5 deletions core/src/components/radio/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>

<style>
ion-radio {
display: block;
margin-bottom: 8px;
}
</style>
</head>

<body>
Expand All @@ -23,11 +30,20 @@
</ion-header>

<ion-content class="ion-padding">
<ion-radio
>Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications
Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable
Notifications</ion-radio
>
<div id="radios">
<ion-radio-group>
<ion-radio value="radio" justify="start" label-placement="end">Unchecked</ion-radio>
</ion-radio-group>
<ion-radio-group value="radio">
<ion-radio value="radio" justify="start" label-placement="end">Checked</ion-radio>
</ion-radio-group>
<ion-radio-group>
<ion-radio value="radio" justify="start" label-placement="end" disabled>Disabled</ion-radio>
</ion-radio-group>
<ion-radio-group value="radio">
<ion-radio value="radio" justify="start" label-placement="end" disabled>Disabled, Checked</ion-radio>
</ion-radio-group>
</div>
</ion-content>
</ion-app>
</body>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eabc6f3

Please sign in to comment.