etiquette/frontends/etiquette_flask/static/css/common.css

269 lines
4.5 KiB
CSS
Raw Normal View History

/*
This file contains styles that I want on almost all webpages that I make,
not specific to one project.
*/
/*
These properties are used by javascript functions.
getComputedStyle(document.documentElement).getPropertyValue("--narrow").trim() === "1"
*/
@media screen and (min-width: 800px)
{
:root
{
--wide: 1;
}
}
@media screen and (max-width: 800px)
{
:root
{
--narrow: 1;
}
}
.hidden
{
display: none !important;
}
html
{
height: 100vh;
2019-09-10 22:32:35 +00:00
box-sizing: border-box;
color: var(--color_text_normal);
2019-09-10 22:32:35 +00:00
}
*, *:before, *:after
{
box-sizing: inherit;
color: inherit;
}
body
{
display: grid;
grid-template:
"header" auto
"content_body" 1fr
/1fr;
min-height: 100%;
margin: 0;
background-color: var(--color_primary);
}
a
{
color: var(--color_text_link);
cursor: pointer;
}
2018-11-05 02:36:17 +00:00
input, select, textarea
{
background-color: var(--color_textfields);
2018-11-05 02:36:17 +00:00
}
input:disabled,
select:disabled,
textarea:disabled
{
background-color: var(--color_text_placeholder);
}
2018-11-05 02:36:17 +00:00
input::placeholder, textarea::placeholder
{
color: var(--color_text_placeholder);
opacity: 1;
}
pre
2016-09-18 08:33:46 +00:00
{
white-space: pre-line;
2016-09-18 08:33:46 +00:00
}
2020-09-06 00:47:29 +00:00
.bold
{
font-weight: bold;
}
2016-09-18 08:33:46 +00:00
#header
{
grid-area: header;
display: flex;
flex-direction: row;
2017-03-31 02:34:39 +00:00
height: 18px;
margin: 8px;
background-color: var(--color_transparency);
}
2018-08-18 05:23:40 +00:00
#header button
{
border: 0;
cursor: pointer;
background-color: transparent;
2018-08-18 05:23:40 +00:00
}
2016-09-18 08:33:46 +00:00
.header_element
{
flex: 1;
display: flex;
2017-03-31 02:34:39 +00:00
justify-content: center;
2016-09-18 08:33:46 +00:00
}
.header_element:hover
{
background-color: var(--color_transparency);
}
#content_body
{
grid-area: content_body;
display: grid;
grid-auto-rows: min-content;
grid-gap: 8px;
margin: 8px;
}
#header:not(.hidden) + #content_body
{
/*
The header already has a margin.
*/
margin-top: 0;
2019-08-14 20:49:08 +00:00
}
2022-03-09 01:04:44 +00:00
.panel
{
background-color: var(--color_transparency);
border-radius: 5px;
padding: 8px;
}
button,
button *
{
color: var(--color_text_normal);
}
button:disabled
{
background-color: #cccccc !important;
}
button
{
border-top: 2px solid var(--color_highlight);
border-left: 2px solid var(--color_highlight);
border-right: 2px solid var(--color_shadow);
border-bottom: 2px solid var(--color_shadow);
}
button:active
{
border-top: 2px solid var(--color_shadow);
border-left: 2px solid var(--color_shadow);
border-right: 2px solid var(--color_highlight);
border-bottom: 2px solid var(--color_highlight);
}
.gray_button
{
background-color: #cccccc;
}
.green_button
2016-09-18 08:33:46 +00:00
{
background-color: #6df16f;
}
.red_button
{
background-color: #ff4949;
}
.yellow_button
{
background-color: #ffea57;
}
2020-09-03 18:54:14 +00:00
.tabbed_container
{
display: flex;
flex-direction: column;
}
.tabbed_container .tab_buttons
{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.tabbed_container .tab_button
{
/* outline: none; prevents the blue outline left after clicking on it */
outline: none;
flex: 1;
font-family: inherit;
font-size: 1.3em;
border-radius: 8px 8px 0 0;
background-color: transparent;
}
.tabbed_container .tab_button:hover
{
background-color: var(--color_transparency);
2020-09-03 18:54:14 +00:00
}
.tabbed_container .tab,
.tabbed_container .tab_button
{
border-width: 2px;
border-style: solid;
border-color: #888;
}
.tabbed_container .tab_button.tab_button_inactive
2020-09-03 18:54:14 +00:00
{
border-top-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
}
.tabbed_container .tab_button.tab_button_active
2020-09-03 18:54:14 +00:00
{
background-color: var(--color_transparency);
2020-09-03 18:54:14 +00:00
border-bottom-color: transparent;
}
.tabbed_container .tab
{
/* This will be set by javascript after the tabs have been initialized.
That way, the tab panes don't have a missing top border while the dom is
loading or if javascript is disabled.
/*border-top-color: transparent;*/
}
#message_area
{
display: grid;
grid-auto-flow: row;
grid-auto-rows: min-content;
grid-gap: 8px;
padding: 8px;
2017-03-31 02:34:39 +00:00
overflow-y: auto;
background-color: var(--color_transparency);
}
#message_area > :last-child
2016-09-18 08:33:46 +00:00
{
/*
For some reason, the message_area's 8px padding doesn't apply to the bottom
when the container is scrolled.
*/
margin-bottom: 8px;
}
2017-03-31 02:34:39 +00:00
.message_bubble
{
padding: 2px;
word-wrap: break-word;
2016-09-18 08:33:46 +00:00
}
2019-08-14 20:49:08 +00:00
.message_bubble *
{
color: var(--color_text_bubble);
2019-08-14 20:49:08 +00:00
}
.message_positive
2016-09-18 08:33:46 +00:00
{
background-color: #afa;
}
.message_negative
2016-09-18 08:33:46 +00:00
{
background-color: #faa;
2016-11-07 02:00:30 +00:00
}