Skip to content

Commit 82c3d69

Browse files
committed
feat: move css from started kit to sdk
1 parent 0e5cb88 commit 82c3d69

2 files changed

Lines changed: 70 additions & 12 deletions

File tree

assets/components/core-components.css

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,16 @@ table.table.table-zebra td {
168168
}
169169

170170
#flash-info,
171-
#flash-error {
171+
#flash-error,
172+
#flash-client-error,
173+
#flash-server-error {
172174
@apply fixed top-4 right-4 z-50 w-96;
173175
}
174176

175177
#flash-info .alert,
176-
#flash-error .alert {
178+
#flash-error .alert,
179+
#flash-client-error .alert,
180+
#flash-server-error .alert {
177181
@apply bg-white rounded-lg shadow-lg border-l-4 p-4 w-full;
178182
@apply flex items-start justify-between gap-4;
179183
border: none;
@@ -184,51 +188,68 @@ table.table.table-zebra td {
184188
@apply border-l-success-300;
185189
}
186190

187-
#flash-error .alert {
191+
#flash-error .alert,
192+
#flash-client-error .alert,
193+
#flash-server-error .alert {
188194
@apply border-l-danger-300;
189195
}
190196

191-
#flash-error .alert svg {
197+
#flash-error .alert svg,
198+
#flash-client-error .alert svg,
199+
#flash-server-error .alert svg {
192200
@apply text-danger-300;
193201
}
194202

195203
#flash-info .alert p:first-of-type,
196-
#flash-error .alert p:first-of-type {
204+
#flash-error .alert p:first-of-type,
205+
#flash-client-error .alert p:first-of-type,
206+
#flash-server-error .alert p:first-of-type {
197207
@apply font-bold text-neutrals-350 mb-1;
198208
word-wrap: break-word;
199209
overflow-wrap: break-word;
200210
word-break: break-word;
201211
}
202-
203212
#flash-info .alert p:last-of-type,
204-
#flash-error .alert p:last-of-type {
213+
#flash-error .alert p:last-of-type,
214+
#flash-client-error .alert p:last-of-type,
215+
#flash-server-error .alert p:last-of-type {
205216
@apply text-sm text-neutrals-300;
206217
word-wrap: break-word;
207218
overflow-wrap: break-word;
208219
word-break: break-word;
209220
}
210221

211222
#flash-info .alert svg,
212-
#flash-error .alert svg {
223+
#flash-error .alert svg,
224+
#flash-client-error .alert svg,
225+
#flash-server-error .alert svg {
213226
@apply w-5 h-5 flex-shrink-0 mt-0.5;
214227
}
215228

216229
#flash-info .alert button,
217-
#flash-error .alert button {
230+
#flash-error .alert button,
231+
#flash-client-error .alert button,
232+
#flash-server-error .alert button {
218233
@apply text-gray-400 hover:text-gray-600 transition-colors duration-200 flex-shrink-0;
219234
}
220235

221236
#flash-info .alert button svg,
222-
#flash-error .alert button svg {
237+
#flash-error .alert button svg,
238+
#flash-client-error .alert button svg,
239+
#flash-server-error .alert button svg {
223240
@apply w-5 h-5;
224241
}
225242

226243
#flash-info .alert span.hero-information-circle,
227-
#flash-error .alert span.hero-exclamation-circle {
244+
#flash-error .alert span.hero-exclamation-circle,
245+
#flash-client-error .alert span.hero-exclamation-circle,
246+
#flash-server-error .alert span.hero-exclamation-circle {
228247
display: none !important;
229248
}
230249

231250
#flash-info .alert button span,
232-
#flash-error .alert button span {
251+
#flash-error .alert button span,
252+
#flash-client-error .alert button span,
253+
#flash-server-error .alert button span {
233254
display: inline !important;
234255
}

assets/theme/theme.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,43 @@
2020
background-color: var(--color-neutrals-0, white) !important;
2121
}
2222

23+
/* Standalone app margins - only apply when not in iframe */
24+
body.standalone {
25+
padding: 1.5rem;
26+
max-width: 1200px;
27+
margin: 0 auto;
28+
}
29+
30+
/* Ensure iframe content has no extra padding */
31+
body.in-iframe {
32+
padding: 0;
33+
max-width: none;
34+
margin: 0;
35+
}
36+
37+
/* Additional responsive margins for standalone mode */
38+
@media (min-width: 768px) {
39+
body.standalone {
40+
padding: 2rem;
41+
}
42+
}
43+
44+
@media (min-width: 1024px) {
45+
body.standalone {
46+
padding: 3rem;
47+
}
48+
}
49+
50+
/* Add variants based on LiveView classes */
51+
@custom-variant phx-click-loading (.phx-click-loading&, .phx-click-loading &);
52+
@custom-variant phx-submit-loading (.phx-submit-loading&, .phx-submit-loading &);
53+
@custom-variant phx-change-loading (.phx-change-loading&, .phx-change-loading &);
54+
55+
/* Make LiveView wrapper divs transparent for layout */
56+
[data-phx-session] {
57+
display: contents;
58+
}
59+
2360
@theme interactions {
2461
--color-interaction-100: #e9edfd;
2562
--color-interaction-200: #90a1ee;

0 commit comments

Comments
 (0)