Extract question styling from answerbox

This commit is contained in:
Andreas Nedbal 2023-10-21 00:25:51 +02:00 committed by Andreas Nedbal
parent 07a423bba0
commit 36b13c5366
2 changed files with 19 additions and 14 deletions

View File

@ -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;

View File

@ -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;
}
}