mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-10 17:15:09 +08:00
f64dd0ea90
* Accessibility fixes * Restructure j/k navigation to support headlines * Focus modal content when open * Further focus adjustments * Fix tests * Remove unused functions
155 lines
4 KiB
CSS
155 lines
4 KiB
CSS
/*
|
|
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 === */
|
|
|
|
[phx-hook="Highlight"][data-highlighted] > [data-source] {
|
|
@apply hidden;
|
|
}
|
|
|
|
/* === Session === */
|
|
|
|
[data-element="session"]:not([data-js-insert-mode])
|
|
[data-element="insert-mode-indicator"] {
|
|
@apply invisible;
|
|
}
|
|
|
|
[data-element="session"]
|
|
[data-element="cell"][data-type="markdown"]
|
|
[data-element="editor-box"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"][data-js-insert-mode]
|
|
[data-element="cell"][data-type="markdown"][data-js-focused]
|
|
[data-element="editor-box"] {
|
|
@apply block;
|
|
}
|
|
|
|
[data-element="session"][data-js-insert-mode]
|
|
[data-element="cell"][data-type="markdown"][data-js-focused]
|
|
[data-element="enable-insert-mode-button"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"]:not([data-js-insert-mode])
|
|
[data-element="cell"][data-type="markdown"][data-js-focused]
|
|
[data-element="insert-image-button"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="notebook-headline"]:hover [data-element="heading"],
|
|
[data-element="section-headline"]:hover [data-element="heading"] {
|
|
@apply border-blue-200;
|
|
}
|
|
|
|
[data-element="notebook-headline"][data-js-focused] [data-element="heading"],
|
|
[data-element="section-headline"][data-js-focused] [data-element="heading"] {
|
|
@apply border-blue-300;
|
|
}
|
|
|
|
[data-element="section-headline"]:not(:hover):not([data-js-focused])
|
|
[data-element="heading"]
|
|
+ [data-element="section-actions"]:not(:focus-within) {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="cell"][data-js-focused] {
|
|
@apply border-blue-300 border-opacity-100;
|
|
}
|
|
|
|
[data-element="cell"]:not([data-js-focused])
|
|
[data-element="actions"]:not(:focus-within) {
|
|
/* Note: using opacity, so the buttons are focusable (via tab navigation)
|
|
and when focused we show the actions back. */
|
|
@apply opacity-0;
|
|
}
|
|
|
|
[data-element="cell"]:not([data-js-focused])
|
|
[data-element="actions"]:not([data-primary]):not(:focus-within) {
|
|
@apply pointer-events-none;
|
|
}
|
|
|
|
[data-element="cell"]:not([data-js-focused]):hover
|
|
[data-element="actions"][data-primary] {
|
|
@apply opacity-100 pointer-events-auto;
|
|
}
|
|
|
|
[data-element="cell"] [data-element="change-indicator"]:not([data-js-shown]) {
|
|
@apply invisible;
|
|
}
|
|
|
|
[data-element="sections-list-item"][data-js-is-viewed] {
|
|
@apply text-gray-900;
|
|
}
|
|
|
|
[data-element="cell"]:not([data-js-focused]):hover
|
|
[data-element="cell-focus-indicator"] {
|
|
@apply bg-blue-200;
|
|
}
|
|
|
|
[data-element="cell"][data-js-focused] [data-element="cell-focus-indicator"] {
|
|
@apply bg-blue-300;
|
|
}
|
|
|
|
[data-element="cell"][data-js-amplified] [data-element="outputs-container"] {
|
|
@apply bg-white m-0 py-16;
|
|
|
|
width: 90vw;
|
|
position: relative;
|
|
left: calc(-45vw + 50%);
|
|
}
|
|
|
|
[data-element="session"]:not([data-js-side-panel-content])
|
|
[data-element="side-panel"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"]:not([data-js-side-panel-content="sections-list"])
|
|
[data-element="sections-list"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"]:not([data-js-side-panel-content="clients-list"])
|
|
[data-element="clients-list"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"]:not([data-js-side-panel-content="runtime-info"])
|
|
[data-element="runtime-info"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="session"][data-js-side-panel-content="sections-list"]
|
|
[data-element="sections-list-toggle"] {
|
|
@apply text-gray-50 bg-gray-700;
|
|
}
|
|
|
|
[data-element="session"][data-js-side-panel-content="clients-list"]
|
|
[data-element="clients-list-toggle"] {
|
|
@apply text-gray-50 bg-gray-700;
|
|
}
|
|
|
|
[data-element="session"][data-js-side-panel-content="runtime-info"]
|
|
[data-element="runtime-info-toggle"] {
|
|
@apply text-gray-50 bg-gray-700;
|
|
}
|
|
|
|
[data-element="clients-list-item"]:not([data-js-followed])
|
|
[data-meta="unfollow"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[data-element="clients-list-item"][data-js-followed] [data-meta="follow"] {
|
|
@apply hidden;
|
|
}
|
|
|
|
[phx-hook="VirtualizedLines"]:not(:hover) [data-element="clipcopy"] {
|
|
@apply hidden;
|
|
}
|