Skip to content

Commit bbb43c1

Browse files
committed
Refactor button styles in _components.css for improved light theme support
- Updated button variants to prevent fills on outlined and text buttons in light theme, enhancing contrast. - Introduced new outlined styles for success and info buttons, including hover effects for better user interaction. - Ensured consistent color usage across button states to improve accessibility and visual clarity.
1 parent bbd5115 commit bbb43c1

1 file changed

Lines changed: 34 additions & 6 deletions

File tree

frontend/src/styles/_components.css

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,27 +458,55 @@
458458
box-shadow: var(--shadow-sm);
459459
}
460460

461-
/* Button variants */
462-
.p-button.p-button-success {
461+
/* Button variants — do not apply fills to outlined/text (light-theme contrast). */
462+
.p-button.p-button-success:not(.p-button-outlined):not(.p-button-text) {
463463
background: var(--gradient-success);
464464
border: none;
465-
color: white;
465+
color: #fff;
466466
}
467467

468-
.p-button.p-button-success:hover {
468+
.p-button.p-button-success:not(.p-button-outlined):not(.p-button-text):hover {
469469
box-shadow: var(--shadow-md), var(--glow-success);
470470
}
471471

472-
.p-button.p-button-info {
472+
.p-button.p-button-info:not(.p-button-outlined):not(.p-button-text) {
473473
background: var(--gradient-primary);
474474
border: none;
475475
color: var(--bg-primary);
476476
}
477477

478-
.p-button.p-button-info:hover {
478+
.p-button.p-button-info:not(.p-button-outlined):not(.p-button-text):hover {
479479
box-shadow: var(--shadow-md), var(--glow-primary);
480480
}
481481

482+
[data-theme="light"] .p-button.p-button-info:not(.p-button-outlined):not(.p-button-text) {
483+
color: #fff;
484+
}
485+
486+
.p-button.p-button-success.p-button-outlined {
487+
background: transparent;
488+
border: 2px solid var(--status-success);
489+
color: var(--status-success);
490+
font-weight: 700;
491+
}
492+
493+
.p-button.p-button-success.p-button-outlined:hover {
494+
background: var(--status-success);
495+
color: #fff;
496+
}
497+
498+
.p-button.p-button-info.p-button-outlined {
499+
background: transparent;
500+
border: 2px solid var(--accent-cyan);
501+
color: var(--accent-cyan);
502+
font-weight: 700;
503+
}
504+
505+
.p-button.p-button-info.p-button-outlined:hover {
506+
background: var(--accent-cyan);
507+
color: #fff;
508+
}
509+
482510
.p-button.p-button-danger {
483511
background: var(--gradient-error);
484512
border: none;

0 commit comments

Comments
 (0)