MCPcopy Create free account
hub / github.com/adobe/react-spectrum / prose

Function prose

packages/@react-spectrum/ai/src/style/prose.ts:43–272  ·  view source on GitHub ↗
(this: MacroContext | void)

Source from the content-addressed store, hash-verified

41} as const;
42
43export function prose(this: MacroContext | void) {
44 let rules = {
45 '.prose': font('body'), // note: `prose` is a placeholder class name that is replaced with a hashed class name below
46 h1: {
47 ...font('heading-xl'),
48 ...margin('heading')
49 },
50 h2: {
51 ...font('heading-lg'),
52 ...margin('heading')
53 },
54 h3: {
55 ...font('heading'),
56 ...margin('heading')
57 },
58 h4: {
59 ...font('heading-sm'),
60 ...margin('heading')
61 },
62 h5: {
63 ...font('heading-xs'),
64 ...margin('heading')
65 },
66 h6: {
67 ...font('heading-2xs'),
68 ...margin('heading')
69 },
70 pre: {
71 ...font('code-sm'),
72 borderRadius: getToken('corner-radius-large-default'),
73 backgroundColor: colorTokenToString(
74 resolveColorToken(colorToken('background-layer-1-color'))
75 ),
76 margin: 0,
77 padding: '16px',
78 width: '100%',
79 overflow: 'auto',
80 boxSizing: 'border-box'
81 },
82 p: {
83 ...margin('body')
84 },
85 'ul, ol': {
86 paddingInlineStart: `${24 / 16}rem`,
87 marginTop: {
88 default: marginTop.body,
89 ':is(li > *)': 0
90 },
91 marginBottom: {
92 default: marginBottom.body,
93 ':is(li > *)': 0
94 }
95 },
96 ul: {
97 listStyleType: 'disc'
98 },
99 ol: {
100 listStyleType: 'decimal'

Callers 3

Prose.stories.tsxFile · 0.90
ExampleFunction · 0.90
ProseResponseFunction · 0.90

Calls 11

getTokenFunction · 0.90
colorTokenToStringFunction · 0.90
resolveColorTokenFunction · 0.90
colorTokenFunction · 0.90
spaceFunction · 0.90
fontFunction · 0.85
marginFunction · 0.85
emitPropertiesFunction · 0.85
toBase62Function · 0.70
hashFunction · 0.70
addAssetMethod · 0.65

Tested by

no test coverage detected