slidev-theme-narduin/styles/base.css

227 lines
4.3 KiB
CSS
Raw Normal View History

2024-12-13 14:30:22 +01:00
/* BASE */
::placeholder {
color: var(--color-dark);
opacity: 0.8;
}
::selection,
::target-text {
color: var(--color-light-blue);
background-color: var(--color-dark-blue);
}
::target-text {
color: var(--color-soft-blue);
background-color: var(--color-blue);
}
::marker {
color: var(--color-brique);
}
body {
font-size: var(--size-0);
line-height: 1.5;
color: var(--color-dark);
background-color: var(--color-light-white);
accent-color: var(--color-brique);
}
:is(h1, h2, h3, h4, .h2, .h3, .h4) {
font-weight: bold;
}
:where(h1, h2, h3, h4, .h2, .h3, .h4) + * {
margin-block-start: var(--space-s);
}
:is(h1) {
max-inline-size: 20ch;
font-size: var(--size-5);
color: var(--color-dark-blue);
}
h2,
.h2 {
font-size: var(--size-3);
color: var(--color-dark-blue);
}
h3,
.h3 {
max-inline-size: initial;
font-size: var(--size-2);
letter-spacing: 0.05rem;
}
h4,
.h4 {
font-size: var(--size-2);
color: var(--color-dark);
}
h5,
.h5 {
font-size: var(--size-1);
color: var(--color-darkBlue);
}
a {
font-weight: 500;
color: var(--color-blue);
text-decoration: underline;
}
/* a:visited {
color: currentColor;
} */
a:hover,
a:focus {
text-decoration: none;
}
hr {
margin-block: var(--space-m-l);
block-size: 4px;
background-color: var(--color-dark);
}
hr.small {
margin-block: var(--space-xs);
block-size: 2px;
}
ul:not([role='list']),
ol:not([role='list']) {
padding-inline-start: 1rem;
}
ul:not([role='list']) > li + li,
ol:not([role='list']) > li + li {
margin-block-start: var(--space-xs);
}
.sr-only {
clip: rect(0 0 0 0);
clip-path: inset(50%);
block-size: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
inline-size: 1px;
}
.clean-button {
appearance: none;
-webkit-appearance: none;
cursor: pointer;
border: none;
background: none;
}
.btn {
padding: var(--space-2xs) var(--space-xs);
margin-block: var(--space-s);
display: inline-block;
font-size: var(--size-0);
font-weight: bold;
text-decoration: none;
border: 2px solid var(--color-blue);
border-radius: var(--radius-small);
color: var(--color-white);
background-color: var(--color-blue);
transition-property: color, background-color;
transition-duration: 0.3s;
transition-timing-function: ease;
}
.btn:hover,
.btn:focus {
color: var(--color-blue);
background-color: var(--color-white);
}
button[disabled] {
cursor: not-allowed;
color: var(--color-grey-dark);
border-color: var(--color-grey);
background-color: var(--color-white);
}
.highlight {
color: var(--color-blue);
}
/* clean style link */
.clean-link {
text-decoration: none;
font-weight: inherit;
color: currentColor;
}
.clean-link:hover {
text-decoration: none;
}
/* nice hover link */
.nice-link {
position: relative;
display: inline-block;
text-align: center;
text-decoration: none;
}
.nice-link:hover {
text-decoration: none;
}
.nice-link::after {
content: '';
position: absolute;
left: 0;
bottom: -2px;
inline-size: 100%;
block-size: 2px;
text-decoration: none;
transform: scaleX(0);
opacity: 1;
transform-origin: 100% 50%;
background-color: var(--color-brique);
}
.nice-link:hover::after {
transform: scaleX(1);
transform-origin: 0% 50%;
}
@media (prefers-reduced-motion: no-preference) {
.nice-link::after {
transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
}
/* blockquote */
blockquote {
margin: var(--space-s) 0;
padding: var(--space-s);
font-weight: normal;
line-height: 1.4;
border-left: 3px solid var(--color-blue);
border-radius: 3px;
background-color: var(--color-soft-blue);
}
blockquote cite {
font-weight: normal;
font-style: normal;
font-size: var(--size-0);
line-height: 1.2;
}
.wrapper {
/* GRID WRAPPER */
display: grid;
grid-template-columns: var(--grid-wrapper);
--_content-padding: var(--content-padding, var(--space-s));
column-gap: var(--_content-padding);
}
/* set content inside wrapper column */
:where(.wrapper, .slidev-layout) > * {
grid-column: wrapper;
}
/* set full width content to full grid */
:where(.wrapper, .slidev-layout) > .full-width {
/* calculate inline padding based on available space minus content space to align full-width content with wrapper content */
padding-inline: max(
calc((100vw - var(--content-width)) / 2),
var(--_content-padding)
);
grid-column: full;
}