/* * 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: review styles with multiple selectors and try to convert them to the same * specificity. */ :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? */ [disabled] { border-color: var(--color-border-gray) !important; color: var(--color-border-gray) !important; /* NOTE: cannot set cursor with `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; } /* [hidden] submit elements cannot have `display` set as it makes them visible. */ [hidden] { display: none !important; } /* Color coding of input controls' background: * blue - target for interaction with pointer, * gray - target for interaction with keyboard, * red - destructive, non-undoable action. */ button, details, input, select, 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, 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; } input::-webkit-inner-spin-button { -webkit-appearance: none; } input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } input:focus-visible, 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); } input:hover, select:hover, summary:hover, textarea:hover { border-color: var(--color-blue); outline: 1px solid var(--color-blue); } select:hover, summary:hover { cursor: pointer; } input:invalid, select:invalid, textarea:invalid { border-color: var(--color-red); outline-color: var(--color-red); } /* `.button`: button-styled ,