UNPKG

@bliss-design-system/alert

Version:

`<bliss-alert>` provides a messaging mechanism for alerting and informing.

188 lines (179 loc) 4.22 kB
import { css } from 'lit-element'; export const styles = css ` :host([hidden]) { display: none; } :host [part=alert] { background-color: #f5f8ff; border-color: #186bf2; display: flex; position: relative; padding: 16px 12px; overflow: hidden; border-width: 1px; border-style: solid; border-radius: 2px; border-left-width: 4px; font-family: inherit; } :host [part=icon] { color: #186bf2; } :host [part=heading] { color: #1f2328; font-size: 1.25rem; line-height: 1.25; margin: 0 0 4px; } :host [part=content] { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: #444a55; font-size: 1rem; line-height: 1.5; margin: 0 0 0 16px; /* https://github.com/WICG/webcomponents/issues/889 Combined selectors currently don't work in the ::slotted pseudo element (all of the examples below) ::slotted(p) > a, ::slotted(p > a), slot p a { color: tokens.$blue-500; } For now we need to settle for the default link colour (which, conveniently, is blue). or we need a link component that can be passed in with its own styles. */ } :host [part=content] ::slotted(*) { margin: 0; font-size: inherit; line-height: inherit; } :host [part=close] { position: absolute; top: calc(16px - 1px); right: 12px; } :host [part=close]::part(button) { color: #186bf2; padding: 0; min-height: 0; } :host [part=close]::part(button):hover { background-color: #d6e7ff; border-color: #d6e7ff; } :host [part=close]::part(button):active { background-color: #a3c7ff; border-color: #a3c7ff; color: #003fa3; } :host([dismissible]) [part=content] { margin-right: 32px; } :host([size=small]) [part=alert] { padding: 8px 16px 8px 12px; } :host([size=small]) [part=alert] [part=close] { position: absolute; top: calc(8px - 1px); right: 12px; } :host([theme=neutral]) [part=alert] { background-color: #f4f4f6; border-color: #6c7789; } :host([theme=neutral]) [part=icon] { color: #6c7789; } :host([theme=neutral]) [part=close]::part(button) { color: #6c7789; } :host([theme=neutral]) [part=close]::part(button):hover { background-color: #e2e5e9; border-color: #e2e5e9; } :host([theme=neutral]) [part=close]::part(button):active { background-color: #ccd0d7; border-color: #ccd0d7; color: #32363e; } :host([theme=positive]) [part=alert] { background-color: #ebfaf5; border-color: #0b8e67; } :host([theme=positive]) [part=icon] { color: #0b8e67; } :host([theme=positive]) [part=close]::part(button) { color: #0b8e67; } :host([theme=positive]) [part=close]::part(button):hover { background-color: #caf2e6; border-color: #caf2e6; } :host([theme=positive]) [part=close]::part(button):active { background-color: #8de2c9; border-color: #8de2c9; color: #056145; } :host([theme=notice]) [part=alert] { background-color: #fffbeb; border-color: #8b6704; } :host([theme=notice]) [part=icon] { color: #8b6704; } :host([theme=notice]) [part=close]::part(button) { color: #8b6704; } :host([theme=notice]) [part=close]::part(button):hover { background-color: #fcf3cf; border-color: #fcf3cf; } :host([theme=notice]) [part=close]::part(button):active { background-color: #fbecb1; border-color: #fbecb1; color: #8b6704; } :host([theme=warning]) [part=alert] { background-color: #fff7f0; border-color: #c25405; } :host([theme=warning]) [part=icon] { color: #c25405; } :host([theme=warning]) [part=close]::part(button) { color: #c25405; } :host([theme=warning]) [part=close]::part(button):hover { background-color: #fde4ce; border-color: #fde4ce; } :host([theme=warning]) [part=close]::part(button):active { background-color: #fbbe89; border-color: #fbbe89; color: #863603; } :host([theme=critical]) [part=alert] { background-color: #fff0f1; border-color: #a81523; } :host([theme=critical]) [part=icon] { color: #a81523; } :host([theme=critical]) [part=close]::part(button) { color: #a81523; } :host([theme=critical]) [part=close]::part(button):hover { background-color: #fed2d6; border-color: #fed2d6; } :host([theme=critical]) [part=close]::part(button):active { background-color: #fba7af; border-color: #fba7af; color: #780712; }`;