Style modal close button (fix #12)

This commit is contained in:
Daniel Kluge 2022-02-05 23:11:56 +01:00
parent 5485bf3bfa
commit 616bc461c7
2 changed files with 35 additions and 6 deletions

View File

@ -61,7 +61,10 @@ Last updated: ${lastUpdate} | <a href="https://git.c0ntroller.de/c0ntroller/fron
<a href="javascript:void(0);" onClick={() => setVisible(false)}> <a href="javascript:void(0);" onClick={() => setVisible(false)}>
<div className={styles.modalClose}><div className={styles.modalCloseAlign}>X</div></div> <div className={styles.modalClose}><div className={styles.modalCloseAlign}>X</div></div>
</a> </a>
<div ref={containerRef} className={`${styles.modalContainer} asciidoc`}> <div className={styles.modalContainer}>
<div className={`${styles.modalText} asciidoc`} ref={containerRef}>
</div>
</div> </div>
</div>; </div>;
}; };

View File

@ -20,18 +20,21 @@
position: relative; position: relative;
} }
.modalText {
max-width: 45em;
margin: 0 auto;
}
.modalClose { .modalClose {
float: right; float: right;
position: relative; position: relative;
background: #555; background: #272b30;
border-radius: 50%; border-radius: 50%;
width: 2em; width: 2em;
height: 2em; height: 2em;
font-family: sans-serif; font-family: sans-serif;
margin-bottom: -20px; margin-bottom: 10px;
z-index: 100; z-index: 100;
/*text-align: center;*/
/*padding: auto 0;*/
} }
.modalCloseAlign { .modalCloseAlign {
@ -43,4 +46,27 @@
display: block; display: block;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
} }
/* Firefox */
.modalContainer {
scrollbar-width: auto;
scrollbar-color: var(--repl-color, #188a18) #272b30;
}
/* Chrome, Edge, and Safari */
.modalContainer::-webkit-scrollbar {
width: 16px;
}
.modalContainer::-webkit-scrollbar-track {
background: #272b30;
border-bottom-right-radius: 20px;
border-top-right-radius: 20px;
}
.modalContainer::-webkit-scrollbar-thumb {
background-color: var(--repl-color, #188a18);
border-radius: 20px;
border: none;
}