/* * This is a manifest file that'll be compiled into application.css, which will * include all the files listed below. * * Any CSS (and SCSS, if configured) file within this directory, * lib/assets/stylesheets, or any plugin's vendor/assets/stylesheets directory * can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at * the bottom of the compiled file so the styles you add here take precedence * over styles defined in any other CSS files in this directory. Styles in this * file should be added after the last require_* statement. It is generally * better to create a new file per style scope. * *= require_self */ /* Strive for simplicity: * * style elements/tags only - if possible, * * replace element/tag name with class name - if element has to be styled * differently depending on context (e.g.
, , as link/button), * * styles with multiple selectors should have all selectors with same * specificity, to allow proper rule specificity vs order management. * * NOTE: style in a modular way, similar to how CSS @scope would be used, * to make transition easier once @scope is widely available. */ /* TODO: change :root -> ? */ :root { --color-focus-gray: #f3f3f3; --color-border-gray: #dddddd; --color-nav-gray: #c7c7c7; --color-gray: #a0a0a0; --color-table-gray: #909090; --color-text-gray: #707070; --color-dark-blue: #006c9b; --color-blue: #009ade; --color-dark-red: #b21237; --color-red: #ff1f5b; --depth: 0; --z-index-flashes: 100; --z-index-table-row-outline: 10; } *, ::before, ::after { box-sizing: border-box; } ::selection { background-color: var(--color-blue); color: white; } :focus-visible { outline: none; } /* NOTE: move to higher priority layer instead of using !important?; add CSS * @layer requirements in README */ /* Disable elements with: * `[aria-disabled=true]` - non-form elements (e.g. links), * `[disabled]` - form controls, that may be enabled conditionally, * `[readonly]` - form controls, that stay disabled for form lifetime. */ [aria-disabled=true], [disabled] { border-color: var(--color-border-gray) !important; color: var(--color-border-gray) !important; /* NOTE: cannot set cursor when `pointer-events: none`; can be fixed by setting * `cursor` on wrapping element. cursor: not-allowed; */ fill: var(--color-border-gray) !important; pointer-events: none !important; } /* For hidden elements that need to influence layout and/or are only temporarily * hidden use [hidden=until-found] instead of [hidden] to: * - avoid hiding with `display: none` as `display` may be overridden by * selectors with greater specificity and element may become visible, * - use `visibility: collapse` for hiding, to avoid excessive resizing. * TODO: change to `until-found` after upgrade to Rails > 8.1.4 (#59338) * - change hidden values in index s * - check if toggleAttribute("hidden") works properly (use turbo action #hide?) [hidden=until-found] { visibility: collapse; }*/ [hidden] { display: revert; visibility: collapse; } /* Color coding of input controls' background: * blue - target for interaction with pointer, * gray - target for interaction with keyboard, * red - destructive, non-undoable action. */ /* TODO: merge selectors using :is() */ a, button, details, input, select, summary, textarea { background-color: inherit; font: inherit; } details, input, select { text-align: inherit; } input, select, summary, textarea { border: 1px solid var(--color-gray); border-radius: 0.25em; padding: 0.2em 0.4em; } svg { height: 1.4em; margin: 0 0.2em 0 0; width: 1.4em; } svg:last-child { margin-right: 0; } textarea { margin: 0; } input[type=checkbox] { accent-color: var(--color-blue); appearance: none; -webkit-appearance: none; display: flex; height: 1.1em; margin: 0; padding: 0; width: 1.1em; } input[type=checkbox]:checked { appearance: checkbox; -webkit-appearance: checkbox; } /* Hide spin buttons of . */ /* TODO: add spin buttons inside : before (-) and after (+) input. */ input[type=number] { appearance: textfield; -moz-appearance: textfield; text-align: end; } input::-webkit-inner-spin-button { -webkit-appearance: none; } input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } table { border: none; border-spacing: 0; font-size: 0.85rem; } /* Text color of table form controls: * - black for row/table forms, * - inherited for internal (column specific) buttons/forms. */ table input, table select, table summary, table textarea { border-color: var(--color-border-gray); } table input, table select, table textarea { padding-block: 0.375em; } table form input, table form select, table form summary, table form textarea { color: inherit; } table svg:not(:only-child) { height: 1.25em; width: 1.25em; } input:focus-visible, /* TODO: select:focus-visible is redundant with -within? */ select:focus-visible, select:focus-within, /* TODO: how to achieve `summary:focus-within` for `::details-content`? */ summary:focus-visible, textarea:focus-visible { accent-color: var(--color-dark-blue); background-color: var(--color-focus-gray); color: black; } input:hover, select:hover, summary:hover, textarea:hover { border-color: var(--color-blue); outline: 1px solid var(--color-blue); } select:hover, summary:hover { color: black; cursor: pointer; } /* TODO: style
/ focus to match . * `.link`: any other . * `.tab`: tab-styled . */ .button, .link, .tab { cursor: pointer; text-decoration: none; white-space: nowrap; } .button, .tab { align-items: center; color: var(--color-gray); display: flex; fill: var(--color-gray); font-weight: bold; justify-content: center; } .button { border: 1px solid var(--color-gray); border-radius: 0.25em; font-size: 0.8rem; padding: 0.6em 0.5em; width: fit-content; } .link { color: inherit; text-decoration: underline 1px var(--color-border-gray); text-underline-offset: 0.25em; } .auxiliary { border-color: var(--color-nav-gray); color: var(--color-nav-gray); fill: var(--color-nav-gray); } table .button { border-color: var(--color-border-gray); font-weight: normal; height: 100%; padding: 0.4em; width: 100%; } .button:focus-visible, .tab:focus-visible, .tab:hover { background-color: var(--color-focus-gray); } .button:hover { background-color: var(--color-blue); border-color: var(--color-blue); color: white; fill: white; } .dangerous:hover { background-color: var(--color-red); border-color: var(--color-red); } .link:focus-visible { text-decoration-color: var(--color-gray); } .link:hover { color: var(--color-blue); text-decoration-color: var(--color-blue); } /* NOTE: collapse gaps around empty rows (`topside`) once possible with * `grid-collapse` property and remove alternative `grid-template-areas`. * https://github.com/w3c/csswg-drafts/issues/5813 */ body { display: grid; gap: 0.8em; grid-template-areas: "header header header" "nav nav nav" "leftside main rightside"; grid-template-columns: 1fr minmax(max-content, 2fr) 1fr; font-family: system-ui; margin: 0.4em; } body:has(> .topside-area) { grid-template-areas: "header header header" "nav nav nav" "leftside topside rightside" "leftside main rightside"; } header { grid-area: header; } /* TODO: change .navigation ->
than (29px) */ .items-table:has(> tbody > tr > td) { border: 1px solid var(--color-border-gray); border-radius: 0.25em; } .items-table:has(> tbody > tr > td) caption { display: none; } .items-table tbody:not(:has(> tr > td)) { visibility: collapse; } .items-table th, .items-table tr:where(:hover) { background-color: var(--color-focus-gray); } .items-table th { font-size: 0.8rem; padding: 0.75em 0 0.75em 1em; text-align: center; } .items-table th:last-child { padding-inline-end: 0.4em; } .items-table td { border-top: 1px solid var(--color-border-gray); height: 2.4em; padding: 0.1em 0.5em; } .items-table td[style*="--depth"] { padding-inline-start: calc(1em + var(--depth) * 0.8em); } .items-table td:has(> .button, > :where(form) > .button), .items-table td:last-child { padding-inline-end: 0.1em; } /* Vertically align text inside form controls with ordinary data cells. */ .items-table :is(input, select, textarea) { margin-inline: calc(-0.4em - 0.9px); } /* For to fill table cell completely, we use an `::after` pseudoelement. */ /* TODO: expand to whole row? will require adjusting z-index on inputs/buttons */ .items-table td:has(> .link) { position: relative; } .items-table .link::after { content: ''; inset: -1px 0 0 0; position: absolute; } .items-table .flex { gap: 0.4em; justify-content: end; } .items-table .dropzone { position: relative; } .items-table .dropzone::after { content: ''; inset: 1px 0 0 0; position: absolute; outline: 2px dashed var(--color-blue); outline-offset: -1px; z-index: var(--z-index-table-row-outline); } .items-table .handle { cursor: grab; } .items-table .form td { vertical-align: top; } .items-table td:not(:first-child), .grayed { color: var(--color-table-gray); fill: var(--color-gray); } .items-table td:has(> svg:only-child) { text-align: center; } .center { margin: 0 auto; } .hexpand { width: 100%; } .flex { display: flex; gap: 0.8em; } .flex.reverse { flex-direction: row-reverse; } .flex.vertical { flex-direction: column; } .hint { color: var(--color-table-gray); font-style: italic; font-size: 0.9rem; text-align: center; } .hmin50 { min-width: 50%; } .hminnumber { min-width: 5em; } .hmintext { min-width: 6em; } .hstretch { /* `width` conflicts with /