Skip to content

Commit 34e5db8

Browse files
authored
[High Contrast Mode] new_final_final(2).psd (#8234)
1 parent 578de0b commit 34e5db8

File tree

85 files changed

+577
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+577
-309
lines changed

β€Žpackages/docusaurus-theme/src/components/demo/demo.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface DemoProps extends PropsWithChildren {
5656

5757
const getDemoStyles = (euiTheme: UseEuiTheme) => ({
5858
demo: css`
59-
--docs-demo-border-color: ${euiTheme.euiTheme.colors.lightShade};
59+
--docs-demo-border-color: ${euiTheme.euiTheme.border.color};
6060
--docs-demo-border-radius: ${euiTheme.euiTheme.size.s};
6161
6262
border: 1px solid var(--docs-demo-border-color);

β€Žpackages/docusaurus-theme/src/components/guideline/guideline.tsxβ€Ž

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useEuiMemoizedStyles,
77
UseEuiTheme,
88
} from '@elastic/eui';
9+
import { highContrastModeStyles } from '@elastic/eui/lib/global_styling/functions/high_contrast';
910
import { css } from '@emotion/react';
1011
import { GuidelineType } from './types';
1112
import { GuidelineText } from './guideline_text';
@@ -17,23 +18,38 @@ export interface GuidelineProps extends PropsWithChildren {
1718
panelStyle?: EuiPanelProps['style'];
1819
}
1920

20-
const getGuidelineStyles = ({ euiTheme }: UseEuiTheme) => ({
21-
root: css`
22-
margin-block: var(--eui-theme-content-vertical-spacing);
23-
`,
24-
wrapper: css`
25-
border-block-end: 2px solid ${euiTheme.colors.lightShade};
26-
`,
27-
wrapperDo: css`
28-
border-color: ${euiTheme.colors.success};
29-
`,
30-
wrapperDont: css`
31-
border-color: ${euiTheme.colors.danger};
32-
`,
33-
textWrapper: css`
34-
margin-block-start: var(--eui-size-xs);
35-
`,
36-
});
21+
const getGuidelineStyles = (euiThemeContext: UseEuiTheme) => {
22+
const { euiTheme, highContrastMode } = euiThemeContext;
23+
return {
24+
root: css`
25+
margin-block: var(--eui-theme-content-vertical-spacing);
26+
`,
27+
wrapper: css`
28+
border-block-end: ${euiTheme.border.thick};
29+
border-start-start-radius: ${euiTheme.border.radius.medium};
30+
border-start-end-radius: ${euiTheme.border.radius.medium};
31+
overflow: hidden;
32+
33+
${highContrastModeStyles(euiThemeContext, {
34+
// Code block is used within a panel which already has a border - skip doubling up
35+
preferred: `
36+
& > .euiCodeBlock {
37+
border: none;
38+
}
39+
`,
40+
})}
41+
`,
42+
wrapperDo: css`
43+
border-color: ${euiTheme.colors.success};
44+
`,
45+
wrapperDont: css`
46+
border-color: ${euiTheme.colors.danger};
47+
`,
48+
textWrapper: css`
49+
margin-block-start: var(--eui-size-xs);
50+
`,
51+
};
52+
};
3753

3854
export const Guideline = ({
3955
children,

β€Žpackages/docusaurus-theme/src/theme/DocRoot/Layout/Sidebar/index.tsxβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const getGlobalStyles = ({ euiTheme }: UseEuiTheme) => {
1717
sidebar: css`
1818
--doc-sidebar-width: 258px;
1919
--doc-sidebar-hidden-width: 30px;
20+
--ifm-toc-border-color: ${euiTheme.border.color};
2021
2122
// ensure scrolling still works
2223
display: flex;
@@ -28,7 +29,7 @@ const getGlobalStyles = ({ euiTheme }: UseEuiTheme) => {
2829
};
2930
};
3031

31-
// converted from css moduels to Emotion
32+
// converted from css modules to Emotion
3233
const styles = {
3334
docSidebarContainer: css`
3435
display: none;
19.1 KB
19 KB
-262 Bytes
-113 Bytes
45 Bytes
-144 Bytes
-62 Bytes

0 commit comments

Comments
Β (0)