forked from MapComplete/MapComplete
Refactoring: overhaul of the visual style with CSS
This commit is contained in:
parent
a1f5032232
commit
7f1e8d3f9c
37 changed files with 1280 additions and 741 deletions
|
@ -825,6 +825,11 @@ video {
|
|||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.mx-2 {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.mr-2 {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
@ -1055,6 +1060,10 @@ video {
|
|||
max-height: 6rem;
|
||||
}
|
||||
|
||||
.max-h-12 {
|
||||
max-height: 3rem;
|
||||
}
|
||||
|
||||
.min-h-\[8rem\] {
|
||||
min-height: 8rem;
|
||||
}
|
||||
|
@ -1281,6 +1290,10 @@ video {
|
|||
row-gap: 0.25rem;
|
||||
}
|
||||
|
||||
.self-start {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.self-end {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
@ -1307,6 +1320,10 @@ video {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.overflow-ellipsis {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
@ -1443,11 +1460,6 @@ video {
|
|||
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-300 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-black {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
||||
|
@ -1463,6 +1475,11 @@ video {
|
|||
background-color: rgb(224 231 255 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-300 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-red-500 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
|
||||
|
@ -1792,6 +1809,12 @@ video {
|
|||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.transition-shadow {
|
||||
transition-property: box-shadow;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.ease-in-out {
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
@ -1816,23 +1839,32 @@ video {
|
|||
/* A colour scheme to indicate an error or warning */
|
||||
--alert-color: #fee4d1;
|
||||
--alert-foreground-color: var(--foreground-color);
|
||||
--low-interaction-background: #eeeeee;
|
||||
--low-interaction-foreground: black;
|
||||
--low-interaction-contrast: #ff00ff;
|
||||
--interactive-background: #dddddd;
|
||||
--interactive-foreground: black;
|
||||
--interactive-contrast: #ff00ff;
|
||||
--button-background: #737373;
|
||||
--button-foreground: white;
|
||||
/**
|
||||
* Base colour of interactive elements, mainly the 'subtle button'
|
||||
* @deprecated
|
||||
*/
|
||||
--subtle-detail-color: #dbeafe;
|
||||
--subtle-detail-color-contrast: black;
|
||||
--subtle-detail-color-light-contrast: lightgrey;
|
||||
/**
|
||||
* A stronger variant of the 'subtle-detail-colour'
|
||||
* Used as subtle button hover
|
||||
*/
|
||||
--unsubtle-detail-color: #bfdbfe;
|
||||
--unsubtle-detail-color-contrast: black;
|
||||
--catch-detail-color: #3a3aeb;
|
||||
--catch-detail-color-contrast: white;
|
||||
--catch-detail-color: black;
|
||||
/*#3a3aeb;*/
|
||||
--catch-detail-foregroundcolor: white;
|
||||
--catch-detail-color-contrast: #fb3afb;
|
||||
--image-carousel-height: 350px;
|
||||
}
|
||||
|
||||
/***********************************************************************\
|
||||
* Various tweaks and settings to make some behaviours more predictable *
|
||||
\***********************************************************************/
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
|
@ -1852,67 +1884,311 @@ img {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.no-images img {
|
||||
/* Used solely in 'imageAttribution' */
|
||||
display: none;
|
||||
li {
|
||||
margin-left: 0.5em;
|
||||
padding-left: 0.2em;
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
.text-white a {
|
||||
/* Used solely in 'imageAttribution' */
|
||||
color: var(--background-color);
|
||||
li::marker {
|
||||
content: "•";
|
||||
}
|
||||
|
||||
.weblate-link {
|
||||
/* Weblate-links are the little translation icon next to translatable sentences. Due to their special nature, they are exempt from some rules */
|
||||
h1 {
|
||||
font-size: x-large;
|
||||
margin-top: 0.6em;
|
||||
margin-bottom: 0.4em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a {
|
||||
h2 {
|
||||
font-size: large;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: larger;
|
||||
margin-top: 0.6em;
|
||||
margin-bottom: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p {
|
||||
padding-top: 0.1em;
|
||||
}
|
||||
|
||||
input {
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.btn {
|
||||
line-height: 1.25rem;
|
||||
--tw-text-opacity: 1;
|
||||
color: var(--catch-detail-color-contrast);
|
||||
--tw-bg-opacity: 1;
|
||||
/************************* BIG CATEGORIES ********************************/
|
||||
|
||||
/**
|
||||
* The main classes that dictate the structure of the entire app,
|
||||
* and some interactive elements
|
||||
*/
|
||||
|
||||
.subtle-background {
|
||||
background: var(--subtle-detail-color);
|
||||
color: var(--subtle-detail-color-contrast);
|
||||
}
|
||||
|
||||
.normal-background {
|
||||
background: var(--background-color);
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.low-interaction {
|
||||
background: var(--low-interaction-background);
|
||||
color: var(--low-interaction-foreground)
|
||||
}
|
||||
|
||||
.interactive {
|
||||
background: var(--interactive-background);
|
||||
color: var(--interactive-foreground)
|
||||
}
|
||||
|
||||
.border-interactive {
|
||||
border: 2px dashed var(--catch-detail-color-contrast);
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
/******************* Styling of input elements **********************/
|
||||
|
||||
/**
|
||||
* This very important section defines what the various input elements look like within the 'low-interaction' and 'interactive'-blocks
|
||||
*/
|
||||
|
||||
button.disabled {
|
||||
cursor: default;
|
||||
border: 2px dashed var(--button-background);
|
||||
background: unset;
|
||||
color: unset;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
button.disabled:hover {
|
||||
cursor: default;
|
||||
border: 2px dashed var(--button-background);
|
||||
background: unset;
|
||||
color: unset;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border: 2px solid var(--catch-detail-color-contrast);
|
||||
background-color: var(--catch-detail-color);
|
||||
color: var(--catch-detail-foregroundcolor);
|
||||
}
|
||||
|
||||
button:hover img {
|
||||
background: var(--low-interaction-background);
|
||||
border-radius: 100rem;
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-flex;
|
||||
border-radius: 1.5rem;
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 1.25rem;
|
||||
line-height: 1.25rem;
|
||||
margin: 0.2rem;
|
||||
padding: 0.4rem;
|
||||
padding-left: 0.6rem;
|
||||
padding-right: 0.6rem;
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
transition: 100ms;
|
||||
color: var(--button-foreground);
|
||||
background: var(--button-background);
|
||||
/*-- invisible border: rendered on hover*/
|
||||
border: 3px solid var(--unsubtle-detail-color);
|
||||
border: 2px solid var(--button-background);
|
||||
border-radius: 0.5rem;
|
||||
transition: all 250ms;
|
||||
--tw-text-opacity: 1;
|
||||
--tw-bg-opacity: 1;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
border: 3px solid var(--catch-detail-color);
|
||||
button .button-shadow {
|
||||
box-shadow: 0 5px 10px #88888888;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
button.selected {
|
||||
background-color: var(--catch-detail-color);
|
||||
-webkit-filter: saturate(0.5);
|
||||
filter: saturate(0.5);
|
||||
border-color: var(--catch-detail-color);
|
||||
color: var(--catch-detail-foregroundcolor);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
button.selected svg path {
|
||||
fill: var(--catch-detail-foregroundcolor) !important;
|
||||
}
|
||||
|
||||
button svg path {
|
||||
fill: var(--button-foreground) !important;
|
||||
}
|
||||
|
||||
.interactive button.disabled svg path {
|
||||
fill: var(--interactive-foreground) !important;
|
||||
}
|
||||
|
||||
.low-interaction button.disabled svg path {
|
||||
fill: var(--low-interaction-foreground) !important;
|
||||
}
|
||||
|
||||
.normal-background button.disabled svg path {
|
||||
fill: var(--foreground-color) !important;
|
||||
}
|
||||
|
||||
button.disabled.secondary:hover {
|
||||
background: unset;
|
||||
color: unset;
|
||||
}
|
||||
|
||||
button.secondary {
|
||||
background: var(--low-interaction-background);
|
||||
color: var(--low-interaction-foreground);
|
||||
border-color: var(--button-background);
|
||||
}
|
||||
|
||||
.interactive button.secondary {
|
||||
background: var(--interactive-background);
|
||||
color: var(--interactive-foreground);
|
||||
}
|
||||
|
||||
button.secondary svg path {
|
||||
fill: var(--low-interaction-foreground) !important;
|
||||
transition: all 250ms;
|
||||
}
|
||||
|
||||
button.secondary.disabled {
|
||||
background: unset;
|
||||
color: var(--low-interaction-foreground);
|
||||
}
|
||||
|
||||
button.secondary.disabled svg path {
|
||||
fill: var(--low-interaction-foreground) !important;
|
||||
}
|
||||
|
||||
button.secondary:hover {
|
||||
background-color: var(--catch-detail-color);
|
||||
-webkit-filter: unset;
|
||||
filter: unset;
|
||||
color: var(--catch-detail-foregroundcolor);
|
||||
border-color: var(--catch-detail-color-contrast);
|
||||
}
|
||||
|
||||
.btn-disabled {
|
||||
-webkit-filter: saturate(0.3);
|
||||
filter: saturate(0.3);
|
||||
cursor: default;
|
||||
button.secondary:hover svg path {
|
||||
fill: var(--catch-detail-foregroundcolor) !important;
|
||||
}
|
||||
|
||||
.btn-disabled:hover {
|
||||
border: 3px solid var(--unsubtle-detail-color);
|
||||
button.secondary.disabled:hover svg path {
|
||||
fill: var(--low-interaction-foreground) !important;
|
||||
}
|
||||
|
||||
label {
|
||||
/**
|
||||
* Label should _contain_ the input element
|
||||
*/
|
||||
border: 2px solid var(--interactive-background);
|
||||
padding: 0.25rem;
|
||||
padding-right: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--low-interaction-background);
|
||||
width: 100%;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
transition: all 250ms;
|
||||
}
|
||||
|
||||
label:hover {
|
||||
background-color: var(--catch-detail-color);
|
||||
color: var(--catch-detail-foregroundcolor);
|
||||
border: 2px solid var(--interactive-contrast)
|
||||
}
|
||||
|
||||
label img {
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.25rem;
|
||||
background: var(--low-interaction-background);
|
||||
}
|
||||
|
||||
label svg path {
|
||||
transition: all 250ms;
|
||||
}
|
||||
|
||||
label:hover svg path {
|
||||
fill: var(--catch-detail-foregroundcolor) !important;
|
||||
}
|
||||
|
||||
label.checked {
|
||||
border: 2px solid var(--foreground-color);
|
||||
}
|
||||
|
||||
/************************* OTHER CATEGORIES ********************************/
|
||||
|
||||
/**
|
||||
* Smaller categories which convey some semantic information but don't define bigger blocks.
|
||||
* As they are _semantic_ categories, they can be styled
|
||||
*/
|
||||
|
||||
.thanks {
|
||||
/* The class to indicate 'operation successful' or 'thank you for contributing' */
|
||||
background-color: #43d904;
|
||||
font-weight: bold;
|
||||
border-radius: 1em;
|
||||
margin: 0.25em;
|
||||
text-align: center;
|
||||
padding: 0.15em 0.3em;
|
||||
}
|
||||
|
||||
.alert {
|
||||
/* The class to convey important information, e.g. 'invalid', 'something went wrong', 'warning: testmode', ... */
|
||||
background-color: var(--alert-color);
|
||||
color: var(--alert-foreground-color);
|
||||
font-weight: bold;
|
||||
border-radius: 1em;
|
||||
margin: 0.25em;
|
||||
text-align: center;
|
||||
padding: 0.15em 0.3em;
|
||||
}
|
||||
|
||||
.subtle {
|
||||
/* For all information that is not important for 99% of the users */
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.link-underline .subtle a {
|
||||
-webkit-text-decoration: underline 1px #7193bb88;
|
||||
text-decoration: underline 1px #7193bb88;
|
||||
color: #7193bb;
|
||||
}
|
||||
|
||||
.literal-code {
|
||||
/* A codeblock */
|
||||
display: inline-block;
|
||||
background-color: lightgray;
|
||||
padding: 0.1rem;
|
||||
padding-left: 0.35rem;
|
||||
padding-right: 0.35rem;
|
||||
word-break: break-word;
|
||||
color: black;
|
||||
box-sizing: border-box;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.interactive .literal-code {
|
||||
background-color: #b3b3b3;
|
||||
}
|
||||
|
||||
/************************** UTILITY ************************/
|
||||
|
||||
/**
|
||||
* Utility classes are there for a specific function to pin down browser behaviour (and cannot be changed)
|
||||
*/
|
||||
|
||||
.text-white a {
|
||||
/* Used solely in 'imageAttribution' and in many themes*/
|
||||
color: var(--background-color);
|
||||
}
|
||||
|
||||
.block-ruby {
|
||||
display: block ruby;
|
||||
}
|
||||
|
||||
.rounded-left-full {
|
||||
|
@ -1925,6 +2201,11 @@ a {
|
|||
border-top-right-radius: 999rem;
|
||||
}
|
||||
|
||||
.no-images img {
|
||||
/* Used solely in 'imageAttribution' and in many themes for the label*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
.link-underline a {
|
||||
-webkit-text-decoration: underline 1px var(--foreground-color);
|
||||
text-decoration: underline 1px var(--foreground-color);
|
||||
|
@ -1939,51 +2220,6 @@ a.link-underline {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-left: 0.5em;
|
||||
padding-left: 0.2em;
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: x-large;
|
||||
margin-bottom: 0. 4em;
|
||||
font-size: large;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
font-size: larger;
|
||||
margin-top: 0.6em;
|
||||
margin-bottom: 0;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
p {
|
||||
padding-top: 0.1em;
|
||||
}
|
||||
|
||||
li::marker {
|
||||
content: "•";
|
||||
}
|
||||
|
||||
.subtle-background {
|
||||
background: var(--subtle-detail-color);
|
||||
color: var(--subtle-detail-color-contrast);
|
||||
}
|
||||
|
||||
.normal-background {
|
||||
background: var(--background-color);
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.block-ruby {
|
||||
display: block ruby;
|
||||
}
|
||||
|
||||
.disable-links a {
|
||||
pointer-events: none;
|
||||
text-decoration: none !important;
|
||||
|
@ -2002,6 +2238,12 @@ li::marker {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.zebra-table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
/************************* MISC ELEMENTS *************************/
|
||||
|
||||
.selected svg:not(.noselect *) path.selectable {
|
||||
/* A marker on the map gets the 'selected' class when it's properties are displayed
|
||||
*/
|
||||
|
@ -2030,41 +2272,6 @@ li::marker {
|
|||
}
|
||||
}
|
||||
|
||||
/**************** GENERIC ****************/
|
||||
|
||||
.alert {
|
||||
background-color: var(--alert-color);
|
||||
color: var(--alert-foreground-color);
|
||||
font-weight: bold;
|
||||
border-radius: 1em;
|
||||
margin: 0.25em;
|
||||
text-align: center;
|
||||
padding: 0.15em 0.3em;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
box-shadow: 0 0 20px var(--shadow-color);
|
||||
}
|
||||
|
||||
.subtle {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.link-underline .subtle a {
|
||||
-webkit-text-decoration: underline 1px #7193bb88;
|
||||
text-decoration: underline 1px #7193bb88;
|
||||
color: #7193bb;
|
||||
}
|
||||
|
||||
.thanks {
|
||||
background-color: #43d904;
|
||||
font-weight: bold;
|
||||
border-radius: 1em;
|
||||
margin: 0.25em;
|
||||
text-align: center;
|
||||
padding: 0.15em 0.3em;
|
||||
}
|
||||
|
||||
@-webkit-keyframes slide {
|
||||
/* This is the animation on the marker to add a new point - it slides through all the possible presets */
|
||||
|
||||
|
@ -2093,47 +2300,6 @@ li::marker {
|
|||
}
|
||||
}
|
||||
|
||||
/***************** Info box (box containing features and questions ******************/
|
||||
|
||||
input {
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.literal-code {
|
||||
display: inline-block;
|
||||
background-color: lightgray;
|
||||
padding: 0.5em;
|
||||
word-break: break-word;
|
||||
color: black;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/** Switch layout **/
|
||||
|
||||
.small-image img {
|
||||
height: 1em;
|
||||
max-width: 1em;
|
||||
}
|
||||
|
||||
.small-image {
|
||||
height: 1em;
|
||||
max-width: 1em;
|
||||
}
|
||||
|
||||
.slideshow-item img {
|
||||
height: var(--image-carousel-height);
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.animate-height {
|
||||
transition: max-height 0.5s ease-in-out;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.zebra-table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.glowing-shadow {
|
||||
-webkit-animation: glowing 1s ease-in-out infinite alternate;
|
||||
animation: glowing 1s ease-in-out infinite alternate;
|
||||
|
@ -2149,6 +2315,20 @@ input {
|
|||
}
|
||||
}
|
||||
|
||||
/************************* LEGACY MARKER - CLEANUP BELOW ********************************/
|
||||
|
||||
.slideshow-item img {
|
||||
/* Legacy: should be replace when the image element is ported to Svelte*/
|
||||
height: var(--image-carousel-height);
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.animate-height {
|
||||
/* Legacy: should be replaced by headlessui disclosure in time */
|
||||
transition: max-height 0.5s ease-in-out;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.hover\:bg-unsubtle:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
||||
|
@ -2400,3 +2580,4 @@ input {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue