2021-03-20 21:10:15 +08:00
|
|
|
/*
|
|
|
|
Conditional elements display.
|
|
|
|
|
|
|
|
Verious hooks and callbacks dynamically set attributes
|
|
|
|
based on which we hide/show certain elements.
|
|
|
|
This way we don't have to engage the server in
|
|
|
|
solely client-side operations.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* === Global === */
|
|
|
|
|
2021-07-29 01:35:36 +08:00
|
|
|
[phx-hook="Highlight"][data-highlighted] > [data-source] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-03-16 18:33:53 +08:00
|
|
|
[phx-hook="Dropzone"][data-js-dragging] {
|
2023-07-22 02:11:11 +08:00
|
|
|
@apply bg-blue-100 border-blue-300;
|
2022-03-16 18:33:53 +08:00
|
|
|
}
|
|
|
|
|
2021-03-20 21:10:15 +08:00
|
|
|
/* === Session === */
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-insert-mode]) [data-el-insert-mode-indicator] {
|
2021-04-01 18:56:19 +08:00
|
|
|
@apply invisible;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-insert-mode])
|
|
|
|
[data-el-cell][data-type="markdown"]
|
|
|
|
[data-el-editor-box],
|
|
|
|
[data-el-session][data-js-insert-mode]
|
|
|
|
[data-el-cell][data-type="markdown"]:not([data-js-focused])
|
|
|
|
[data-el-editor-box] {
|
2022-02-28 20:53:33 +08:00
|
|
|
@apply hidden;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session][data-js-insert-mode]
|
|
|
|
[data-el-cell][data-js-focused]
|
|
|
|
[data-el-enable-insert-mode-button] {
|
2021-03-20 21:10:15 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-insert-mode])
|
|
|
|
[data-el-cell][data-type="markdown"][data-js-focused]
|
|
|
|
[data-el-insert-image-button] {
|
2021-04-05 00:55:51 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-notebook-headline]:hover [data-el-heading],
|
|
|
|
[data-el-section-headline]:hover [data-el-heading] {
|
2021-11-17 04:57:10 +08:00
|
|
|
@apply border-blue-200;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-notebook-headline][data-js-focused] [data-el-heading],
|
|
|
|
[data-el-section-headline][data-js-focused] [data-el-heading] {
|
2021-11-17 04:57:10 +08:00
|
|
|
@apply border-blue-300;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-section-headline]:not(:hover):not([data-js-focused])
|
|
|
|
[data-el-heading]
|
|
|
|
+ [data-el-section-actions]:not(:focus-within) {
|
2021-11-17 04:57:10 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-03-13 21:52:26 +08:00
|
|
|
[data-el-section][data-js-collapsed] [data-el-section-collapse-button],
|
|
|
|
[data-el-section]:not([data-js-collapsed])
|
|
|
|
[data-el-section-headline]:not(:hover):not([data-js-focused])
|
|
|
|
[data-el-section-collapse-button],
|
|
|
|
[data-el-section]:not([data-js-collapsed]) [data-el-section-expand-button],
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session]:not([data-js-view="code-zen"])
|
2023-03-14 05:37:11 +08:00
|
|
|
[data-el-section][data-js-collapsed]
|
|
|
|
> [data-el-section-content],
|
2023-03-13 21:52:26 +08:00
|
|
|
[data-el-section]:not([data-js-collapsed])
|
|
|
|
> [data-el-section-subheadline-collapsed] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-07-22 02:11:11 +08:00
|
|
|
[data-el-session]:not([data-js-dragging]) [data-el-insert-drop-area] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-js-focused] {
|
2021-03-20 21:10:15 +08:00
|
|
|
@apply border-blue-300 border-opacity-100;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-focused]) [data-el-actions]:not(:focus-within) {
|
2021-03-23 21:10:34 +08:00
|
|
|
/* Note: using opacity, so the buttons are focusable (via tab navigation)
|
2021-06-18 22:14:20 +08:00
|
|
|
and when focused we show the actions back. */
|
|
|
|
@apply opacity-0;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-focused])
|
|
|
|
[data-el-actions]:not([data-primary]):not(:focus-within) {
|
2021-06-18 22:14:20 +08:00
|
|
|
@apply pointer-events-none;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-focused])[data-js-hover]
|
|
|
|
[data-el-actions][data-primary] {
|
2021-03-23 21:10:34 +08:00
|
|
|
@apply opacity-100 pointer-events-auto;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-js-changed] [data-el-cell-status] {
|
2021-12-08 02:14:32 +08:00
|
|
|
@apply italic;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-changed])
|
|
|
|
[data-el-cell-status]
|
|
|
|
[data-el-change-indicator] {
|
2021-06-10 20:54:55 +08:00
|
|
|
@apply invisible;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-sections-list-item][data-js-is-viewed] {
|
2021-03-26 00:39:18 +08:00
|
|
|
@apply text-gray-900;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-focused])[data-js-hover]
|
|
|
|
[data-el-cell-focus-indicator] {
|
2021-03-20 21:10:15 +08:00
|
|
|
@apply bg-blue-200;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-js-focused] [data-el-cell-focus-indicator] {
|
2021-03-20 21:10:15 +08:00
|
|
|
@apply bg-blue-300;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-js-amplified] [data-el-outputs-container] {
|
2021-11-09 17:45:05 +08:00
|
|
|
@apply bg-white m-0 py-16;
|
|
|
|
|
|
|
|
width: 90vw;
|
|
|
|
position: relative;
|
|
|
|
left: calc(-45vw + 50%);
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-js-amplified]
|
|
|
|
[data-el-amplify-outputs-button]
|
2022-04-30 18:26:03 +08:00
|
|
|
.icon-button {
|
|
|
|
@apply bg-gray-100 text-gray-900;
|
2021-12-08 23:30:52 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-type="smart"]:not([data-js-source-visible])
|
|
|
|
[data-el-editor-box] {
|
2022-02-28 20:53:33 +08:00
|
|
|
/* Note: we intentionally don't hide the editor, because this leads
|
|
|
|
to issues with hover intellisense once the editor is shown. */
|
|
|
|
@apply h-0 overflow-hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-type="smart"][data-js-source-visible] [data-el-ui-box] {
|
2022-02-28 20:53:33 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]
|
2022-12-29 20:10:28 +08:00
|
|
|
[data-el-cell][data-type="setup"]:not(
|
|
|
|
[data-eval-validity="fresh"]:not([data-js-empty])
|
2023-02-21 20:17:54 +08:00
|
|
|
):not([data-eval-errored]):not([data-js-changed]):not([data-js-focused])
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-editor-box] {
|
2022-03-29 03:36:57 +08:00
|
|
|
@apply h-0 overflow-hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-js-focused]
|
|
|
|
[data-el-info-box],
|
|
|
|
[data-el-session]
|
2022-12-29 20:10:28 +08:00
|
|
|
[data-el-cell][data-type="setup"][data-eval-validity="fresh"]:not(
|
|
|
|
[data-js-empty]
|
|
|
|
)
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-info-box],
|
2023-02-21 20:17:54 +08:00
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-eval-errored]
|
|
|
|
[data-el-info-box],
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-js-changed]
|
|
|
|
[data-el-info-box] {
|
2022-02-28 20:53:33 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-type="smart"][data-js-source-visible]
|
2022-04-30 18:26:03 +08:00
|
|
|
[data-el-toggle-source-button]
|
|
|
|
.icon-button {
|
|
|
|
@apply bg-gray-100 text-gray-900;
|
2022-02-28 20:53:33 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell][data-type="smart"][data-js-source-visible]
|
|
|
|
[data-el-cell-status-container] {
|
2022-02-28 20:53:33 +08:00
|
|
|
@apply absolute bottom-2 right-2;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output][data-border] {
|
2022-08-30 19:15:55 +08:00
|
|
|
@apply p-4 border border-t-0 border-gray-200 divide-y divide-gray-200;
|
2022-01-17 03:37:00 +08:00
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output][data-border]:first-child {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply rounded-t-lg border-t;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output]:not([data-border]) + [data-el-output][data-border] {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply border-t;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output][data-border]:last-child {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply rounded-b-lg border-b;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output]:not(:first-child) {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply mt-2;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output][data-border] + [data-el-output][data-border] {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply mt-0;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-outputs-container] > [data-el-output]:first-child {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply mt-2;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content]) [data-el-side-panel] {
|
2021-03-20 21:10:15 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="sections-list"])
|
|
|
|
[data-el-sections-list] {
|
2021-05-04 02:03:19 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="clients-list"])
|
|
|
|
[data-el-clients-list] {
|
2021-05-04 02:03:19 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-08-26 04:24:24 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="secrets-list"])
|
|
|
|
[data-el-secrets-list] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-07-06 02:01:12 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="files-list"])
|
|
|
|
[data-el-files-list] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="runtime-info"])
|
|
|
|
[data-el-runtime-info] {
|
2021-11-10 01:37:22 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-02-16 20:47:46 +08:00
|
|
|
[data-el-session]:not([data-js-side-panel-content="app-info"])
|
|
|
|
[data-el-app-info] {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="sections-list"]
|
|
|
|
[data-el-sections-list-toggle] {
|
2021-05-04 02:03:19 +08:00
|
|
|
@apply text-gray-50 bg-gray-700;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="clients-list"]
|
|
|
|
[data-el-clients-list-toggle] {
|
2021-04-02 20:54:14 +08:00
|
|
|
@apply text-gray-50 bg-gray-700;
|
2021-03-20 21:10:15 +08:00
|
|
|
}
|
|
|
|
|
2022-08-26 04:24:24 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="secrets-list"]
|
|
|
|
[data-el-secrets-list-toggle] {
|
|
|
|
@apply text-gray-50 bg-gray-700;
|
|
|
|
}
|
|
|
|
|
2023-07-06 02:01:12 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="files-list"]
|
|
|
|
[data-el-files-list-toggle] {
|
|
|
|
@apply text-gray-50 bg-gray-700;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="runtime-info"]
|
|
|
|
[data-el-runtime-info-toggle] {
|
2021-11-10 01:37:22 +08:00
|
|
|
@apply text-gray-50 bg-gray-700;
|
|
|
|
}
|
|
|
|
|
2023-02-16 20:47:46 +08:00
|
|
|
[data-el-session][data-js-side-panel-content="app-info"]
|
|
|
|
[data-el-app-info-toggle] {
|
|
|
|
@apply text-gray-50 bg-gray-700;
|
|
|
|
}
|
|
|
|
|
|
|
|
[data-el-session][data-js-side-panel-content="app-info"]
|
|
|
|
[data-el-app-indicator] {
|
|
|
|
@apply border-gray-700;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-clients-list-item]:not([data-js-followed]) [data-meta="unfollow"] {
|
2021-05-07 22:41:37 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-clients-list-item][data-js-followed] [data-meta="follow"] {
|
2021-05-07 22:41:37 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
2021-06-24 18:15:12 +08:00
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[phx-hook="VirtualizedLines"]:not(:hover) [data-el-clipcopy] {
|
2021-06-24 18:15:12 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
2022-04-15 03:17:19 +08:00
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
/* === Views === */
|
|
|
|
|
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-section-headline],
|
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-section-subheadline],
|
|
|
|
[data-el-session][data-js-view="code-zen"]
|
|
|
|
[data-el-section-subheadline-collapsed],
|
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-cell][data-type="markdown"],
|
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-actions],
|
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-insert-buttons] {
|
2022-04-15 03:17:19 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-sections-container] {
|
2022-04-15 03:17:19 +08:00
|
|
|
@apply space-y-0 mt-0;
|
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session][data-js-view="code-zen"] [data-el-view-toggle="code-zen"] {
|
|
|
|
@apply text-green-bright-400;
|
2022-04-15 03:17:19 +08:00
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session][data-js-view="presentation"]
|
|
|
|
[data-el-section-headline]:not([data-js-focused]),
|
|
|
|
[data-el-session][data-js-view="presentation"]
|
|
|
|
[data-el-section-subheadline]:not([data-js-focused]),
|
|
|
|
[data-el-session][data-js-view="presentation"]
|
|
|
|
[data-el-cell]:not([data-js-focused]),
|
|
|
|
[data-el-session][data-js-view="presentation"]
|
|
|
|
[data-el-js-view-iframes]
|
|
|
|
iframe:not([data-js-focused]) {
|
|
|
|
@apply opacity-10;
|
2022-05-02 21:29:42 +08:00
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session][data-js-view="presentation"] [data-el-sidebar],
|
|
|
|
[data-el-session][data-js-view="presentation"] [data-el-side-panel],
|
|
|
|
[data-el-session][data-js-view="presentation"] [data-el-toggle-sidebar] {
|
2022-05-02 21:29:42 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session][data-js-view="presentation"]
|
|
|
|
[data-el-view-toggle="presentation"] {
|
|
|
|
@apply text-green-bright-400;
|
|
|
|
}
|
|
|
|
|
|
|
|
[data-el-session]:is([data-js-view="code-zen"], [data-js-view="presentation"])
|
|
|
|
[data-el-views-disabled] {
|
2022-04-15 03:17:19 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2023-04-29 02:16:18 +08:00
|
|
|
[data-el-session]:not([data-js-view="code-zen"], [data-js-view="presentation"])
|
|
|
|
[data-el-views-enabled] {
|
2022-04-15 03:17:19 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|