Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/eui-theme-borealis/changelogs/upcoming/8813.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added new component token `components.forms.codeInlineBackground`

2 changes: 2 additions & 0 deletions packages/eui-theme-borealis/src/variables/_components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const component_colors: _EuiThemeComponentColors = {
([textParagraph]) => textParagraph,
['colors.textParagraph']
),
codeInlineBackground: SEMANTIC_COLORS.shade15,
codeInlineColor: SEMANTIC_COLORS.assistance100,
codeCommentColor: computed(
([textSubdued]) => textSubdued,
Expand Down Expand Up @@ -363,6 +364,7 @@ export const components: _EuiThemeComponents = {

buttonGroupFocusColor: SEMANTIC_COLORS.plainLight,

codeInlineBackground: SEMANTIC_COLORS.shade135,
codeInlineColor: SEMANTIC_COLORS.assistance60,
codeStringColor: SEMANTIC_COLORS.accent60,
codeTagColor: SEMANTIC_COLORS.primary60,
Expand Down
2 changes: 2 additions & 0 deletions packages/eui-theme-common/changelogs/upcoming/8813.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added type for `components.forms.codeInlineBackground`

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type _EuiThemeComponentColors = {
codeBackground: ColorModeSwitch;
codeBackgroundSelected: ColorModeSwitch;
codeColor: ColorModeSwitch;
codeInlineBackground: ColorModeSwitch;
codeInlineColor: ColorModeSwitch;
codeCommentColor: ColorModeSwitch;
codeSelectorColor: ColorModeSwitch;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/8813.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Added new component token `components.forms.codeInlineBackground`
- Updated background color for `EuiCode` to use `components.forms.codeInlineBackground`

2 changes: 1 addition & 1 deletion packages/eui/src/components/code/code.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const euiCodeStyles = (euiThemeContext: UseEuiTheme) => {
font-family: ${euiTheme.font.familyCode};
font-size: 0.9em; /* 1 */
${logicalShorthandCSS('padding', '0.2em 0.5em')} /* 1 */
background-color: ${codeSyntaxVariables.backgroundColor};
background-color: ${codeSyntaxVariables.inlineBackgroundColor};
${highContrastModeStyles(euiThemeContext, {
forced: `
border: ${euiTheme.border.thin};
Expand Down
1 change: 1 addition & 0 deletions packages/eui/src/components/code/code_syntax.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const euiCodeSyntaxVariables = (euiThemeContext: UseEuiTheme) => {
return {
backgroundColor,
color,
inlineBackgroundColor: euiTheme.components.codeInlineBackground,
inlineCodeColor: euiTheme.components.codeInlineColor,
selectedBackgroundColor: euiTheme.components.codeBackgroundSelected,
commentColor: euiTheme.components.codeCommentColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ const component_colors: _EuiThemeComponentColors = {
([lightestShade, text]) => makeHighContrastColor(text)(lightestShade),
['colors.lightestShade', 'colors.text']
),
codeInlineBackground: computed(
([lightestShade]) => lightestShade,
['colors.lightestShade']
),
codeInlineColor: computed(
([lightestShade]) =>
makeHighContrastColor(colorVis.euiColorVis3)(lightestShade),
Expand Down