fixin.me/app/assets/stylesheets/application.css

399 lines
7.3 KiB
CSS

/*
* 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_tree .
*= require_self
*/
*,
::before,
::after {
box-sizing: border-box;
}
::selection {
background-color: #009ade;
color: white;
}
:focus-visible {
outline: none;
}
body {
display: grid;
gap: 0.8em;
grid-template-areas:
"header header header"
"nav nav nav"
"leftside main rightside";
grid-template-columns: 1fr 0fr 1fr;
grid-template-rows: repeat(3, auto);
font-family: system-ui;
margin: 0.4em;
}
button,
input,
select {
background-color: inherit;
font: inherit;
}
/* blue - target for interaction with pointer */
/* gray - target for interaction with keyboard */
a,
button,
input[type=submit] {
align-items: center;
color: #a0a0a0;
cursor: pointer;
fill: #a0a0a0;
font-weight: bold;
text-decoration: none;
}
.button,
button,
input[type=submit] {
display: flex;
font-size: 0.8rem;
padding: 0.4em;
width: fit-content;
}
input:not([type=submit]).not([type=checkbox]),
select {
padding: 0.2rem 0.4rem;
}
.button,
button,
input,
select {
border: solid 1px #a0a0a0;
border-radius: 0.25em;
}
.button > svg,
.tab > svg,
button > svg {
height: 1.8em;
padding-right: 0.4em;
width: 1.8em;
}
input[type=checkbox] {
accent-color: #009ade;
appearance: none;
display: flex;
height: 1.1rem;
margin: 0rem;
width: 1.1rem;
-webkit-appearance: none;
}
input:hover,
select:hover {
border-color: #009ade;
outline: #009ade solid 1px;
}
select:hover {
cursor: pointer;
}
input:focus-visible,
select:focus-within,
select:focus-visible {
accent-color: #006c9b;
background-color: #f3f3f3;
}
input[type=checkbox]:checked {
appearance: checkbox;
-webkit-appearance: checkbox;
}
input[type=text]:read-only {
border: none;
padding-left: 0;
padding-right: 0;
}
input:read-only:focus-visible,
input:read-only:hover {
background: white;
}
.header {
display: flex;
gap: 0.8em;
grid-area: header;
justify-content: flex-end;
}
.navigation {
display: flex;
grid-area: nav;
}
.navigation > .tab + .tab.right {
margin-inline-start: 4%;
}
/* TODO: inactive tab color #d0d0d0 or #c7c7c7 */
.navigation > .tab {
border-bottom: solid 3px #c7c7c7;
display: flex;
flex: 1;
font-size: 1rem;
justify-content: center;
padding-block: 0.3em;
}
.navigation > .tab:hover {
border-bottom: solid 4px #009ade;
}
.navigation > .tab.active {
border-bottom: solid 4px;
color: #009ade;
fill: #009ade;
}
.leftside {
grid-area: leftside;
}
.main {
grid-area: main;
}
.rightside {
grid-area: rightside;
}
a.button:hover,
a.button.active:hover,
button:hover,
input[type=submit]:hover {
background-color: #009ade;
border-color: #009ade;
color: white;
fill: white;
}
a.button:focus-visible,
a.button.active:focus-visible,
button:focus-visible,
input[type=submit]:focus-visible {
background-color: #f3f3f3;
}
a.button:hover:focus-visible,
a.button.active:hover:focus-visible,
button:hover:focus-visible,
input[type=submit]:hover:focus-visible {
background-color: #006c9b;
border-color: #006c9b;
}
button.dangerous:hover {
background-color: #ff1f5b;
border-color: #ff1f5b;
}
button.dangerous:hover:focus-visible {
background-color: #b21237;
border-color: #b21237;
}
.flashes {
height: 2.1rem;
}
.flash {
align-items: center;
border-radius: 0.2rem;
color: white;
display: flex;
font-size: 1.0rem;
}
.flash.alert:before {
content: url('pictograms/alert-outline.svg');
height: 1.4rem;
margin: 0 0.5rem;
width: 1.4rem;
}
.flash.alert {
border-color: #ff1f5b;
background-color: #ff1f5b;
}
.flash.notice:before {
content: url('pictograms/check-circle-outline.svg');
height: 1.4rem;
margin: 0 0.5rem;
width: 1.4rem;
}
.flash.notice {
border-color: #009ade;
background-color: #009ade;
}
.flash button {
background-color: inherit;
border: inherit;
border-radius: inherit;
color: inherit;
cursor: pointer;
font-size: 1.4rem;
font-weight: bold;
margin-left:auto;
opacity: 0.6;
padding: 0.2rem 0.2rem;
}
.flash button:hover {
opacity: 1;
}
form table {
border-spacing: 0.8rem;
}
form tr td:first-child {
color: #a0a0a0;
font-size: 0.9rem;
padding-right: 0.25rem;
text-align: right;
}
form label.required {
font-weight: bold;
}
form label.error,
form td.error::after {
color: #ff1f5b;
}
form td.error {
display: -webkit-box;
}
form td.error::after {
content: attr(data-content);
font-size: 0.9rem;
margin-left: 1rem;
padding: 0.25rem 0;
position: absolute;
}
form em {
color: #707070;
font-size: 0.75rem;
font-weight: normal;
}
form input[type=submit] {
float: none;
font-size: 1rem;
margin: 1.5rem auto 0 auto;
padding: 0.75rem;
}
table.items {
border-spacing: 0;
border: solid 1px #dddddd;
border-radius: 0.25em;
font-size: 0.85rem;
text-align: center;
}
table.items thead {
font-size: 0.8rem;
}
table.items thead,
table.items tbody tr:hover {
background-color: #f3f3f3;
}
table.items th {
padding-block: 0.75em;
}
table.items th,
table.items td {
padding-inline: 1em 0;
}
table.items th:last-child {
padding-inline-end: 0.4em;
}
table.items td:last-child {
padding-inline-end: 0.1em;
}
table.items td {
border-top: solid 1px #dddddd;
padding-block: 0.1em;
}
/* TODO: change selector to td:has(a) when :has() available on FF.
* That will fix lack of padding for form elements in first column. */
table.items td:first-child {
padding: 0;
}
/* FIXME: size <a> to fill <td> keeping vertical alignment */
/* td:absolute > a:relative(0,0,0,0) > div:flex > span */
table.items a {
color: inherit;
display: block;
font: inherit;
line-height: 2.4;
padding-inline-start: 1em;
text-align: left;
}
table.items a.subunit {
padding-inline-start: 1.6em;
}
table.items td.actions {
display: flex;
gap: 0.4em;
justify-content: end;
}
table.items a:hover,
table.items a:focus-visible,
table.items a:hover:focus-visible {
text-decoration: underline;
text-decoration-thickness: 0.05rem;
text-underline-offset: 0.2rem;
}
table.items a:hover {
color: #009ade;
}
table.items a:focus-visible {
text-decoration-color: #a0a0a0;
}
table.items a:hover:focus-visible {
color: #006c9b;
}
table.items td:not(:first-child) {
color: #909090;
fill: #909090;
}
table.items svg {
height: 1.2rem;
vertical-align: middle;
width: 1.2rem;
}
table.items td.number {
text-align: right;
}
table.items .button,
table.items button,
table.items input[type=submit] {
font-weight: normal;
padding: 0.3em;
}
table.items select:not(:hover),
table.items button:not(:hover) {
border-color: #dddddd;
color: #909090;
}
table.items select:focus-within,
table.items select:focus-visible {
color: black;
}
.centered {
margin: 0 auto;
}
.unwrappable {
white-space: nowrap;
}