etiquette/frontends/etiquette_flask/static/common.css

312 lines
5.2 KiB
CSS

/*
Organization:
{
display and flexing
positioning and alignment
bounding box (width, margin, overflow, ...)
borders and shadows
backgrounds
foregrounds
misc
}
*/
:root
{
--color_site_theme: #00d8f4;
--color_3d_shadow: rgba(0, 0, 0, 0.5);
--color_3d_highlight: rgba(255, 255, 255, 0.5);
}
body
{
display: flex;
flex-direction: column;
margin: 8px;
background-color: var(--color_site_theme);
}
li
{
position:relative;
}
#header
{
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr auto;
grid-template-rows: auto;
margin-bottom: 4px;
}
.header_element
{
display: flex;
flex: 1;
justify-content: center;
background-color: rgba(0, 0, 0, 0.1);
}
.header_element:hover
{
background-color: #ffffd4;
}
.editor_input
{
width: 100%;
max-width: 800px;
}
.hidden
{
display: none !important;
}
#content_body
{
display: flex;
flex: 0 0 auto;
flex-direction: row;
}
.green_button
{
background-color: #6df16f;
}
.red_button
{
background-color: #ff4949;
}
.yellow_button
{
background-color: #ffea57;
}
.green_button,
.red_button,
.yellow_button
{
border-top: 2px solid var(--color_3d_highlight);
border-left: 2px solid var(--color_3d_highlight);
border-right: 2px solid var(--color_3d_shadow);
border-bottom: 2px solid var(--color_3d_shadow);
}
.green_button:active,
.red_button:active,
.yellow_button:active
{
border-top: 2px solid var(--color_3d_shadow);
border-left: 2px solid var(--color_3d_shadow);
border-right: 2px solid var(--color_3d_highlight);
border-bottom: 2px solid var(--color_3d_highlight);
}
.remove_tag_button,
.remove_tag_button_perm
{
/*position: absolute;*/
top: 3px;
vertical-align: middle;
width: 18px;
height: 14px;
padding: 0;
}
/*
The Remove button will be display:none by default, but is shown when the tag
is hovered over.
*/
.remove_tag_button
{
display: none;
}
.tag_object:hover + .remove_tag_button,
.remove_tag_button:hover,
.remove_tag_button_perm:hover
{
display:inline;
}
.photo_card
{
background-color: #ffffd4;
}
.photo_card_list
{
display: grid;
grid-template-columns: auto 1fr auto;
grid-template-rows: auto;
grid-template-areas:
"checkbox filename metadata";
max-width: 800px;
margin: 8px;
padding: 4px;
}
.photo_card_list:hover
{
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
}
.photo_card_list .photo_card_selector_checkbox
{
grid-area: checkbox;
}
.photo_card_grid
{
position: relative;
display: inline-grid;
grid-template-columns: auto auto;
grid-template-rows: auto 1fr auto;
grid-template-areas:
"thumbnail thumbnail"
"filename filename"
"tags metadata";
min-width: 150px;
max-width: 300px;
height: 200px;
padding: 8px;
margin: 8px;
border-radius: 8px;
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
}
.photo_card_grid .photo_card_selector_checkbox
{
position:absolute;
left:5px;
top:5px;
}
.photo_card_thumbnail
{
grid-area: thumbnail;
align-self: start;
justify-self: center;
}
.photo_card_thumbnail img
{
max-width: 100%;
}
.photo_card_filename
{
/*
The width of photo cards should be based on the aspect ratio of the
thumbnail image. Previously, I had problems where the card would be wider
than necessary because the file had a long name.
The min-width:100% + width:0 prevent the info div from controlling
card size, so we can prioritize the thumbnail instead.
*/
justify-self: start;
grid-area: filename;
z-index: 1;
overflow: hidden;
min-width: 100%;
width: 0;
max-height: 30px;
background-color: inherit;
word-break: break-word;
font-size: 12.8px;
}
.photo_card_grid .photo_card_filename
{
align-self: start;
}
.photo_card_list .photo_card_filename
{
align-self: center;
}
.photo_card_filename:hover
{
overflow: visible;
max-height: none;
}
.photo_card_tags
{
grid-area: tags;
align-self: end;
justify-self: start;
font-family: monospace;
font-size: 11px;
}
.photo_card_metadata
{
grid-area: metadata;
align-self: end;
justify-self: end;
font-family: monospace;
font-size: 11px;
}
.tag_object
{
border-radius: 2px;
background-color: #fff;
font-size: 0.9em;
text-decoration: none;
font-family: monospace;
line-height: 1.3;
}
#message_area
{
display: flex;
flex: 2;
flex-direction: column;
align-items: center;
max-height: 300px;
width: 100%;
height: 100%;
overflow-y: auto;
background-color: rgba(0, 0, 0, 0.1);
}
.message_bubble
{
width: 80%;
margin: 4px;
word-wrap: break-word;
}
.message_positive
{
background-color: #afa;
}
.message_negative
{
background-color: #faa;
}
#clipboard_tray
{
display: flex;
flex-direction: column;
position: fixed;
right: 8px;
bottom: 8px;
z-index: 10;
max-height: 80%;
min-width: 150px;
padding: 2px;
background-color: #ffffd4;
}
#clipboard_tray_expandbutton
{
flex: 1 0 auto;
width: 100%;
}
#clipboard_tray_body
{
width: 300px;
overflow-y: auto;
}
#clipboard_tray_toolbox
{
display: flex;
flex-direction: column;
}