mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Unify segmented controls on a shared module with grey selection
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Shared look for every SegmentedControl. The control's appearance is owned here
|
||||
* — once — so the Draft/Published and fit-mode instances can't drift apart again.
|
||||
* Selected option uses --layer-02 (a neutral high-contrast fill, per Carbon's
|
||||
* content switcher); --accent stays reserved for primary actions (e.g. Publish),
|
||||
* so "current selection" never reads as "the action to take". Call sites may still
|
||||
* pass className/optionClassName/activeClassName for layout-specific additions.
|
||||
*/
|
||||
.group {
|
||||
display: inline-flex;
|
||||
border: var(--border-width) solid var(--border-strong);
|
||||
}
|
||||
|
||||
.option {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: var(--bg);
|
||||
color: var(--text-secondary);
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
padding: var(--space-2) var(--space-3);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background var(--dur-fast) var(--ease),
|
||||
color var(--dur-fast) var(--ease);
|
||||
}
|
||||
|
||||
.option + .option {
|
||||
border-left: var(--border-width) solid var(--border-strong);
|
||||
}
|
||||
|
||||
.option:hover {
|
||||
background: var(--layer-01);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.active,
|
||||
.active:hover {
|
||||
background: var(--layer-02);
|
||||
color: var(--text);
|
||||
}
|
||||
Reference in New Issue
Block a user