forked from CalloraOrg/Callora-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.css
More file actions
179 lines (154 loc) · 3.36 KB
/
Copy pathcode.css
File metadata and controls
179 lines (154 loc) · 3.36 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/* Code Example Design Tokens — Light and Dark Theme Variants */
/* Light theme defaults */
.code-sample {
--bg-subtle: #f9f9f9;
--bg-highlight: #ffffff;
--border-subtle: #e2e8f0;
--text-main: #1a2332;
--font-mono: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}
/* Dark theme overrides */
[data-theme="dark"] .code-sample {
--bg-subtle: rgba(255, 255, 255, 0.03);
--bg-highlight: var(--surface-strong, rgba(17, 24, 46, 0.96));
--border-subtle: var(--line, rgba(169, 184, 255, 0.16));
--text-main: var(--text, #f3f5fb);
}
/* Code sample container */
.code-sample {
background: var(--bg-subtle);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
overflow: hidden;
}
.code-sample__header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: var(--bg-subtle);
border-bottom: 1px solid var(--border-subtle);
}
.code-sample__tabs {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.code-sample__tab {
padding: 4px 10px;
font-size: 11px;
font-weight: 400;
color: var(--muted, #64748b);
background: transparent;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
text-transform: uppercase;
transition: all 180ms ease;
}
.code-sample__tab--active {
font-weight: 600;
color: var(--text-main);
background: var(--bg-highlight);
border-color: var(--border-subtle);
}
.code-sample__tab:focus-visible {
outline: 2px solid var(--accent, #4e85ff);
outline-offset: 2px;
}
.code-sample__copy {
padding: 5px 12px;
font-size: 11px;
min-width: 75px;
}
.code-sample__copy--success {
color: var(--success, #10b981);
}
.code-sample__panel {
padding: 16px 12px;
margin: 0;
}
.code-sample__pre {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.5;
color: var(--text-main);
}
/* Screen reader only text */
.sr-only {
position: absolute;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
}
/* Narrow viewport (≤480px): adjust layout for mobile */
@media (max-width: 480px) {
.code-sample__header {
flex-direction: column;
align-items: stretch;
gap: 8px;
padding: 8px;
}
.code-sample__tabs {
overflow-x: auto;
flex-wrap: nowrap;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.code-sample__tabs::-webkit-scrollbar {
display: none;
}
.code-sample__tab {
flex-shrink: 0;
min-height: 36px;
padding: 6px 10px;
font-size: 10px;
}
.code-sample__copy {
align-self: flex-end;
min-height: 44px;
min-width: 80px;
padding: 8px 14px;
font-size: 12px;
}
.code-sample__panel {
padding: 12px 8px;
}
.code-sample__pre {
font-size: 12px;
}
}
/* Extra-narrow viewport (≤375px): compact layout for small phones */
@media (max-width: 375px) {
.code-sample__header {
padding: 6px;
gap: 6px;
}
.code-sample__tab {
min-height: 36px;
padding: 5px 8px;
font-size: 9px;
}
.code-sample__copy {
min-height: 44px;
min-width: 72px;
padding: 6px 10px;
font-size: 11px;
}
.code-sample__panel {
padding: 10px 6px;
}
.code-sample__pre {
font-size: 11px;
}
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.code-sample__tab {
transition: none;
}
}