From 316f604eb32416d1498ac937d5e6e2c8a20390f6 Mon Sep 17 00:00:00 2001 From: Amaury Carrade Date: Wed, 13 Sep 2023 12:50:42 +0200 Subject: [PATCH] =?UTF-8?q?[num=C3=A9rotation]=20Factorisation=20du=20SCSS?= =?UTF-8?q?=20;=20style.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Inutile de répéter les sélecteurs, on fait du SCSS, on peut imbriquer. - Correction du style de code d'après les règles editorconfig : indentation avec deux espaces. --- assets/scss/layout/_content.scss | 399 ++++++++++++++++--------------- 1 file changed, 201 insertions(+), 198 deletions(-) diff --git a/assets/scss/layout/_content.scss b/assets/scss/layout/_content.scss index c9f3864278..1387722bec 100644 --- a/assets/scss/layout/_content.scss +++ b/assets/scss/layout/_content.scss @@ -1,283 +1,286 @@ .small-content-wrapper { - width: 90%; - max-width: $length-512; - margin: $length-20 auto; + width: 90%; + max-width: $length-512; + margin: $length-20 auto; } .main .content-container { - .content-wrapper { - &.article-content, - &.members { - padding-left: 2%; - padding-right: 2%; - } + .content-wrapper { + &.article-content, + &.members { + padding-left: 2%; + padding-right: 2%; } + } + + section > h2 { + display: flex; header { - >.title-block { - display: flex; - flex-direction: row; + > .title-block { + display: flex; + flex-direction: row; + + margin-bottom: $length-10; + + > .content-thumbnail-group { + flex-shrink: 0; + margin-right: $length-10; + } + + > .content-title-and-subtitle-group { + width: 100%; + + padding-bottom: $length-4; - margin-bottom: $length-10; + border-bottom: $length-1 solid $accent-500; - >.content-thumbnail-group { - flex-shrink: 0; - margin-right: $length-10; + > .content-title-group { + > .title { + display: inline; + vertical-align: middle; + border: none; + margin: 0; + padding: 0; } - >.content-title-and-subtitle-group { - width:100%; - - padding-bottom: $length-4; - - border-bottom: $length-1 solid $accent-500; - - >.content-title-group { - >.title { - display: inline; - vertical-align: middle; - border: none; - margin: 0; - padding: 0; - } - - >.edit-button { - display: inline-block; - vertical-align: middle; - } - } - - >.content-subtitle-group { - >.subtitle { - display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - } - - >.edit-button { - display: inline-block; - vertical-align: middle; - } - } - - display: flex; - flex-direction: column; + > .edit-button { + display: inline-block; + vertical-align: middle; } + } + + > .content-subtitle-group { + > .subtitle { + display: inline; + vertical-align: middle; + margin: 0; + padding: 0; + } + + > .edit-button { + display: inline-block; + vertical-align: middle; + } + } + + display: flex; + flex-direction: column; } + } } section > h2 { - display: flex; + display: flex; - span { - flex: 2; - } + span { + flex: 2; + } - .btn { - float: none; - } + .btn { + float: none; + } } .article-content { - .extract-wrapper { - h3, h4, h5, h6 { - &:first-child { - margin-top: $length-14; - } - } - } - - p, - > a, - p a, - th, - td, - ul:not(.pagination), - ol:not(.summary-part) { - font-family: $font-serif; - font-size: $font-size-10; + .extract-wrapper { + h3, h4, h5, h6 { + &:first-child { + margin-top: $length-14; + } } + } + + p, + > a, + p a, + th, + td, + ul:not(.pagination), + ol:not(.summary-part) { + font-family: $font-serif; + font-size: $font-size-10; + } } .content-wrapper.comment-author, .comment-author { - margin-bottom: $length-20; - padding: $length-8 $length-16; + margin-bottom: $length-20; + padding: $length-8 $length-16; - background: $grey-100; + background: $grey-100; - color: $grey-800; + color: $grey-800; - blockquote { - margin: $length-10 0; - padding: $length-6 0 $length-6 $length-16; + blockquote { + margin: $length-10 0; + padding: $length-6 0 $length-6 $length-16; - border-left: $length-6 solid$grey-200; - } + border-left: $length-6 solid $grey-200; + } } .article-content .summary-part { - font-size: $font-size-7; - color: $accent-800; + font-size: $font-size-7; + color: $accent-800; - h3, - h4 { - width: 90%; - font-weight: normal; - - a { - text-decoration: none; - - &:not(.btn) { - &:hover, - &:focus { - text-decoration: underline; - } - } + h3, + h4 { + width: 90%; + font-weight: normal; + + a { + text-decoration: none; + + &:not(.btn) { + &:hover, + &:focus { + text-decoration: underline; } + } } + } - h3 { - margin: 0 0 $length-6; - font-size: $length-20; + h3 { + margin: 0 0 $length-6; + font-size: $length-20; - a { - color: $accent-800; - } + a { + color: $accent-800; } + } - .summary-part { - margin-bottom: $length-16; - padding-left: 0; + .summary-part { + margin-bottom: $length-16; + padding-left: 0; - list-style: none; + list-style: none; - h4 { - font-size: $font-size-10; - margin: $length-2 0; - } + h4 { + font-size: $font-size-10; + margin: $length-2 0; } + } } .article-content, .message-content { - margin-bottom: $length-20; - color: $black; + margin-bottom: $length-20; + color: $black; - @import "base/content"; + @import "base/content"; } .message-content { - h3, h4, h5, h6 { - &:first-child { - margin-top: $length-14; - } + h3, h4, h5, h6 { + &:first-child { + margin-top: $length-14; } + } } .comments-title { - margin: $length-48 0 $length-20; - border-bottom: $length-1 solid $color-secondary; + margin: $length-48 0 $length-20; + border-bottom: $length-1 solid $color-secondary; - color: $color-primary; + color: $color-primary; - font-size: $font-size-6; - font-weight: normal; + font-size: $font-size-6; + font-weight: normal; } p.is-dimmed { - color: $grey-500; + color: $grey-500; } -} + } -@include wide { + @include wide { .full-content-wrapper .tutorial-list article { - width: 29.3%; + width: 29.3%; } -} + } -@include desktop { + @include desktop { .content-wrapper, .full-content-wrapper { - margin: 0 0 0 4%; + margin: 0 0 0 4%; - &.without-margin { - margin: 0; - } + &.without-margin { + margin: 0; + } - .content-wrapper { - max-width: none; - margin: 0; - } + .content-wrapper { + max-width: none; + margin: 0; + } } -} + } -@include until-desktop { + @include until-desktop { .main .content-container { - .taglist, - .pubdate { - margin-left: $length-10; - margin-right: $length-10; - } + .taglist, + .pubdate { + margin-left: $length-10; + margin-right: $length-10; + } - .article-content { - p, - ol, - ul:not(.pagination) { - font-size: $font-size-10; - } + .article-content { + p, + ol, + ul:not(.pagination) { + font-size: $font-size-10; } + } - .content-wrapper, - .full-content-wrapper { - h1:not(.ico-after), - h2:not(.ico-after), - h3, - .subtitle { - padding-left: $length-10; - padding-right: $length-10; - } + .content-wrapper, + .full-content-wrapper { + h1:not(.ico-after), + h2:not(.ico-after), + h3, + .subtitle { + padding-left: $length-10; + padding-right: $length-10; + } - .content-thumbnail-group { - display: none; - } + .illu img, .content-thumbnail-group { + display: none; + } - h4, - h5, - h6, - .members, - p, - figure, - blockquote, - .title-block { - margin-left: $length-10; - margin-right: $length-10; - } + h4, + h5, + h6, + .members, + p, + figure, + blockquote, + .title-block { + margin-left: $length-10; + margin-right: $length-10; + } - ul, - ol { - margin-right: $length-10; - } + ul, + ol { + margin-right: $length-10; + } - figure { - p, - blockquote { - margin-left: 0; - margin-right: 0; - } - } + figure { + p, + blockquote { + margin-left: 0; + margin-right: 0; + } + } - .license { - margin-right: $length-6; - } + .license { + margin-right: $length-6; } + } } -} + } -@include mobile { + @include mobile { .main .content-container .article-content .btn { - float: none; - text-align: center; + float: none; + text-align: center; } -} + }