-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * colors (#173) * fix dimension size to be base * light colors * fix blobal styles to have derived styles * replacing white90 with text90 ' * Add light to stories * fix gray types * add proper colors for borders * toggle wrap for the theme picker * themeToggleWrap * text field * editing range slider and slider base * dropdown button * radio group * cleanup * accordion * changes * add overview page * compact search field * fix inherit * bunch of cleanup * fix danger button color * Unused variables * Unused variables * cleanup * v1.0.0-0 * fix designation colors * Fix slideover * v1.0.0-1 * fix light colors * breadcrumbs * v1.0.0-2 * light mode scoping * cleanup * cleanup * v1.0.0-3 * Add different semantic colors * alert colors * v1.0.0-4 * desginmation colors * v1.0.0-5 * fix notify * Transition empty * fix modal story * fix yarn lock * fix import * gray deprecation * fix list stately * add more primary * v1.0.0-6 * fix designation colors * fix designation colors --------- Co-authored-by: Krystal Kirkland <[email protected]> Co-authored-by: Gurmehar Somal <[email protected]>
- Loading branch information
1 parent
c4c0ee6
commit 2b0360c
Showing
93 changed files
with
3,682 additions
and
2,562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<style> | ||
body { | ||
font-family: 'Roboto', sans-serif; | ||
color: rgba(255, 255, 255, 0.9); | ||
color: var(--ac-global-text-color-900); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,23 @@ | ||
import { css } from '@emotion/react'; | ||
import { transparentize, darken } from 'polished'; | ||
import theme from '../theme'; | ||
import { SeverityLevel } from '../types'; | ||
|
||
export const baseSeverityCSS = css` | ||
backdrop-filter: blur(10px); | ||
`; | ||
|
||
const bgDarken = 0.4, | ||
bgTransparentize = 0.5, | ||
// FireFox does not support backdrop-filter so needs to be less transparent and darker | ||
bgDarkenFallback = 0.45, | ||
bgTransparentizeFallback = 0.1; | ||
|
||
const generateSeverityCSS = (severityColor: string) => | ||
css( | ||
const generateSeverityCSS = (semanticColor: SeverityLevel) => { | ||
const colorPrefix = `--ac-global-color-${semanticColor}`; | ||
return css( | ||
baseSeverityCSS, | ||
css` | ||
border: 1px solid ${severityColor}; | ||
/* FireFox Only style */ | ||
background-color: ${transparentize( | ||
bgTransparentizeFallback, | ||
darken(bgDarkenFallback, severityColor) | ||
)}; | ||
color: ${severityColor}; | ||
/* background-filter support (Chrome / Safari) */ | ||
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { | ||
background-color: ${transparentize( | ||
bgTransparentize, | ||
darken(bgDarken, severityColor) | ||
)}; | ||
} | ||
border: 1px solid var(${colorPrefix}); | ||
background-color: var(${colorPrefix}-700); | ||
color: var(--ac-global-static-color-white-900); | ||
` | ||
); | ||
}; | ||
|
||
export const warningCSS = generateSeverityCSS(theme.colors.statusWarning); | ||
export const infoCSS = generateSeverityCSS(theme.colors.statusInfo); | ||
export const dangerCSS = generateSeverityCSS(theme.colors.statusDanger); | ||
export const successCSS = generateSeverityCSS(theme.colors.statusSuccess); | ||
export const warningCSS = generateSeverityCSS('warning'); | ||
export const infoCSS = generateSeverityCSS('info'); | ||
export const dangerCSS = generateSeverityCSS('danger'); | ||
export const successCSS = generateSeverityCSS('success'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.