migrate CSS to SCSS
Rename all src/*.css to src/_*.scss partials and convert style.css to style.scss with SASS imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
30570cc931
commit
ccdfd37fe9
18 changed files with 1353 additions and 32 deletions
223
assets/css/src/_nav.scss
Normal file
223
assets/css/src/_nav.scss
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
#nav-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-color: var(--color-background);
|
||||
opacity: 0.7;
|
||||
z-index: 2;
|
||||
cursor: w-resize;
|
||||
}
|
||||
#nav-overlay:not(.nav-overlay--visible) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel {
|
||||
display: none;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
width: 100vw;
|
||||
height: 100dvh;
|
||||
top: 0;
|
||||
background-color: var(--color-background);
|
||||
outline: 1px solid var(--color-primary);
|
||||
transition: all 0.5s var(--curve-sine);
|
||||
z-index: 3;
|
||||
box-sizing: border-box;
|
||||
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.panel.panel--visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.panel header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background-color: var(--color-background);
|
||||
padding: var(--unit--vertical) var(--unit--horizontal);
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.sort-btns {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sort-btns button {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
|
||||
.sort-btns button:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
|
||||
.sort-btns button.active {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
|
||||
.search {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-top: var(--unit--vertical);
|
||||
background-color: var(--color-background);
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid var(--color-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search__input {
|
||||
all: unset;
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
padding: calc(var(--unit--vertical) / 4) 0;
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--color-background);
|
||||
color: var(--color-primary);
|
||||
font-size: var(--font-size-m);
|
||||
font-weight: var(--font-weight-light);
|
||||
|
||||
caret-color: var(--color-primary);
|
||||
}
|
||||
.search__input::placeholder {
|
||||
color: var(--color-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
letter-spacing: 1px;
|
||||
opacity: 0.55;
|
||||
}
|
||||
.search__icon {
|
||||
all: unset;
|
||||
position: absolute;
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
padding: 0.5rem;
|
||||
right: 0;
|
||||
/* transform: translateY(0.2rem); */
|
||||
|
||||
background-color: var(--color-primary);
|
||||
mask: var(--icon-search) no-repeat center;
|
||||
mask-size: contain;
|
||||
-webkit-mask: var(--icon-search) no-repeat center;
|
||||
-webkit-mask-size: contain;
|
||||
}
|
||||
button.search__icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.panel__collection {
|
||||
scroll-behavior: smooth;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: var(--unit--vertical) var(--unit--horizontal);
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
}
|
||||
.panel-close {
|
||||
position: fixed;
|
||||
box-sizing: border-box;
|
||||
bottom: 0;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
border-top: 1px solid var(--color-primary);
|
||||
font-size: var(--font-size-m);
|
||||
background-color: var(--color-background);
|
||||
padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal);
|
||||
margin-bottom: env(safe-area-inset-bottom);
|
||||
color: var(--color-primary);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* ================= LISTS ================= */
|
||||
|
||||
.panel__toggle-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--unit--vertical);
|
||||
}
|
||||
|
||||
.panel__toggle-icon {
|
||||
color: var(--color-secondary);
|
||||
font-size: var(--font-size-xl);
|
||||
}
|
||||
|
||||
/* ================= YEARS ================= */
|
||||
.panel__collection .panel__item:last-child {
|
||||
margin-bottom: 6rem;
|
||||
}
|
||||
.panel-item-content__edito {
|
||||
margin-bottom: calc(var(--unit--vertical) / 2);
|
||||
}
|
||||
|
||||
.panel-item-content__edito p:not(:last-child) {
|
||||
margin-bottom: var(--unit--vertical);
|
||||
}
|
||||
|
||||
button.see-more {
|
||||
margin-bottom: var(--unit--vertical);
|
||||
}
|
||||
|
||||
.panel-item-content__texts:not(.panel__collection .panel-item-content__texts) {
|
||||
padding: var(--unit--vertical) var(--unit--horizontal);
|
||||
}
|
||||
|
||||
/* ================= TEXT ITEM ================= */
|
||||
.panel .text:first-child,
|
||||
.panel .text:last-child {
|
||||
margin-bottom: calc(var(--unit--vertical) * 2);
|
||||
}
|
||||
|
||||
.panel__collection--years .text:first-child .text__title {
|
||||
display: inline-block;
|
||||
padding-left: var(--unit--horizontal);
|
||||
}
|
||||
|
||||
.panel .text__subtitle {
|
||||
margin-bottom: calc(var(--unit--vertical) / 4);
|
||||
}
|
||||
|
||||
.panel__collection--years .text:first-child .text__infos {
|
||||
padding-left: var(--unit--horizontal);
|
||||
}
|
||||
.panel__collection--years .text:first-child .text__infos::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
nav.panel {
|
||||
width: 40rem;
|
||||
}
|
||||
|
||||
.panel {
|
||||
z-index: 4;
|
||||
width: var(--padding-body);
|
||||
}
|
||||
|
||||
.panel-close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel--right {
|
||||
right: auto;
|
||||
left: calc(-100vw - 1px);
|
||||
}
|
||||
|
||||
.panel--right.open {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue