@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
96 lines (82 loc) • 2.39 kB
JavaScript
// src/components/alert/alert.custom.styles.ts
import { css } from "lit";
var alert_custom_styles_default = css`
.alert {
/* Defines the used border and icon color for variants */
--variant-accent-color: var(--syn-panel-border-color);
border: var(--syn-panel-border-width) solid var(--syn-panel-border-color);
border-left: 0;
border-radius: var(--syn-border-radius-none);
color: var(--syn-typography-color-text);
font-size: var(--syn-font-size-medium);
line-height: var(--syn-line-height-normal);
min-height: 56px;
}
/**
* Add back the items left borders
* This is done to prevent border clipping with the large border-left needed on .alert
* Note we also need to adjust our paddings to add the border width here
*/
.alert::before {
background: var(--variant-accent-color);
bottom: -1px;
content: "";
left: 0;
position: absolute;
top: -1px;
width: var(--syn-spacing-2x-small);
}
.alert :first-child {
margin-inline-start: var(--syn-spacing-2x-small);
}
/**
* Make sure everything is aligned to top
*/
.alert__icon,
.alert__close-button {
align-items: flex-start;
font-size: var(--syn-font-size-x-large);
}
.alert__message {
padding: var(--syn-spacing-medium) var(--syn-spacing-large) var(--syn-spacing-medium) var(--syn-spacing-medium);
}
/**
* Alert Icon
*/
.alert__icon {
color: var(--variant-accent-color);
padding-block: var(--syn-spacing-medium);
padding-inline-start: var(--syn-spacing-medium);
}
/**
* Close Icon
*/
.alert__close-button {
align-self: start;
color: var(--syn-typography-color-text);
margin-block: calc(var(--syn-spacing-x-small) - var(--syn-panel-border-width));
margin-inline-end: var(--syn-spacing-x-small);
}
/**
* Variants should highlight the left border instead of top
*/
.alert--primary {
--variant-accent-color: var(--syn-color-primary-600);
}
.alert--success {
--variant-accent-color: var(--syn-color-success-500);
}
.alert--neutral {
--variant-accent-color: var(--syn-color-neutral-800);
}
.alert--warning {
--variant-accent-color: var(--syn-color-warning-400);
}
.alert--danger {
--variant-accent-color: var(--syn-color-error-600);
}
`;
export {
alert_custom_styles_default
};
//# sourceMappingURL=chunk.QBHZAR4C.js.map