Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 14 additions & 1 deletion core/src/components/checkbox/checkbox.ionic.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
@import "./checkbox";
@import "./checkbox.ionic.vars";

// Ionic Checkbox
// --------------------------------------------------
// --------------------------------------------------

:host {
// Border
--border-radius: #{$checkbox-ionic-border-radius};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed internally with Liam & Brandy. You will notice the naming convention here is different than iOS/MD. We've decided to remove the -icon from the name. It didn't make sense.

We left iOS/MD alone, this only applies to the ionic theme.

--border-width: #{$checkbox-ionic-border-width};
--border-style: #{$checkbox-ionic-border-style};
--border-color: #{$checkbox-ionic-background-color-off};
--checkmark-width: 3;

// Size
--size: #{$checkbox-ionic-size};
}
21 changes: 20 additions & 1 deletion core/src/components/checkbox/checkbox.ionic.vars.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
@import "../../themes/ionic.globals.ionic";

// Ionic Checkbox Variables
// --------------------------------------------------
// --------------------------------------------------

/// @prop - The default width and height of the checkbox
$checkbox-ionic-size: 24px !default;

/// @prop - The background color of the checkbox when the checkbox is unchecked
$checkbox-ionic-background-color-off: $background-color-step-400 !default;

/// @prop - Border style of the checkbox
$checkbox-ionic-border-style: solid !default;

/// @prop - Border width of the checkbox
$checkbox-ionic-border-width: 1px !default;

/// @prop - The border radius of the checkbox
/// With a default size of 24px, the border radius is calculated as 24px / 4 - 2px = 4px
/// With a small size of 16px, the border radius is calculated as 16px / 4 - 2px = 2px;
$checkbox-ionic-border-radius: calc(var(--size) / 4 - 2px) !default;
2 changes: 1 addition & 1 deletion core/src/components/checkbox/test/basic/checkbox.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs().forEach(({ title, screenshot, config }) => {
configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('checkbox: basic visual tests'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.setContent(
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.
2 changes: 2 additions & 0 deletions core/src/themes/ionic.globals.ionic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Core Globals
@import "./ionic.globals";