diff --git a/app/assets/stylesheets/components/_answerbox.scss b/app/assets/stylesheets/components/_answerbox.scss index e0e3936f..ed550dc6 100644 --- a/app/assets/stylesheets/components/_answerbox.scss +++ b/app/assets/stylesheets/components/_answerbox.scss @@ -1,8 +1,6 @@ @use "sass:map"; .answerbox { - &__question-text, - &__question-user, &__answer-user, &__answer-date { margin-bottom: 0; @@ -25,7 +23,6 @@ margin-bottom: map.get($spacers, 3); } - &__question-user-avatar, &__answer-user-avatar { margin-right: map.get($spacers, 2); border-radius: $avatar-border-radius; diff --git a/app/assets/stylesheets/components/_question.scss b/app/assets/stylesheets/components/_question.scss index 7d03e06b..1a32ded7 100644 --- a/app/assets/stylesheets/components/_question.scss +++ b/app/assets/stylesheets/components/_question.scss @@ -1,18 +1,26 @@ +@use "sass:map"; + .question { - &--fixed { - position: absolute; + + &__avatar { + margin-right: map.get($spacers, 2); + border-radius: $avatar-border-radius; + } + + &__text, + &__user { + margin-bottom: 0; + overflow: hidden; + word-break: break-word; + } + + &--sticky { + border-radius: 0; width: 100%; - z-index: 999; @include media-breakpoint-up('sm') { - position: fixed; + position: sticky; + top: $navbar-height; } } - - &--hidden { - visibility: hidden; - position: relative; - box-shadow: none; - z-index: -1; - } }