itsonus-blog/public/css/index.css

250 lines
4.2 KiB
CSS

/* Defaults */
:root {
--font-family: Century Gothic,Avant Garde,Avenir,TeXGyreAdventorRegular,Verdana,sans-serif;
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
}
/* Theme colors */
:root {
--color-gray-20: #e0e0e0;
--color-gray-50: #C0C0C0;
--color-gray-90: #333;
--background-color: #fff;
--text-color: rgba(0,0,10,.8);
--text-color-secondary: #004953;
--text-color-tertiary: #57c183;
--text-color-link: #004953;
--text-color-link-active: #004953;
}
/*@media (prefers-color-scheme: dark) {*/
/* :root {*/
/* --color-gray-20: #e0e0e0;*/
/* --color-gray-50: #C0C0C0;*/
/* --color-gray-90: #dad8d8;*/
/* !* --text-color is assigned to --color-gray-_ above *!*/
/* --text-color-link: #1493fb;*/
/* --text-color-link-active: #6969f7;*/
/* --text-color-link-visited: #a6a6f8;*/
/* --background-color: #15202b;*/
/* }*/
/*}*/
/* Global stylesheet */
* {
box-sizing: border-box;
}
html,
body {
padding: 0;
margin: 0;
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--background-color);
}
html {
overflow-y: scroll;
}
main {
max-width: 40em;
margin: 0 auto;
}
h1 {
color: var(--text-color-secondary);
font-style: normal;
font-size: 3em;
font-weight: 700;
}
h2 {
color: var(--text-color-secondary);
font-size: 1.7em;
font-style: normal;
font-weight: 700;
letter-spacing: .02em;
line-height: 1.7em;
margin-top: 0;
}
p:last-child {
margin-bottom: 0;
}
p {
line-height: 1.5;
margin: 1.5em 0;
}
li {
line-height: 1.5;
}
a {
color: var(--text-color-link);
}
a:hover {
color: var(--text-color-link-active);
}
main {
padding: 8rem 1rem 1rem;
}
main :first-child {
margin-top: 0;
}
table {
margin: 1em 0;
}
table td,
table th {
padding-right: 1em;
}
pre,
code {
font-family: var(--font-family-monospace);
}
pre,
pre[class*="language-"] {
margin: .5em 0;
line-height: 1.375; /* 22px /16 */
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
}
code {
word-break: break-all;
}
/* Header */
.main-header {
background: #fff;
box-shadow: 0 2px 8px rgba(0,0,0,.25);
position: fixed;
width: 100%;
z-index: 1000;
height: 60px;
}
.main-header div {
align-items: center;
display: flex;
margin: auto;
max-width: 1400px;
height: 60px;
}
.main-header-logo {
margin: 0 23px;
text-decoration: none;
}
.main-menu {
display: flex;
flex-grow: 1;
}
.nav {
display: flex;
flex-grow: 1;
align-items: baseline;
justify-content: space-around;
list-style: none;
margin: 0;
padding: 0;
}
/* Nav */
.nav-item {
display: inline-block;
font-weight: 900;
letter-spacing: .02em;
margin: 0;
padding: 0;
}
.nav-item a[href]:not(:hover) {
text-decoration: none;
}
.nav-item-active {
text-decoration: underline;
}
/*!* Posts list *!*/
/*.postlist {*/
/* list-style: none;*/
/* padding: 0;*/
/* padding-left: 1.5rem;*/
/*}*/
.postlist-item {
margin-bottom: 5rem;
}
.postlist-header h2 {
margin-bottom: 0;
}
.postlist-link {
flex-basis: calc(100% - 1.5rem);
padding-right: .5em;
text-decoration: none;
}
.postlist-footer {
text-align: right;
}
/* Tags */
.post-tag {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--text-color);
background: var(--text-color-tertiary);
padding: 4px;
font-size: 0.8125em; /* 13px /16 */
/*font-weight: 600;*/
border-radius: 5px;
text-decoration: none;
}
/* Tags list */
.post-metadata {
display: flex;
gap: .5em;
list-style: none;
padding: 0;
margin: 0;
}
.post-metadata time {
margin-right: 1em;
font-size: 0.8125em; /* 13px /16 */
color: rgba(0,0,10,.55);
}
.post-metadata li:first-child {
flex-grow: 1;
}
/* Direct Links / Markdown Headers */
.direct-link {
font-family: sans-serif;
text-decoration: none;
font-style: normal;
margin-left: .1em;
}
a[href].direct-link {
color: transparent;
}
a[href].direct-link:focus,
:hover > a[href].direct-link {
color: #aaa;
}