forked from elastic/eui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CSS-in-JS] Convert
EuiMark
(elastic#4575)
* placeholder docs * CL TODO * converting euimark styles to emotion * import location * move CL * rename style file; style factory pattern * use simple return * update generated classname pattern * update snapshots * better class name generation * cl * Update src/components/mark/mark.styles.ts Co-authored-by: Caroline Horn <[email protected]> * clean up * better wiki * more wiki * Update wiki/creating-components-manually.md Co-authored-by: Constance <[email protected]> Co-authored-by: Caroline Horn <[email protected]> Co-authored-by: Constance <[email protected]>
- Loading branch information
1 parent
fddf0d2
commit e7b3917
Showing
14 changed files
with
123 additions
and
32 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { css } from '@emotion/react'; | ||
import { UseEuiTheme, transparentize } from '../../services'; | ||
|
||
export const euiMarkStyles = ({ euiTheme, colorMode }: UseEuiTheme) => { | ||
// TODO: Was $euiFocusBackgroundColor | ||
const transparency = { LIGHT: 0.1, DARK: 0.3 }; | ||
|
||
return css` | ||
background-color: ${transparentize( | ||
euiTheme.colors.primary, | ||
transparency[colorMode] | ||
)}; | ||
font-weight: ${euiTheme.font.weight.bold}; | ||
// Override the browser's black color. | ||
// Can't use 'inherit' because the text to background color contrast may not be sufficient | ||
color: ${euiTheme.colors.text}; | ||
`; | ||
}; |
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 was deleted.
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