From 13d0db3bd5fb1e933fbfe1042d9f9b7da86ef1d1 Mon Sep 17 00:00:00 2001 From: alexisben <alexiben7@gmail.com> Date: Tue, 26 Jul 2022 16:02:10 +0200 Subject: [PATCH] fix icon classes --- assets/sass/_theme/_configuration.sass | 1 + assets/sass/_theme/_utils.sass | 11 +++++ assets/sass/_theme/design-system/nav.sass | 44 +++++++++++++++++++ .../sass/_theme/design-system/typography.sass | 9 ++-- assets/sass/_theme/sections/posts.sass | 22 ++++++++++ assets/sass/_theme/sections/programs.sass | 5 ++- 6 files changed, 85 insertions(+), 7 deletions(-) diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 9e0776d0..3e427494 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -4,6 +4,7 @@ $main-color: black !default // Text color $main-background-color: white !default // Background color $main-border-color: lightgray !default // Border color +// TODO : faut-il mettre les largeur de border dans le config ? overkill ? $body-color: $main-color !default $body-background-color: $main-background-color !default diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index ace5c7f9..8f341fb1 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -117,6 +117,17 @@ right: 0 top: 0 +@mixin visually-hidden + clip: rect(0,0,0,0) !important + border: 0 !important + height: 1px !important + margin: -1px !important + overflow: hidden !important + padding: 0 !important + position: absolute !important + white-space: nowrap !important + width: 1px !important + @mixin button-reset appearance: none background: transparent diff --git a/assets/sass/_theme/design-system/nav.sass b/assets/sass/_theme/design-system/nav.sass index 430c64d3..896077d2 100644 --- a/assets/sass/_theme/design-system/nav.sass +++ b/assets/sass/_theme/design-system/nav.sass @@ -55,3 +55,47 @@ a, span font-size: px2rem(14) + + +.share + display: flex + list-style: none + margin: 0 + padding: 0 + + li:not(:last-child) + margin-right: 1rem + + a + font-size: px2rem(13) + text-decoration: none + padding: 0.75rem + &:hover + opacity: 0.7 + &::after + content: none + &:last-child + margin-right: -0.75rem + + span + display: none + vertical-align: middle + +// .dropdown-share +// @extend .dropdown +// > button +// @extend .btn +// @extend .btn-lg +// @extend .btn-outline-light +// &::after +// @include icon +// content: map-get($icons, "social") +// margin-left: px2rem(10) +// .dropdown-menu +// padding: 0 +// .share +// li +// margin: 0 +// a +// @extend .dropdown-item +// color: $body-color diff --git a/assets/sass/_theme/design-system/typography.sass b/assets/sass/_theme/design-system/typography.sass index e62b0e1d..a4971302 100644 --- a/assets/sass/_theme/design-system/typography.sass +++ b/assets/sass/_theme/design-system/typography.sass @@ -60,7 +60,7 @@ a, .link @include link overflow-wrap: break-word - &[target="_blank"] + &[target="_blank"]:not(.icon) @include icon("link-blank", "after") &::after font-size: px2rem(10) @@ -97,10 +97,7 @@ a, *:focus-visible transition: outline-offset .3s ease - - // ICONS - @font-face font-display: block font-family: 'Icon' @@ -108,9 +105,9 @@ a, font-weight: 400 src: url('../fonts/icons/icomoon.woff') format("woff") -@each $name in $icons +@each $name, $glyph in $icons .icon-#{$name} - @include icon($name) + @include icon($name, before) .btn-#{$name} @include icon($name) &::before diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index 71469b1d..455e0691 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -42,3 +42,25 @@ &:last-child &::after content: none + +.table-infos + border-top: 1px solid $main-border-color + font-size: px2rem(14) + margin-bottom: 0 + ul + @include list-reset + caption + @include visually-hidden + position: relative !important // Fix safari iOS border issue + th + // color: $gray-600 + font-weight: 400 + padding-left: 0 + white-space: nowrap + tr + border-color: $main-border-color + td:last-of-type + padding-right: 0 + text-align: right + .share + justify-content: flex-end diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass index 57cfc2cc..eebfc3fc 100644 --- a/assets/sass/_theme/sections/programs.sass +++ b/assets/sass/_theme/sections/programs.sass @@ -78,6 +78,9 @@ > * grid-column: 6/13 h2 - @include sticky(calc($header-height + $spacing4)) + $sticky-top-offset: 90px + @include sticky(#{$header-height + $sticky-top-offset}) + top: $sticky-top-offset align-self: start grid-column: 1/5 + margin-bottom: 0 -- GitLab