|
| 1 | +import { consoleLightTheme as theme } from '@ultraviolet/themes' |
| 2 | +import { globalStyle, style } from '@vanilla-extract/css' |
| 3 | +import background from '../assets/brand-background.png' |
| 4 | + |
| 5 | +export const globalStyleStoryBook = style({ |
| 6 | + fontFamily: "'Inter', sans-serif", |
| 7 | + fontSize: 16, |
| 8 | + |
| 9 | + color: theme.colors.neutral.text |
| 10 | +}) |
| 11 | + |
| 12 | +globalStyle(`${globalStyleStoryBook} p`, { margin: 0 }) |
| 13 | + |
| 14 | + |
| 15 | +globalStyle(`${globalStyleStoryBook} h2, ${globalStyleStoryBook} h3, ${globalStyleStoryBook} h4, ${globalStyleStoryBook} h5, ${globalStyleStoryBook} h6`, { margin: `${theme.space[2]} 0 ${theme.space[1]} 0`, |
| 16 | + }) |
| 17 | + |
| 18 | +globalStyle(`${globalStyleStoryBook} .sb-anchor h1, ${globalStyleStoryBook} .sb-anchor h2, ${globalStyleStoryBook} .sb-anchor h3, ${globalStyleStoryBook} .sb-anchor h4, ${globalStyleStoryBook} .sb-anchor h5, ${globalStyleStoryBook} .sb-anchor h6`, { margin: "inherit" }) |
| 19 | + |
| 20 | +globalStyle(`${globalStyleStoryBook} body`, { |
| 21 | + fontFamily: "'Inter', sans-serif", |
| 22 | + fontSize: 16, |
| 23 | + fontWeight: 400, |
| 24 | + lineHeight: 24, |
| 25 | + color: theme.colors.neutral.text |
| 26 | + }) |
| 27 | + |
| 28 | + |
| 29 | +globalStyle(`${globalStyleStoryBook} h1, h2, h3, h4, h5, h3`, { |
| 30 | + color: theme.colors.neutral.text |
| 31 | + }) |
| 32 | + |
| 33 | +globalStyle(`${globalStyleStoryBook} .toc-list-item::before`, { borderColor: `${theme.colors.primary.border} !important` }) |
| 34 | + |
| 35 | +globalStyle(`${globalStyleStoryBook} .toc-list-item`, { paddingBottom: "3px !important" }) |
| 36 | + |
| 37 | +globalStyle(`${globalStyleStoryBook} .toc-list-item.is-active-li>a`, { color: `${theme.colors.primary.text} !important` }) |
| 38 | + |
| 39 | +export const titleDecorator = style({}) |
| 40 | + |
| 41 | +globalStyle(`${titleDecorator} > h1`, { |
| 42 | + color: theme.colors.neutral.text, |
| 43 | + fontSize: theme.typography.headingLargeStronger.fontSize, |
| 44 | + fontFamily: theme.typography.headingLargeStronger.fontFamily, |
| 45 | + fontWeight: theme.typography.headingLargeStronger.weight, |
| 46 | + letterSpacing: theme.typography.headingLargeStronger.letterSpacing, |
| 47 | + lineHeight: theme.typography.headingLargeStronger.lineHeight, |
| 48 | + textDecoration: theme.typography.headingLargeStronger.textDecoration, |
| 49 | + padding: `${theme.space[5]} ${theme.space[3]}`, |
| 50 | + borderRadius: theme.radii.default, |
| 51 | + backgroundImage: `url(${background})`, |
| 52 | + backgroundSize: "cover", |
| 53 | + backgroundPosition: "center", |
| 54 | + backgroundRepeat: 'no-repeat', |
| 55 | + width: "100%", |
| 56 | +}) |
| 57 | + |
| 58 | +export const h2Decorator = style({ |
| 59 | + paddingBottom: theme.space[1], |
| 60 | + marginBottom: `${theme.space[2]} !important`, |
| 61 | + borderBottom: `2px solid ${theme.colors.neutral.borderStronger}` |
| 62 | +}) |
| 63 | + |
| 64 | +export const storiesDecorator = style({}) |
| 65 | + |
| 66 | +globalStyle(`${storiesDecorator} #stories`, { |
| 67 | + color: theme.colors.neutral.text, |
| 68 | + fontSize: theme.typography.headingStrong.fontSize, |
| 69 | + fontFamily: theme.typography.headingStrong.fontFamily, |
| 70 | + fontWeight: theme.typography.headingStrong.weight, |
| 71 | + letterSpacing: theme.typography.headingStrong.letterSpacing, |
| 72 | + lineHeight: theme.typography.headingStrong.lineHeight, |
| 73 | + textDecoration: theme.typography.headingStrong.textDecoration, |
| 74 | + paddingBottom: theme.space[1], |
| 75 | + borderBottom: `2px solid ${theme.colors.neutral.borderStronger}`, |
| 76 | + marginBottom: theme.space[2], |
| 77 | +}) |
| 78 | +export const storiesTheme = style({}) |
| 79 | + |
| 80 | +globalStyle(`${storiesTheme} .docs-story > div`, { padding: 0}) |
| 81 | + |
| 82 | +globalStyle(`${storiesTheme} .css-xzp052 .innerZoomElementWrapper > *`, { border: "0 !important"}) |
0 commit comments