discourse/app/assets/stylesheets/desktop/topic.scss
Kris da5841de0b
REFACTOR: Remove position fixed from the header and use sticky instead (#10781)
This removes fixed positioning from d-header and the topic timeline.

Plugins, themes and components that use the above/below header plugin outlet will likely need some margin/padding adjustments.
2020-10-19 17:26:38 -04:00

231 lines
4.0 KiB
SCSS

.post-actions {
@include unselectable;
clear: both;
text-align: right;
margin-bottom: 10px;
.post-action {
display: inline-block;
margin-left: 10px;
margin-top: 10px;
}
}
.post-menu-area {
margin: 20px 0;
}
#topic-title {
z-index: z("base");
padding-top: 14px;
margin-bottom: 10px;
#edit-title,
.category-chooser,
.edit-controls {
width: 500px;
}
h1 {
font-size: $font-up-4;
line-height: $line-height-medium;
overflow-wrap: break-word;
width: 100%;
a {
color: var(--primary);
}
}
.remove-featured-link {
float: right;
text-transform: lowercase;
color: var(--primary-med-or-secondary-med);
font-size: 0.857rem;
}
}
.topic-error {
padding: 18px;
width: 60%;
margin-left: auto;
margin-right: auto;
font-size: $font-up-4;
text-align: center;
line-height: $line-height-medium;
.topic-retry {
display: block;
margin-top: 28px;
margin-left: auto;
margin-right: auto;
}
}
.topic-status-info {
border-top: 1px solid var(--primary-low);
padding: 10px 0;
max-width: 758px;
.topic-timer-heading,
.slow-mode-heading {
display: flex;
align-items: center;
margin: 0px;
}
.topic-timer-remove,
.slow-mode-remove {
font-size: $font-down-2;
background: transparent;
margin-left: auto;
}
}
#topic-progress-wrapper {
position: fixed;
right: 2em;
bottom: 0;
left: 0;
margin: 0 auto;
max-width: $reply-area-max-width;
display: flex;
justify-content: flex-end;
z-index: z("timeline");
// max-width + bottom + left/right makes this element take up the whole width
// albeit as a transparent row, but we disable pointer-events to allow user to
// interact with visible elements at bottom of viewport
pointer-events: none;
> * {
// and then we reset for its children
pointer-events: auto;
}
&.docked {
position: absolute;
bottom: -70px;
}
html.rtl & {
justify-content: flex-start;
right: 0;
left: 2em;
}
}
#topic-progress-expanded {
border: 1px solid var(--primary-low);
padding: 5px;
background: var(--secondary);
position: relative;
left: 340px;
width: 135px;
button.full {
width: 100%;
margin-bottom: 5px;
.d-icon {
display: block;
margin-top: 2px;
margin-bottom: 2px;
font-size: $font-up-2;
}
}
.jump-form {
input[type="text"] {
float: left;
width: 45px;
height: 20px;
text-align: center;
margin-bottom: 0;
font-size: $font-up-1;
}
button.btn {
float: right;
width: 55px;
}
}
button.btn.jump-prompt {
margin: 0;
}
button.btn.jump-bottom {
margin: 5px 0 0 0;
}
}
#topic-progress {
position: relative;
left: 340px;
&.hidden {
display: none;
}
background-color: var(--secondary);
color: var(--tertiary);
border: 1px solid var(--tertiary-low);
border-bottom: none;
width: 145px;
height: 34px;
/* as a big ol' click target, don't let text inside be selected */
@include unselectable;
&:hover {
cursor: pointer;
}
.nums {
position: relative;
top: 9px;
width: 100%;
text-align: center;
z-index: z("base");
}
.d-icon {
position: absolute;
right: 8px;
bottom: 9px;
z-index: z("base");
}
h4 {
display: inline;
font-size: $font-up-2;
line-height: $line-height-small;
}
.bg {
position: absolute;
top: 0;
bottom: 0;
width: 0;
max-width: 145px;
border-right: 1px solid var(--tertiary-low);
background-color: var(--tertiary-low);
transition: width 0.75s;
}
}
#topic-filter {
background-color: var(--highlight-medium);
padding: 8px;
bottom: 0;
position: fixed;
width: 100%;
font-size: $font-0;
z-index: z("dropdown");
}
#topic-progress,
#topic-progress-expanded {
right: 0;
left: 0;
}
@media all and (min-width: 400px) {
#topic-footer-main-buttons {
max-width: 70%;
}
}
@media all and (max-width: 485px) {
#topic-progress-wrapper.docked {
display: none;
}
#topic-footer-main-buttons {
max-width: 100%;
}
}