budibase/packages/standard-components/node_modules/@spectrum-css/statuslight/index.css

101 lines
3.1 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.
*/
@import "../vars/css/components/spectrum-statuslight.css";
.spectrum-StatusLight--sizeS {
@remapvars {
find: /--spectrum-statuslight-(.*?)-s-/;
replace: --spectrum-statuslight-$1-;
}
}
.spectrum-StatusLight--sizeM {
@remapvars {
find: /--spectrum-statuslight-(.*?)-m-/;
replace: --spectrum-statuslight-$1-;
}
}
.spectrum-StatusLight--sizeL {
@remapvars {
find: /--spectrum-statuslight-(.*?)-l-/;
replace: --spectrum-statuslight-$1-;
}
}
.spectrum-StatusLight--sizeXL {
@remapvars {
find: /--spectrum-statuslight-(.*?)-xl-/;
replace: --spectrum-statuslight-$1-;
}
}
.spectrum-StatusLight {
/* Hardcoded for wrapping study.
Will be a DNA token in https://jira.corp.adobe.com/browse/SDS-4466 */
--spectrum-statuslight-info-padding-y: var(
--spectrum-global-dimension-size-65
);
/* Override line-height to fix Firefox */
--spectrum-statuslight-info-text-line-height: 1.44;
/* Override padding to fix alignment of the first line of text (needs to be moved down 1px) */
--spectrum-statuslight-info-padding-top: calc(
var(--spectrum-statuslight-info-padding-y) - 1px
);
--spectrum-statuslight-info-padding-bottom: calc(
var(--spectrum-statuslight-info-padding-y) + 1px
);
}
.spectrum-StatusLight {
min-block-size: var(--spectrum-statuslight-info-height);
display: flex;
flex-direction: row;
align-items: flex-start;
padding-block: var(--spectrum-statuslight-info-padding-top)
var(--spectrum-statuslight-info-padding-bottom);
padding-inline: 0;
box-sizing: border-box;
font-size: var(--spectrum-statuslight-info-text-size);
font-weight: var(--spectrum-statuslight-info-text-font-weight);
line-height: var(--spectrum-statuslight-info-text-line-height);
&::before {
content: "";
flex-grow: 0;
flex-shrink: 0;
display: inline-block;
inline-size: var(--spectrum-statuslight-info-dot-size);
block-size: var(--spectrum-statuslight-info-dot-size);
border-radius: 50%;
/* margin on the dog is the opposite of the padding in order to align the dot as if the padding hack was not present */
margin-block: var(--spectrum-statuslight-info-padding-bottom)
var(--spectrum-statuslight-info-padding-top);
margin-inline: var(--spectrum-statuslight-info-text-gap)
var(--spectrum-statuslight-info-text-gap);
/* support high contrast/forced-color-adjust mode for dot */
-ms-high-contrast-adjust: none;
forced-color-adjust: none;
}
}
.spectrum-StatusLight--neutral {
font-style: italic;
}