hibiscus/public/main.css
Rithas K e5962ebfe7
Fix textarea padding in Safari
Use `box-sizing: border-box` to include padding in the width of the textarea.

Also,
> Box-sizing should be border-box by default
from [csswg](https://wiki.csswg.org/ideas/mistakes)
2024-06-02 11:53:40 +05:30

112 lines
No EOL
2.7 KiB
CSS

/* Default theme */
:root {
/* Light theme */
--text-light: #454545;
--bg-light: #f5f0e1;
--clickable-light: #f85552;
--clickable-hover-light: #e66868;
--clickable-label-light: #f5f2ee;
--text-hover-light: #656565;
--textarea-bg-light: #f5f2ee;
--textarea-border-light: #454545;
/* Dark theme */
--text-dark: #f5f0e1;
--bg-dark: #2c2825;
--clickable-dark: #f85552;
--clickable-hover-dark: #e66868;
--clickable-label-dark: #f5f2ee;
--text-hover-dark: #656565;
--textarea-bg-dark: #383030;
--textarea-border-dark: #454545;
}
* {
box-sizing: border-box;
}
body {
color: var(--text-light);
background-color: var(--bg-light);
margin: auto auto;
max-width: 640px;
padding: 1em;
line-height: 1.4;
font-family: serif;
min-height: 85vh;
display: flex;
flex-direction: column;
}
a, a:visited { color: var(--clickable-light); }
a:hover, a:visited:hover { color: var(--clickable-hover-light); }
a.no-accent, a.no-accent:visited { color: var(--text-light); }
a.no-accent:hover, a.no-accent:visited:hover { color: var(--text-hover-light); }
h2 { margin-bottom:12px; }
.list-title { margin-bottom: 0}
.list-desc { margin-top: 0 }
textarea, input {
background: var(--textarea-bg-light);
max-width: 640px;
width: 100%;
display: block;
resize: vertical;
outline: 0;
box-shadow: none;
border: 0.0625em solid var(--textarea-border-light);
margin-bottom: 1em;
font-size: 18px;
}
input { height: 2.5em; }
button {
background-color: var(--clickable-light);
border: none;
color: var(--clickable-label-light);
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
margin: 4px 2px;
border-radius: 4px;
cursor: pointer;
max-width: 640px;
width: 100%;
}
button:hover { background-color: var(--clickable-hover-light); }
footer { margin-top: auto; }
header > h1, header > p {
margin-bottom: 0;
margin-top: 0;
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
body {
color: var(--text-dark);
background-color: var(--bg-dark);
}
textarea, input {
color: var(--text-dark);
background-color: var(--textarea-bg-dark);
border-color: var(--textarea-border-dark)
}
a, a:visited { color: var(--clickable-dark); }
a:hover, a:visited:hover { color: var(--clickable-hover-dark); }
a.no-accent, a.no-accent:visited { color: var(--text-dark); }
a.no-accent:hover, a.no-accent:visited:hover { color: var(--text-hover-dark); }
button {
background-color: var(--clickable-dark);
color: var(--clickable-label-dark);
}
button:hover { background-color: var(--clickable-hover-dark); }
}