stylus/msgbox/msgbox.css

178 lines
2.8 KiB
CSS
Raw Permalink Normal View History

2018-10-12 20:29:35 +00:00
:root {
--message-box-title: hsl(170, 40%, 69%);
--firebrick: hsl(0, 68%, 42%);
}
#message-box {
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
position: fixed;
2018-10-12 20:29:35 +00:00
background-color: var(--black-alpha-45);
animation: fadein .25s ease-in-out;
z-index: 9999990;
-moz-user-select: none;
}
#message-box > div {
top: 3rem;
right: 3rem;
min-width: 10rem;
max-width: 50vw;
min-height: 5rem;
max-height: 90vh;
position: fixed;
display: flex;
flex-direction: column;
2018-10-12 20:29:35 +00:00
box-shadow: 5px 5px 50px var(--black-alpha-25);
z-index: 9999991;
-moz-user-select: text;
}
#message-box.fadeout {
animation: fadeout .25s ease-in-out;
}
#message-box.center {
align-items: center;
justify-content: center;
}
#message-box.center #message-box-contents {
text-align: center;
}
2017-11-09 07:54:31 +00:00
#message-box.center #message-box-contents pre {
text-align: left;
}
#message-box.center > div {
top: unset;
right: unset;
}
2017-11-09 04:26:50 +00:00
#message-box.pre #message-box-contents {
white-space: pre-line;
font-family: monospace;
text-align: left;
2017-11-09 04:26:50 +00:00
}
#message-box-title {
font-weight: bold;
2018-10-12 20:29:35 +00:00
background-color: var(--message-box-title);
padding: .75rem 24px .75rem 52px;
font-size: 1rem;
position: relative;
2017-11-11 05:21:52 +00:00
min-height: 42px;
box-sizing: border-box;
}
#message-box-title::before {
content: "";
width: 0;
height: 0;
padding: 0 32px 32px 0;
background: url(/images/icon/32.png);
position: absolute;
left: .5rem;
top: 0;
bottom: 0;
margin: auto;
}
#message-box.danger #message-box-title {
2018-10-12 20:29:35 +00:00
background-color: var(--firebrick);
color: var(--white);
}
#message-box.danger #message-box-title::before {
background: url('/images/icon/32x.png');
}
#message-box.danger #message-box-contents {
font-weight: bold;
}
#message-box.danger #message-box-close-icon svg {
2018-10-12 20:29:35 +00:00
fill: var(--maroon);
}
2017-04-02 23:18:43 +00:00
#message-box.danger #message-box-close-icon svg:hover {
2018-10-12 20:29:35 +00:00
fill: var(--darker-maroon);
2017-04-02 23:18:43 +00:00
}
#message-box-close-icon {
cursor: pointer;
position: absolute;
2017-04-02 23:18:43 +00:00
right: 3px;
top: 4px;
}
#message-box-close-icon svg {
width: 16px;
height: 16px;
}
#message-box-contents {
overflow: auto;
padding: 1.5rem .75rem;
position: relative;
flex-grow: 9;
overflow-wrap: break-word;
2018-10-12 20:29:35 +00:00
outline: none;
}
2017-12-23 00:11:46 +00:00
#message-box-contents p:first-child {
margin-top: 0;
}
#message-box-contents p:last-child {
margin-bottom: 0;
}
#message-box-buttons {
padding: .75rem .375rem;
text-align: center;
}
.non-windows #message-box-buttons {
text-align: right;
direction: rtl;
}
#message-box-buttons button {
margin: 0 .375rem;
}
2017-12-05 21:14:21 +00:00
/* popup */
#message-box.stylus-popup {
margin: 0;
align-items: center;
justify-content: center;
}
#message-box.stylus-popup > div {
max-width: 90vw;
top: auto;
right: auto;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeout {
from {
opacity: 1;
}
to {
opacity: 0;
}
}