Skip to content

Commit 280b35c

Browse files
committed
fix(button): increase specificity
1 parent 889a434 commit 280b35c

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

demo/components/DemoTooltips.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
height="28rem"
320320
tooltipProps={{ ...options, openOnFocus: false, openOnHover: false }}
321321
>
322-
<NeoButton ghost rounded={options.rounded} bind:checked={open} toggle hover={options.elevation} active="-1" pressed>
322+
<NeoButton container rounded={options.rounded} bind:checked={open} toggle hover={options.elevation} active="-1" pressed>
323323
<NeoTransitionContainer overflow="hidden" style="min-width: 252px; margin: 0.5rem">
324324
{#key complexSelected?.item?.id}
325325
<div

src/lib/buttons/NeoButton.svelte

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -353,30 +353,6 @@
353353
}
354354
}
355355
356-
&.neo-container {
357-
display: flex;
358-
justify-content: unset;
359-
margin: var(--neo-btn-margin, 0);
360-
padding: var(--neo-btn-padding, 0);
361-
362-
.neo-content {
363-
justify-content: unset;
364-
text-align: start;
365-
}
366-
367-
&:focus-visible,
368-
&:hover {
369-
transition:
370-
opacity 0.3s ease,
371-
color 0.15s ease,
372-
background-color 0.3s ease,
373-
border-color 0.3s ease,
374-
backdrop-filter 0.3s ease,
375-
border-radius 0.3s ease,
376-
box-shadow 0.15s ease-out;
377-
}
378-
}
379-
380356
&:focus-visible {
381357
outline: var(--neo-border-width, 1px) solid var(--neo-border-color-focused);
382358
outline-offset: var(--neo-outline-offset-width, -1px);
@@ -493,6 +469,35 @@
493469
background-color: var(--neo-btn-bg-color, var(--neo-background-color-tinted));
494470
}
495471
472+
&.neo-rounded {
473+
padding: var(--neo-btn-padding, 0.3125rem 0.75rem);
474+
border-radius: var(--neo-btn-border-radius-rounded, var(--neo-border-radius-lg));
475+
}
476+
477+
&.neo-container {
478+
display: flex;
479+
justify-content: unset;
480+
margin: var(--neo-btn-margin, 0);
481+
padding: var(--neo-btn-padding, 0);
482+
483+
.neo-content.neo-content {
484+
justify-content: unset;
485+
text-align: start;
486+
}
487+
488+
&:focus-visible,
489+
&:hover {
490+
transition:
491+
opacity 0.3s ease,
492+
color 0.15s ease,
493+
background-color 0.3s ease,
494+
border-color 0.3s ease,
495+
backdrop-filter 0.3s ease,
496+
border-radius 0.3s ease,
497+
box-shadow 0.15s ease-out;
498+
}
499+
}
500+
496501
&:disabled,
497502
&[disabled]:not([disabled='false']) {
498503
cursor: not-allowed;
@@ -516,11 +521,6 @@
516521
@include mixin.skeleton;
517522
}
518523
519-
&.neo-rounded {
520-
padding: var(--neo-btn-padding, 0.3125rem 0.75rem);
521-
border-radius: var(--neo-btn-border-radius-rounded, var(--neo-border-radius-lg));
522-
}
523-
524524
&.neo-empty {
525525
padding: var(--neo-btn-padding-empty, 0.5rem);
526526

0 commit comments

Comments
 (0)