1
0
watterblock/style.css
Adrian Wannenmacher 7e7410a406
improve design of session view
This improves the design of the session view a lot. However, several
things still need to be done:

1. The rules section is not styled.

2. The session list is not styled.

3. The design is not responsive yet. This will take longer, as the base
   view will need to be overhauled substantially to take advantage of
   wider screens.

4. A light mode needs to be added.
2026-03-03 01:45:14 +01:00

244 lines
3.6 KiB
CSS

html {
height: 100%;
font-family: sans-serif;
--color-regular-text: white;
--color-regular-background: lch(from black calc(l + 10) c h);
--color-alter-text: white;
--color-alter-background: black;
--color-primary-text: black;
--color-primary-background: lch(from orange calc(l + 10) c h);
color: var(--color-regular-text);
background-color: var(--color-regular-background);
}
body {
min-height: 100%;
height: 1px;
display: flex;
flex-direction: column;
}
h1 {
font-size: 2em;
margin: 0;
}
h2 {
font-size: 1.75em;
margin: 0;
}
h3 {
font-size: 1.5em;
margin: 0;
}
h4 {
font-size: 1.35em;
margin: 0;
}
h5 {
font-size: 1.25em;
margin: 0;
}
h6 {
font-size: 1.1em;
margin: 0;
}
button {
border: none;
border-radius: 5px;
color: var(--color-primary-text);
background: var(--color-primary-background);
padding: 1em 1em;
margin: 1em;
&:disabled {
color: hsl(from var(--color-primary-text) h s calc(l + 25));
background-color:
hsl(from var(--color-primary-background) h s calc(l + 25));
}
}
header.layout {
display: flex;
align-items: center;
background-color: var(--color-alter-background);
color: var(--color-alter-text);
>* {
padding: 0.5em 0.25em;
font-size: 2em;
color: inherit;
text-decoration: none;
margin: 0;
&:first-child {
padding-left: 0.5em;
padding-right: 0.5em;
}
&:nth-child(2) {
padding-left: 0;
}
&:last-child {
padding-right: 0.5em;
}
}
}
main.layout {
flex-grow: 1;
}
.session-view {
display: flex;
flex-direction: column;
min-height: 100%;
gap: 1em;
>* {
padding-left: 1rem;
padding-right: 1rem;
}
>:first-child {
padding-top: 1rem;
}
>:last-child {
padding-bottom: 1rem;
}
.session-view-header {
display: flex;
justify-content: space-between;
align-items: center;
* {
margin: 0;
}
}
>.spacer {
flex-grow: 1;
}
table {
font-size: 1.5em;
table-layout: fixed;
width: 100%;
text-align: center;
border-spacing: 0;
}
th,
td {
border-right: 1px solid var(--color-regular-text);
&:last-child {
border-right: none;
}
}
thead {
border-bottom: 1px solid var(--color-regular-text);
position: sticky;
top: 0;
background: var(--color-regular-background);
th {
border-bottom: 3px double var(--color-regular-text);
padding: 0.5em 0;
}
}
tbody {
tr:last-child {
td {
border-bottom: 1px solid var(--color-regular-text);
}
}
&:last-of-type {
tr:last-child {
td {
border-bottom: none;
}
}
}
min-height: 5px;
}
}
.current-round {
display: grid;
grid-template-areas:
"title title title title"
"they-raise current-points current-points we-raise"
"they-win they-win we-win we-win";
grid-template-columns: 1fr auto auto 1fr;
gap: 1em;
background: var(--color-regular-background);
position: sticky;
bottom: 0;
padding: 1em;
color: var(--color-alter-text);
background-color: var(--color-alter-background);
button {
margin: 0;
}
>h3 {
grid-area: title;
margin: 0;
}
>.current-points {
grid-area: current-points;
align-content: center;
font-size: 2em;
}
>.they-raise {
grid-area: they-raise;
}
>.we-raise {
grid-area: we-raise;
}
>.they-win {
grid-area: they-win;
}
>.we-win {
grid-area: we-win;
}
}
.continue {
position: sticky;
bottom: 0;
color: var(--color-alter-text);
background-color: var(--color-alter-background);
padding: 1em;
button {
margin: 0;
width: 100%;
}
}