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] {
|
|
|
|
@apply bg-red-200 border-red-400;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
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]
|
|
|
|
[data-el-zoom-in-icon] {
|
2021-12-08 23:30:52 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-cell]:not([data-js-amplified])
|
|
|
|
[data-el-amplify-outputs-button]
|
|
|
|
[data-el-zoom-out-icon] {
|
2021-12-08 23:30:52 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
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]:not([data-js-insert-mode])
|
|
|
|
[data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed])
|
|
|
|
[data-el-editor-box],
|
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed]):not([data-js-focused])
|
|
|
|
[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-js-insert-mode]
|
|
|
|
[data-el-cell][data-type="setup"][data-js-focused]
|
|
|
|
[data-el-enable-insert-mode-button],
|
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-eval-validity="fresh"]:not([data-js-empty])
|
|
|
|
[data-el-enable-insert-mode-button],
|
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-js-changed]
|
|
|
|
[data-el-enable-insert-mode-button] {
|
2022-02-28 20:53:33 +08:00
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-session][data-js-insert-mode]
|
|
|
|
[data-el-cell][data-type="setup"][data-js-focused]
|
|
|
|
[data-el-info-box],
|
|
|
|
[data-el-session]
|
|
|
|
[data-el-cell][data-type="setup"][data-eval-validity="fresh"]:not([data-js-empty])
|
|
|
|
[data-el-info-box],
|
|
|
|
[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"]:not([data-js-source-visible])
|
|
|
|
[data-el-show-ui-icon] {
|
2022-03-29 03:36:57 +08:00
|
|
|
@apply hidden;
|
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-show-code-icon] {
|
2022-03-29 03:36:57 +08:00
|
|
|
@apply hidden;
|
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]:not([data-wrapper]) {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply py-4;
|
|
|
|
}
|
|
|
|
|
2022-04-04 18:19:11 +08:00
|
|
|
[data-el-output][data-border] {
|
2022-01-17 03:37:00 +08:00
|
|
|
@apply px-4 border border-t-0 border-gray-200 divide-y divide-gray-200;
|
|
|
|
}
|
|
|
|
|
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-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;
|
|
|
|
}
|
|
|
|
|
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-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;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|