scss refactor: main.scss split into abstracts/global/pages partials, kebab-case (compiled css unchanged)

This commit is contained in:
2026-09-28 17:49:46 +02:00
parent fa13910d98
commit 74399a3823
18 changed files with 807 additions and 832 deletions
@@ -0,0 +1,21 @@
// ____
// | __ ) __ _ ___ ___
// | _ \ / _` / __|/ _ \
// | |_) | (_| \__ \ __/
// |____/ \__,_|___/\___|
@use "../abstracts/variables" as *;
a, a:visited{
text-decoration: none;
color: inherit;
transition: color 0.15s ease-out;
}
body{
margin: 0;
// background-color: green;
font-weight: $default_fwght;
line-height: 1.5;
}
@@ -0,0 +1,30 @@
@use "../../../fonts/epilogue/stylesheet" with ($font-path: "../fonts/epilogue");
body{
font-family: 'Epilogue';
font-weight: normal;
font-style: normal;
}
@mixin titre{
font-size: 1em;
}
// @mixin titre_h2{
// font-family: 'Fredoka';
// font-size: 3em;
// font-weight: 400;
// color: $bleu_typo;
// line-height: 1;
// }
// @mixin titre_h3{
// @include titre_h2();
// font-size: 2em;
// }
// @mixin titre_h4{
// @include titre_h2();
// font-size: 1.323em;
// }
@@ -0,0 +1,141 @@
// _ _ _
// | | | | | |
// | |_| | ___ __ _ __| | ___ _ __
// | _ |/ _ \/ _` |/ _` |/ _ \ '__|
// | | | | __/ (_| | (_| | __/ |
// \_| |_/\___|\__,_|\__,_|\___|_|
@use "../abstracts/variables" as *;
header[role="banner"]{
background-color: #fff;
// box-shadow: 0 -5px 15px #000;
.header-middle{
display: flex;
justify-content:space-between;
align-items: center;
padding: 0.2em 0;
}
#block-leshed-identitedusite{
a{
// color: ;
text-decoration: none;
font-size: 2em;
font-weight: 500;
margin-right: 0.5em;
// &:hover{
// color: $rose;
// }
}
}
.header-right{
// position: relative;
height:20px; width:20px;
cursor: pointer;
// background-color: green;
>div#burger-btn{
position:relative;
transition-duration: 0.5s;
transition-property: transform;
top: 8.5px;
&, &::before, &::after{
// position: absolute;
width:20px; height:3px;
background-color: #000;
}
&:hover{
&, &::before, &::after{
background-color: green;
}
}
&::before, &::after{
content: "";
position: absolute;
left: 0;
// background-color: red;
}
&::before{
top:6px;
}
&::after{
bottom: 6px;
}
&[opened]{
transform: rotate(90deg);
}
}
&>div.wrapper{
// fixed (et non absolute) pour échapper à l'overflow:hidden de
// .layout-container : sinon le débord pleine largeur (et donc le
// backdrop-filter) est rogné aux bords du conteneur centré.
position:fixed;
top:$header_height;
left: 0;
width:100vw;
padding: 0 calc((100vw - $layout_width) / 2) 0 calc((100vw - $layout_width) / 2);
background-color: rgba(255,255,255,0.3);
backdrop-filter: blur(7px);
height: 0;
overflow: hidden;
transition-duration: 0.5s;
&[opened]{
height: calc(100vh - $header_height);
}
nav#block-leshed-navigationprincipale{
// width: $layout_width;
// margin: 0 auto;
padding-top: 10px;
// background-color: #fff;
>ul{
margin: 0;
padding:0;
li{
list-style: none;
a{
font-size: 4em;
font-weight: 200;
filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff);
}
}
}
}
div#block-leshed-selecteurdelangue{
ul{
margin:0;
padding:0;
li{
list-style: none;
padding:0;
display: inline-block;
font-size: 2em;
&:first-child{
&:after{
content: " /";
font-weight: 200;
}
}
&:last-child{
padding-left: 0.3em;
}
&.is-active{
font-weight: 400;
}
}
}
}
}
}
} // end of header[role="banner"]{
@@ -0,0 +1,45 @@
// _ _
// | | | |
// | | __ _ _ _ ___ _ _| |_
// | | / _` | | | |/ _ \| | | | __|
// | |___| (_| | |_| | (_) | |_| | |_
// \_____/\__,_|\__, |\___/ \__,_|\__|
// __/ |
// |___/
@use "../abstracts/variables" as *;
div.layout-container{
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
max-width:$layout_width;
margin: 0 auto;
header[role="banner"]{
display: block;
position: relative;
padding: 0.5em 0;
flex: 1 1 $header_height;
z-index: 100;
// position: fixed;
// top:0;
// width: 100%;
height: $header_height;
min-height: $header_height;
}
main[role="main"]{
flex: 1 1 auto;
// padding:5em 0;
overflow-y: scroll;
}
// footer[role="contentinfo"]{
// // flex: 0 1 content;
// z-index: 100;
// position: fixed;
// bottom: 0;
// width: 100%;
// }
}
@@ -0,0 +1,83 @@
// __ __ _ _ _ _ _ _ _
// \ \ / /_ _ _ __(_) __ _| |__ | | ___ | |_(_) |_| | ___
// \ \ / / _` | '__| |/ _` | '_ \| |/ _ \ | __| | __| |/ _ \
// \ V / (_| | | | | (_| | |_) | | __/ | |_| | |_| | __/
// \_/ \__,_|_| |_|\__,_|_.__/|_|\___| \__|_|\__|_|\___|
@use "../abstracts/variables" as *;
// Splitting met .word ET .char en inline-block :
// - inline-block sur .char crée une opportunité de coupure entre CHAQUE lettre ;
// - inline-block sur .word (dimensionné en max-content) empêche tout retour à la
// ligne interne, donc les soft hyphens ne peuvent jamais couper le mot.
// On repasse les deux en inline : le mot redevient un flux de texte qui ne coupe
// qu'aux césures logicielles (U+00AD) insérées par le JS.
// Spécificité (0,2,1) pour battre `.splitting .word/.char` de Splitting.
.splitting span.word,
.splitting span.char{
display: inline;
}
.variable-title{
margin: 0;
font-weight: 200;
text-transform:lowercase;
line-height: 1;
// margin-left: -0.04em;
filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff);
span.word{
span.char{
letter-spacing:-0.1em;
}
}
// span.whitespace{
// letter-spacing: 0.5em;
// }
}
// Titres traités par assets/js/titles.js : garder identique à TITLE_SELECTORS.
$variable-title-selectors: (
'#block-leshed-identitedusite>a',
'article.node-type-projet>header>h2',
'article.node-type-projet>.cols>.left>h2',
'article.node-type-projet.view-mode-full h2.node-title',
'article.node-type-evenement>header>h2',
'article.node-type-evenement>header>.field_dates>time',
'article.node-type-evenement.view-mode-full h2.node-title',
'article.node-type-evenement.view-mode-full .field_dates.digit-dates span.date-part',
);
// Avant le split : même métrique qu'après, pour éviter un saut de mise en page.
:where(#{$variable-title-selectors}):not(.splitting){
margin: 0;
font-weight: 200;
text-transform: lowercase;
line-height: 1;
letter-spacing: -0.1em;
}
// Masqués (place conservée) jusqu'au split ; réaffichés après 3 s si le JS échoue.
@media (scripting: enabled){
:where(#{$variable-title-selectors}):not(.is-ready){
visibility: hidden;
animation: leshed-title-failsafe 0s 3s forwards;
}
}
@keyframes leshed-title-failsafe{
to{ visibility: visible; }
}
div#block-leshed-titredelapage h1{
font-size: 1em;
font-weight: $default_fwght;
margin: 0;
}