Files
les-briques-du-web-website/css/index.css
Horacio Gonzalez 286a9d0d93 Initial commit
2021-05-05 11:22:00 +02:00

168 lines
2.4 KiB
CSS

/**
* @file Defines styles common to all pages
* Custom properties are set in `_includes/shortcodes/css-root.js`
* @author Reuben L. Lillie <reubenlillie@gmail.com>
* @author Horacio Gonzalez <horacio.gonzalez@gmail.com>
* @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/--*CSS Custom Properties on MDN}
*/
/* Set box-sizing for all elements */
*:
*:before
*:after {
box-sizing: border-box;
}
/* Visually hide an element, but leave it available for screen readers */
.screen-reader-text {
clip: rect(0 0 0 0);
overflow: hidden;
position: absolute;
height: 1px;
width: 1px;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
font-weight: 500;
}
/* Layout */
.grid {
display: grid;
}
.gap {
gap: var(--base-unit);
}
body {
min-height: 100vh;
}
nav {
display: flex;
flex-wrap: wrap;
column-gap: 1em;
}
/* Margin */
.no-margin {
margin: 0;
}
/* Colors */
body {
background-color: var(--background-color);
color: var(--text-color);
}
time,
footer {
color: var(--gray);
}
code {
background-color: var(--grayscale-100);
border-radius: 3px;
color: var(--black);
hyphens: manual;
padding: 1px 3px;
}
nav a,
time {
font-weight: 700;
}
article p {
text-align: justify;
hyphens: manual;
}
time,
#site_footer {
font-size: small;
}
ul {
list-style: square;
}
/* Links */
a {
color: inherit;
text-decoration: none;
}
a:focus,
a:hover,
a:visited {
opacity: 0.8;
text-decoration: none;
}
nav a {
padding: 0.5em;
}
/* Border */
#site_header + nav {
border-top: var(--border);
border-bottom: var(--border);
}
#site_footer {
border-top: var(--border);
background-color: var(--header-background-color);
color: var(--header-text-color);
}
main img {
max-width: 100%;
}
nav {
margin-block-end: 1em;
}
nav a {
font-weight: normal;
text-decoration: none;
font-size: 0.75em;
}
article.card {
display: block;
max-width: min(calc(300px - 20px - 4px), 100%);
height: calc(300px - 20px - 4px);
border: 0px;
border-radius: 5px;
padding: 10px;
box-shadow: 3px 3px 5px 1px rgba(0, 0, 0, .4);
}
article.card > .card_content {
max-width: min(calc(300px - 20px - 4px), 100%);
height: calc(300px - 20px - 4px);
overflow: hidden;
}
article.card > .card_content > h2 {
font-size: 1.25em;
}
article.card > .card_content > h2 >a {
text-decoration: none;
}
header label .icon-menu {
display: block;
}