Skip to content

Commit 2b33153

Browse files
committed
fix(website): Page template guidelines
adding a global max-inline-size: 100% for images, should be OK
1 parent 674e5a3 commit 2b33153

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/docusaurus-theme/src/theme/reset.styles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export const getResetStyles = (theme: UseEuiTheme) => {
3939
margin: 0;
4040
}
4141
42+
img {
43+
max-inline-size: 100%;
44+
height: auto;
45+
}
46+
4247
ul, ol {
4348
list-style: none;
4449
}

packages/website/docs/components/templates/page_template/guidelines.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { EuiFlexGroup } from '@elastic/eui';
1212
Try to use as much of the namespaced (e.g. `<EuiPageTemplate.Header />`) as much as possible. This will ensure that top level props are propagated through and alignment is kept through the stacking order. You can use the non-namespaced versions (e.g. `<EuiPageSection>`) if you deliberately don't want the props to inherit.
1313

1414
import contentCenterSvg from '!url-loader!./content_center.svg';
15-
import singleSvg from '!url-loader!./single.svg';
15+
import singleSvg from '!url-loader!./content_single.svg';
1616

1717
<Demo scope={{ singleSvg, contentCenterSvg }}>
1818
```tsx
@@ -154,6 +154,8 @@ If, after loading, the entire page renders as an empty or error state, the loadi
154154
<Guideline type="do" text="Use the empty prompt as a loading state followed by an empty prompt styled as a error/empty state (or loaded content).">
155155
![Good example of loading state ending in an error state using centered empty prompt for both](./do_9.png)
156156
</Guideline>
157+
</EuiFlexGroup>
158+
<EuiFlexGroup gutterSize="m">
157159
<Guideline type="dont" text="Temporarily showing content like the page headers when loading then removing those elements on error is jarring.">
158160
![Bad example of loading state not using empty prompt ending in an error state changes the whole page contents](./dont_9.png)
159161
</Guideline>

0 commit comments

Comments
 (0)