Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
46 changes: 31 additions & 15 deletions core/src/components/button/button.ionic.scss
Copy link
Contributor

@thetaPC thetaPC Nov 4, 2025

Choose a reason for hiding this comment

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

As I mentioned in this comment, we don't use var() because the tokens are set up to not need var. Please remove them again.

Also checks are failing, please fix them.

Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
// --------------------------------------------------

:host(.button-solid) {
--background-activated: #{globals.ion-color(primary, shade)};
--background-hover: #{globals.ion-color(primary, shade)};
--background-activated: #{globals.$ion-bg-primary-base-press};
--background-hover: #{globals.$ion-bg-primary-base-press};
--background-focused: transparent;
--background-hover-opacity: 1;
--background: #{globals.ion-color(primary, base)};
Expand All @@ -53,45 +53,61 @@
--ripple-color: var(--background-activated);
}

:host(.button-solid.ion-color) {
--background-activated: #{globals.current-color(shade)};
--background-hover: #{globals.current-color(shade)};
--background: #{globals.current-color(base)};
--color: #{globals.current-color(contrast)};
}

// Outline Button
// --------------------------------------------------

:host(.button-outline) {
--border-width: #{globals.$ion-border-size-025};
--border-style: #{globals.$ion-border-style-solid};
--background-activated: #{globals.$ion-bg-neutral-subtlest-press};
--background-activated: #{globals.$ion-bg-primary-subtle-press};
--background-focused: transparent;
--background-hover: #{globals.$ion-bg-neutral-subtlest-press};
--background-hover: #{globals.$ion-bg-primary-subtle-press};
--background-hover-opacity: 1;
--border-color: #{globals.ion-color(primary, base)};
--color: #{globals.ion-color(primary, base)};
--ripple-opacity: var(--background-activated-opacity, 1);
--ripple-color: var(--background-activated);
}

:host(.button-outline.ion-color) {
--background-activated: #{globals.current-color(shade, $subtle: true)};
--background-hover: #{globals.current-color(shade, $subtle: true)};
--border-color: #{globals.current-color(base)};
--color: #{globals.current-color(base)};
}

// Warning Outline Button - use foreground color for text and border
:host(.button-outline.ion-color-warning) .button-native {
--ion-color-base: #{globals.ion-color(warning, foreground)};
}

// Clear Button
// --------------------------------------------------

:host(.button-clear) {
--background-activated: #{globals.$ion-bg-neutral-subtlest-press};
--background-activated: #{globals.$ion-bg-primary-subtle-press};
--background-focused: transparent;
--background-hover: #{globals.$ion-bg-neutral-subtlest-press};
--background-hover: #{globals.$ion-bg-primary-subtle-press};
--background-hover-opacity: 1;
--color: #{globals.ion-color(primary, foreground)};
--ripple-opacity: var(--background-activated-opacity, 1);
--ripple-color: var(--background-activated);
}

// Ripple Effect
// -------------------------------------------------------------------------------
:host(.button-clear.ion-color) {
--background-activated: #{globals.current-color(shade, $subtle: true)};
--background-hover: #{globals.current-color(shade, $subtle: true)};

:host(.button-solid.ion-color) ion-ripple-effect {
color: globals.current-color(shade);
}

:host(.button-outline.ion-color) ion-ripple-effect,
:host(.button-clear.ion-color) ion-ripple-effect {
color: globals.$ion-primitives-neutral-200;
.button-native {
--ion-color-base: #{globals.current-color(foreground)};
}
}

// Button Sizes
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.
3 changes: 2 additions & 1 deletion core/src/components/button/test/theme-ionic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ <h4>Preview options</h4>
<ion-select-option value="primary">Primary</ion-select-option>
<ion-select-option value="success">Success</ion-select-option>
<ion-select-option value="warning">Warning</ion-select-option>
<ion-select-option value="neutral">Neutral</ion-select-option>
<ion-select-option value="medium">Medium</ion-select-option>
<ion-select-option value="danger">Danger</ion-select-option>
</ion-select>
</p>

Expand Down
Loading