forked from vanilla-extract-css/vanilla-extract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInlineCode.css.ts
More file actions
36 lines (35 loc) · 841 Bytes
/
InlineCode.css.ts
File metadata and controls
36 lines (35 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { style } from '@vanilla-extract/css';
import { darkMode } from '../system/styles/sprinkles.css';
import { vars } from '../themes.css';
export const code = style({
fontFamily: vars.fonts.code,
wordWrap: 'break-word',
'::before': {
content: '""',
position: 'absolute',
background: vars.palette.pink100,
top: 0,
bottom: 0,
left: 0,
right: 0,
zIndex: -1,
margin: '2px 0',
clipPath: 'polygon(0 0, 100% 0, calc(100% - 3px) 100%, 3px 100%)',
transform: 'skewY(-0.25deg)',
},
selectors: {
[`.${darkMode} &::before`]: {
background: vars.palette.gray800,
},
[`a > &`]: {
textDecoration: 'underline 0.05em',
},
['a:hover > &']: {
color: 'currentcolor',
},
['a:focus > &']: {
outline: 'none',
color: 'currentcolor',
},
},
});