Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-docs: CSS classes for escape-hatch theming wrapper/content #8061

Merged
4 changes: 2 additions & 2 deletions addons/docs/src/blocks/DocsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export const DocsContainer: React.FunctionComponent<DocsContainerProps> = ({
<DocsContext.Provider value={context}>
<ThemeProvider theme={theme}>
<MDXProvider components={components}>
<DocsWrapper>
<DocsContent>{children}</DocsContent>
<DocsWrapper className="sbdocs-wrapper">
<DocsContent className="sbdocs-content">{children}</DocsContent>
</DocsWrapper>
</MDXProvider>
</ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '5.2.0-beta.48';
export const version = '5.2.0-rc.0';
10 changes: 1 addition & 9 deletions lib/components/src/blocks/DocsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,10 @@ const Subtitle = styled.h2<{}>(withReset, ({ theme }) => ({
: transparentize(0.25, theme.color.defaultText),
}));

export const DocsContent = styled.div({
maxWidth: 800,
width: '100%',
});
export const DocsContent = styled.div();

export const DocsWrapper = styled.div<{}>(({ theme }) => ({
background: theme.background.content,
display: 'flex',
justifyContent: 'center',
minHeight: '100vh',
padding: '4rem 20px',

[`@media (min-width: ${breakpoint * 1}px)`]: {},
}));

Expand Down
12 changes: 12 additions & 0 deletions lib/core/src/server/templates/base-preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@
color: #eee;
font-family: "Operator Mono", "Fira Code Retina", "Fira Code", "FiraCode-Retina", "Andale Mono", "Lucida Console", Consolas, Monaco, monospace;
}

.sbdocs-wrapper {
display: flex;
justify-content: center;
min-height: 100vh;
padding: 4rem 20px;
}

.sbdocs-content {
max-width: 800px;
width: 100%;
}
</style>

<script>
Expand Down