-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcode-block.scss
More file actions
executable file
·90 lines (79 loc) · 1.93 KB
/
code-block.scss
File metadata and controls
executable file
·90 lines (79 loc) · 1.93 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@use '../../variables' as *;
.code-block {
&__container {
border-top: solid 1px var(--ty-color-border-secondary);
transition: 0.2s;
margin: 20px 0 0;
}
&__previewer {
color: var(--ty-color-text-secondary);
padding: 24px;
overflow-x: auto;
@media (max-width: $size-md) {
padding: 16px;
}
}
&__editor-container {
background-color: var(--ty-color-fill);
border-top: solid 1px var(--ty-color-border-secondary);
padding: 15px;
overflow-x: scroll;
font-family: Menlo, Consolas, "Droid Sans Mono", monospace;
.npm__react-simple-code-editor__textarea {
outline: none;
font-family: inherit;
}
}
&__editor-wrapper {
max-width: 800px;
width: 100%;
}
&__actions {
border-top: dashed 1px var(--ty-color-border-secondary);
height: 40px;
box-sizing: border-box;
background-color: var(--ty-color-bg-elevated);
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
padding: 0 12px;
position: relative;
}
&__action-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border: none;
background: none;
color: var(--ty-color-text-tertiary);
cursor: pointer;
border-radius: 4px;
font-size: 15px;
transition: color 0.2s, background-color 0.2s;
padding: 0;
&:hover {
color: var(--ty-color-primary);
background-color: var(--ty-color-fill);
}
}
&__action-toggle {
display: inline-flex;
align-items: center;
color: var(--ty-color-text-tertiary);
cursor: pointer;
font-size: 12px;
padding: 4px 8px;
border-radius: 4px;
transition: color 0.2s, background-color 0.2s;
user-select: none;
&:hover {
color: var(--ty-color-primary);
background-color: var(--ty-color-fill);
}
}
}