165 lines
4.7 KiB
CSS
165 lines
4.7 KiB
CSS
/*
|
|
Copyright 2019 Adobe. All rights reserved.
|
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
governing permissions and limitations under the License.
|
|
*/
|
|
|
|
.spectrum-ActionGroup {
|
|
--spectrum-actiongroup-button-gap-reset: 0;
|
|
--spectrum-actiongroup-quiet-compact-button-gap: var(
|
|
--spectrum-global-dimension-size-25
|
|
);
|
|
}
|
|
|
|
.spectrum-ActionGroup {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
|
|
.spectrum-ActionGroup-item {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
&:not(.spectrum-ActionGroup--vertical)&:not(.spectrum-ActionGroup--compact) {
|
|
margin-block-start: calc(-1 * var(--spectrum-actiongroup-button-gap-y));
|
|
|
|
.spectrum-ActionGroup-item {
|
|
flex-shrink: 0;
|
|
margin-block-start: var(--spectrum-actiongroup-button-gap-y);
|
|
|
|
&:not(:last-child) {
|
|
margin-inline-end: var(--spectrum-actiongroup-button-gap-x);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.spectrum-ActionGroup--vertical {
|
|
display: inline-flex;
|
|
flex-direction: column;
|
|
|
|
.spectrum-ActionGroup-item + .spectrum-ActionGroup-item {
|
|
margin-block-start: var(--spectrum-actiongroup-button-gap-y);
|
|
margin-inline-start: var(--spectrum-actiongroup-button-gap-reset);
|
|
}
|
|
|
|
&.spectrum-ActionGroup--vertical {
|
|
margin-block-start: var(--spectrum-actiongroup-button-gap-y);
|
|
margin-inline-start: var(--spectrum-actiongroup-button-gap-reset);
|
|
}
|
|
}
|
|
|
|
.spectrum-ActionGroup--compact {
|
|
&.spectrum-ActionGroup--quiet {
|
|
.spectrum-ActionGroup-item + .spectrum-ActionGroup-item {
|
|
margin-inline-start: var(--spectrum-actiongroup-quiet-compact-button-gap);
|
|
margin-block-start: var(--spectrum-actiongroup-button-gap-reset);
|
|
}
|
|
|
|
&.spectrum-ActionGroup--vertical {
|
|
.spectrum-ActionGroup-item + .spectrum-ActionGroup-item {
|
|
margin-inline-start: var(--spectrum-actiongroup-button-gap-reset);
|
|
margin-block-start: var(
|
|
--spectrum-actiongroup-quiet-compact-button-gap
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
&:not(.spectrum-ActionGroup--quiet) {
|
|
flex-wrap: nowrap;
|
|
|
|
.spectrum-ActionGroup-item {
|
|
position: relative;
|
|
border-radius: 0;
|
|
z-index: 0;
|
|
|
|
&:first-child {
|
|
border-start-start-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-end-start-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
margin-inline-end: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
}
|
|
|
|
&:last-child {
|
|
border-start-end-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-end-end-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
margin-inline-start: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
margin-inline-end: 0;
|
|
}
|
|
|
|
&.is-selected {
|
|
z-index: 1;
|
|
}
|
|
|
|
&:hover {
|
|
z-index: 2;
|
|
}
|
|
|
|
/* Appear above hovered and selected borders */
|
|
&:focus-ring {
|
|
z-index: 3;
|
|
}
|
|
|
|
& + .spectrum-ActionGroup-item {
|
|
margin-inline-start: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
margin-inline-end: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
}
|
|
|
|
.spectrum-ActionButton-label {
|
|
inline-size: auto;
|
|
}
|
|
}
|
|
|
|
&.spectrum-ActionGroup--vertical {
|
|
.spectrum-ActionGroup-item {
|
|
border-radius: 0;
|
|
|
|
& + .spectrum-ActionGroup-item {
|
|
margin-block-start: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
margin-block-end: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
}
|
|
|
|
&:first-child {
|
|
border-start-start-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-start-end-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-radius: 0;
|
|
margin-block-end: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
}
|
|
|
|
&:last-child {
|
|
border-end-start-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-end-end-radius: var(--spectrum-actionbutton-m-border-radius);
|
|
border-radius: 0;
|
|
margin-block-start: calc(
|
|
-1 * var(--spectrum-actionbutton-m-border-size) / 2
|
|
);
|
|
margin-block-end: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.spectrum-ActionGroup--justified .spectrum-ActionGroup-item {
|
|
flex: 1;
|
|
}
|