mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
refactor(buttons): button-native without prefix
Now we don't need prefix because of shadow-dom
This commit is contained in:
@ -40,23 +40,23 @@
|
||||
font-kerning: none;
|
||||
}
|
||||
|
||||
:host(:first-of-type) .segment-button-native {
|
||||
:host(:first-of-type) .button-native {
|
||||
--padding-end: 0;
|
||||
|
||||
@include border-radius(var(--border-radius), 0, 0, var(--border-radius));
|
||||
}
|
||||
|
||||
:host(:not(:first-of-type)) .segment-button-native {
|
||||
:host(:not(:first-of-type)) .button-native {
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
:host(:last-of-type) .segment-button-native {
|
||||
:host(:last-of-type) .button-native {
|
||||
--padding-start: 0;
|
||||
|
||||
@include border-radius(0, var(--border-radius), var(--border-radius), 0);
|
||||
}
|
||||
|
||||
.segment-button-native {
|
||||
.button-native {
|
||||
@include text-inherit();
|
||||
@include margin(var(--margin-top), var(--margin-end), var(--margin-bottom), var(--margin-start));
|
||||
@include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
|
||||
@ -73,16 +73,13 @@
|
||||
border-style: var(--border-style);
|
||||
border-color: var(--btn-border-color);
|
||||
|
||||
outline: none;
|
||||
|
||||
background: var(--btn-background);
|
||||
|
||||
contain: content;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
|
||||
&:active,
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
::slotted(ion-icon) {
|
||||
|
@ -71,7 +71,7 @@ export class SegmentButton implements ComponentInterface {
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={this.checked ? 'true' : null}
|
||||
class="segment-button-native"
|
||||
class="button-native"
|
||||
disabled={this.disabled}
|
||||
onClick={() => this.checked = true}
|
||||
>
|
||||
|
Reference in New Issue
Block a user