DEV: Merge duplicated css (#31167)

Fixes `no-duplicate-selectors` stylelint rule.
This commit is contained in:
Jarek Radosz 2025-02-05 18:42:55 +01:00 committed by GitHub
parent 4a7a9efbb9
commit 39b1ac91b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
46 changed files with 655 additions and 873 deletions

View File

@ -650,9 +650,6 @@ $mobile-breakpoint: 700px;
nav {
background-color: var(--primary-low);
width: 100%;
}
nav {
display: inline-flex;
position: relative;
flex: 1 0 0px;
@ -1132,6 +1129,7 @@ table#user-badges {
.new-value-input {
flex: 1 0 0px;
margin-left: 0.25em;
}
.value-input,
@ -1153,10 +1151,6 @@ table#user-badges {
margin-left: 0.25em;
margin-top: 0.125em;
}
.new-value-input {
margin-left: 0.25em;
}
}
}

View File

@ -1,9 +1,3 @@
.admin-config-area {
.btn-back {
margin-bottom: 1em;
}
}
.admin-config-area-card {
padding: 20px 5px 20px 20px;
border: 1px solid var(--primary-low);
@ -103,6 +97,10 @@
margin-left: 18px;
}
}
.btn-back {
margin-bottom: 1em;
}
}
.admin-site-settings-filter-controls {

View File

@ -19,9 +19,6 @@
color: var(--primary-low-mid);
min-width: 14px;
text-align: center;
}
.d-icon {
margin: 0;
}
}

View File

@ -609,6 +609,21 @@
padding: 0;
margin: 0;
.admin-container {
position: absolute;
bottom: 50px;
top: 80px;
width: 100%;
}
.admin-footer {
margin-top: 10px;
}
.ace-wrapper {
height: calc(100vh - 200px);
}
.wrapper {
position: absolute;
top: 20px;
@ -682,23 +697,6 @@
width: 100%;
}
&.maximized {
.admin-container {
position: absolute;
bottom: 50px;
top: 80px;
width: 100%;
}
.admin-footer {
margin-top: 10px;
}
.ace-wrapper {
height: calc(100vh - 200px);
}
}
.ace_editor {
position: absolute;
left: 0;

View File

@ -743,6 +743,7 @@
.admin-new-feature-item__screenshot {
margin-bottom: 1em;
width: 100%;
}
.admin-new-feature-item__tooltip-header {
@ -783,10 +784,6 @@
margin-bottom: 0.5em;
}
&__screenshot {
width: 100%;
}
&__new-feature-version {
margin-left: auto;
color: var(--primary-low-mid);

View File

@ -57,15 +57,13 @@
margin-left: 12px;
word-break: break-word;
.select-kit {
min-width: 100px;
}
@media (max-width: $mobile-breakpoint) {
text-align: left;
margin-left: 0;
}
.select-kit {
min-width: 100px;
width: inherit;
}
}
@ -114,13 +112,25 @@
.admin-users-list {
.directory-table__cell {
padding: 0.5em 0.25em;
&.username {
align-items: center;
justify-content: start;
}
&.email {
justify-content: start;
@include breakpoint("tablet") {
grid-column-start: 1;
grid-column-end: -1;
span {
max-width: 100%;
}
}
span {
display: flex;
min-width: 17em;
@ -154,21 +164,6 @@
margin-right: 1em;
}
&__cell.username {
align-items: center;
}
&__cell.email {
@include breakpoint("tablet") {
grid-column-start: 1;
grid-column-end: -1;
span {
max-width: 100%;
}
}
}
&__cell.silence_reason {
text-align: left;
justify-content: start;
@ -182,10 +177,6 @@
}
}
.directory-table__cell {
padding: 0.5em 0.25em;
}
.user-status span {
gap: 0.15em;
}

View File

@ -200,6 +200,15 @@
width: 100%;
border-collapse: collapse;
.alert {
margin-bottom: 0;
font-size: var(--font-0);
}
.spinner {
margin-top: 40px;
}
> .topic-list-body > .topic-list-item {
&.has-excerpt .star {
vertical-align: top;
@ -422,17 +431,6 @@
}
}
.topic-list {
.alert {
margin-bottom: 0;
font-size: var(--font-0);
}
.spinner {
margin-top: 40px;
}
}
.d-icon-thumbtack.unpinned {
@include fa-rotate(180deg, 1);
}

View File

@ -1,6 +1,16 @@
.category-list {
table-layout: fixed;
tbody {
.category {
&.no-category-style {
border-color: transparent;
border-left: 0;
padding-left: 0;
}
}
}
.category-text-title {
display: flex;
align-items: baseline;
@ -70,6 +80,10 @@
width: 100%;
}
h3 .d-icon {
margin-right: 0;
}
.parent-box-link {
// This avoids an issue with nested links by layering links instead
&::before {
@ -347,13 +361,6 @@
}
}
.category-boxes-with-topics,
.category-boxes {
.category-box h3 .d-icon {
margin-right: 0;
}
}
.category-list.subcategories-with-subcategories {
margin-top: 1em;
margin-bottom: 0;
@ -381,18 +388,6 @@
}
}
.category-list {
tbody {
.category {
&.no-category-style {
border-color: transparent;
border-left: 0;
padding-left: 0;
}
}
}
}
.category-box.no-category-boxes-style {
border-left-width: 2px;
}

View File

@ -69,6 +69,8 @@ body > noscript {
padding: 10px;
div.post {
overflow: auto;
max-width: 100%;
word-break: break-word;
img {
@ -76,6 +78,10 @@ body > noscript {
height: auto;
}
}
.topic-body {
float: unset;
}
}
.topic-list {
@ -205,24 +211,6 @@ body > noscript {
margin-top: 0.25em;
}
// topics
div#main-outlet {
div.post {
word-break: break-word;
overflow: auto;
max-width: 100%;
img {
max-width: 100%;
height: auto;
}
}
.topic-body {
float: unset;
}
}
.crawler-post {
margin-top: 1em;
margin-bottom: 2em;

View File

@ -193,9 +193,7 @@ input {
float: left;
margin-left: -18px;
}
}
input {
&[type="text"],
&[type="password"],
&[type="datetime"],

View File

@ -261,9 +261,6 @@ div.edit-category {
.row-empty {
padding: 0.5em 0;
}
.row-empty {
color: var(--primary-medium);
}

View File

@ -103,10 +103,8 @@ $use-visuallyhidden: false !default; // Hide content from browsers, but make it
top: 0;
padding: 0 $popup-padding-left;
box-sizing: border-box;
}
// Vertical centerer helper
.mfp-container {
// Vertical centerer helper
&::before {
content: "";
display: inline-block;

View File

@ -1,7 +1,18 @@
.menu-panel.slide-in {
position: fixed;
right: 0;
box-shadow: var(--shadow-header);
top: 0;
box-sizing: border-box;
// ensure there's always space to click outside on tiny devices
max-width: 90vw;
--100dvh: 100%;
@supports (height: 100dvh) {
--100dvh: 100dvh;
}
box-shadow: 0 0 30px -2px rgba(0, 0, 0, 0.5);
height: var(--100dvh);
.panel-body {
width: 100%;
@ -9,7 +20,14 @@
}
.header-cloak {
height: 100%;
width: 100%;
position: fixed;
background-color: rgba(0, 0, 0, 0.3);
top: 0;
left: 0;
display: none;
touch-action: pan-y pinch-zoom;
}
.menu-panel.drop-down {
@ -34,6 +52,125 @@
flex-direction: column;
box-sizing: border-box;
// remove once glimmer search menu in place
.widget-link,
.categories-link {
padding: 0.25em 0.5em;
display: block;
color: var(--primary);
&:hover,
&:focus {
background-color: var(--d-hover);
outline: none;
}
.d-icon {
color: var(--primary-medium);
}
.new {
font-size: var(--font-down-1);
margin-left: 0.5em;
color: var(--primary-med-or-secondary-med);
}
&.show-help,
&.filter {
color: var(--tertiary);
}
}
.search-link,
.categories-link {
padding: 0.25em 0.5em;
display: block;
color: var(--primary);
&:hover,
&:focus {
background-color: var(--d-hover);
outline: none;
}
.d-icon {
color: var(--primary-medium);
}
.new {
font-size: var(--font-down-1);
margin-left: 0.5em;
color: var(--primary-med-or-secondary-med);
}
&.show-help,
&.filter {
color: var(--tertiary);
}
}
li.category-link {
float: left;
background-color: transparent;
display: inline-flex;
align-items: center;
padding: 0.25em 0.5em;
width: 50%;
box-sizing: border-box;
a {
display: inline-flex;
&:hover,
&:focus {
background: transparent;
.category-name {
color: var(--primary);
}
}
}
.badge-notification {
color: var(--primary-med-or-secondary-med);
background-color: transparent;
display: inline;
padding: 0;
font-size: var(--font-down-1);
line-height: var(--line-height-large);
}
}
// note these topic counts only appear for anons in the category hamburger drop down
b.topics-count {
color: var(--primary-med-or-secondary-med);
font-weight: normal;
font-size: var(--font-down-1);
}
div.discourse-tags {
font-size: var(--font-down-1);
}
.sidebar-panel-header__row {
width: 100%;
}
.sidebar-sections {
&__back-to-forum {
color: var(--d-sidebar-link-color);
display: flex;
align-items: center;
svg {
margin-right: var(--d-sidebar-section-link-prefix-margin-right);
height: 0.75em;
width: 0.75em;
color: var(--d-sidebar-link-icon-color);
}
}
}
hr {
margin: 3px 0;
}
@ -271,127 +408,6 @@
}
}
.menu-panel {
// remove once glimmer search menu in place
.widget-link,
.categories-link {
padding: 0.25em 0.5em;
display: block;
color: var(--primary);
&:hover,
&:focus {
background-color: var(--d-hover);
outline: none;
}
.d-icon {
color: var(--primary-medium);
}
.new {
font-size: var(--font-down-1);
margin-left: 0.5em;
color: var(--primary-med-or-secondary-med);
}
&.show-help,
&.filter {
color: var(--tertiary);
}
}
.search-link,
.categories-link {
padding: 0.25em 0.5em;
display: block;
color: var(--primary);
&:hover,
&:focus {
background-color: var(--d-hover);
outline: none;
}
.d-icon {
color: var(--primary-medium);
}
.new {
font-size: var(--font-down-1);
margin-left: 0.5em;
color: var(--primary-med-or-secondary-med);
}
&.show-help,
&.filter {
color: var(--tertiary);
}
}
li.category-link {
float: left;
background-color: transparent;
display: inline-flex;
align-items: center;
padding: 0.25em 0.5em;
width: 50%;
box-sizing: border-box;
a {
display: inline-flex;
&:hover,
&:focus {
background: transparent;
.category-name {
color: var(--primary);
}
}
}
.badge-notification {
color: var(--primary-med-or-secondary-med);
background-color: transparent;
display: inline;
padding: 0;
font-size: var(--font-down-1);
line-height: var(--line-height-large);
}
}
// note these topic counts only appear for anons in the category hamburger drop down
b.topics-count {
color: var(--primary-med-or-secondary-med);
font-weight: normal;
font-size: var(--font-down-1);
}
div.discourse-tags {
font-size: var(--font-down-1);
}
.sidebar-panel-header__row {
width: 100%;
}
.sidebar-sections {
&__back-to-forum {
color: var(--d-sidebar-link-color);
display: flex;
align-items: center;
svg {
margin-right: var(--d-sidebar-section-link-prefix-margin-right);
height: 0.75em;
width: 0.75em;
color: var(--d-sidebar-link-icon-color);
}
}
}
}
// Panel / user-notification-list styles. **not** menu panel sizing styles
.user-menu .quick-access-panel,
.user-notifications-list {
@ -470,6 +486,11 @@
// we don't need the link focus because we're styling the parent
outline: 0;
}
.btn-flat:focus {
// undo default btn-flat style
background: transparent;
}
}
// This is until other languages remove the HTML from within
@ -511,25 +532,6 @@
}
}
&:hover {
background-color: var(--d-hover);
outline: none;
}
&:focus-within {
background: var(--d-hover);
a {
// we don't need the link focus because we're styling the parent
outline: 0;
}
.btn-flat:focus {
// undo default btn-flat style
background: transparent;
}
}
a,
.profile-tab-btn {
display: flex;
@ -699,29 +701,3 @@
min-height: 100%;
}
}
.header-cloak {
height: 100%;
width: 100%;
position: fixed;
background-color: rgba(0, 0, 0, 0.3);
top: 0;
left: 0;
display: none;
touch-action: pan-y pinch-zoom;
}
.menu-panel.slide-in {
top: 0;
box-sizing: border-box;
// ensure there's always space to click outside on tiny devices
max-width: 90vw;
--100dvh: 100%;
@supports (height: 100dvh) {
--100dvh: 100dvh;
}
box-shadow: 0 0 30px -2px rgba(0, 0, 0, 0.5);
height: var(--100dvh);
}

View File

@ -190,6 +190,42 @@
}
.modal {
&.has-tabs {
.modal-tabs {
display: inline-flex;
flex-wrap: wrap;
flex: 1 0 auto;
margin: 0;
.modal-tab {
list-style: none;
padding: 4px 8px;
margin-right: 4px;
cursor: pointer;
&.is-active {
color: var(--secondary);
background: var(--danger);
&.single-tab {
background: none;
color: var(--primary);
padding: 0;
font-size: var(--font-up-3);
font-weight: bold;
}
}
}
}
}
&:not(.has-tabs) {
.modal-tab {
position: absolute;
width: 95%;
}
}
.nav {
padding: 10px 30px 10px 15px;
background-color: var(--secondary);
@ -379,9 +415,7 @@
.change-timestamp {
width: 28em; // scales with user font-size
max-width: 90vw; // prevents overflow due to extra large user font-size
}
.change-timestamp {
#date-container {
.pika-single {
position: relative !important; // overriding another important
@ -445,44 +479,6 @@
}
}
.modal:not(.has-tabs) {
.modal-tab {
position: absolute;
width: 95%;
}
}
.modal {
&.has-tabs {
.modal-tabs {
display: inline-flex;
flex-wrap: wrap;
flex: 1 0 auto;
margin: 0;
.modal-tab {
list-style: none;
padding: 4px 8px;
margin-right: 4px;
cursor: pointer;
&.is-active {
color: var(--secondary);
background: var(--danger);
&.single-tab {
background: none;
color: var(--primary);
padding: 0;
font-size: var(--font-up-3);
font-weight: bold;
}
}
}
}
}
}
.bulk-notification-list {
margin-bottom: 1.5em;
}

View File

@ -13,6 +13,12 @@
&-search {
margin-top: 20px;
label {
color: var(--primary);
font-size: var(--font-up-3);
margin-bottom: 0.5em;
}
}
}
@ -54,11 +60,3 @@
flex-basis: 100%;
}
}
.page-not-found-search {
label {
color: var(--primary);
font-size: var(--font-up-3);
margin-bottom: 0.5em;
}
}

View File

@ -20,29 +20,6 @@ a.loading-onebox {
padding: 12px;
font-size: var(--font-0);
> .source {
margin-bottom: 12px;
margin-right: 10px;
display: block;
color: var(--primary);
position: relative;
height: 20px;
.info {
a {
color: black;
text-decoration: none;
padding-right: 10px;
}
position: absolute;
font-size: var(--font-0);
img.favicon {
margin-right: 3px;
}
}
}
.onebox-result-body {
padding-top: 5px;
@ -72,23 +49,43 @@ a.loading-onebox {
float: left;
}
}
}
}
// RottenTomatoes Onebox
.onebox-result {
.onebox-result-body {
// RottenTomatoes Onebox
img.verdict {
float: none;
margin-right: 7px;
}
// RottenTomatoes Onebox
img.popcorn {
float: none;
margin-left: 20px;
margin-right: 5px;
}
}
> .source {
margin-bottom: 12px;
margin-right: 10px;
display: block;
color: var(--primary);
position: relative;
height: 20px;
.info {
a {
color: black;
text-decoration: none;
padding-right: 10px;
}
position: absolute;
font-size: var(--font-0);
img.favicon {
margin-right: 3px;
}
}
}
}
@mixin onebox-favicon($class, $image) {
@ -417,6 +414,7 @@ pre.onebox code ol {
pre.onebox code {
background-color: var(--primary-very-low);
white-space: normal;
}
pre.onebox code li {
@ -444,10 +442,6 @@ pre.onebox code ol.lines li.selected {
border-left-color: rgba(var(--primary-rgb), 0.2);
}
pre.onebox code {
white-space: normal;
}
.onebox-warning-message {
margin-top: 5px;
color: var(--primary-med-or-secondary-med);

View File

@ -122,6 +122,15 @@
padding: 1em;
margin-bottom: 1em;
.topic-filter .btn {
display: flex;
width: auto;
}
.score-filter {
width: 5em;
}
.reviewable-filter {
display: flex;
flex-direction: column;
@ -189,17 +198,6 @@
}
}
.reviewable-filters {
.topic-filter .btn {
display: flex;
width: auto;
}
.score-filter {
width: 5em;
}
}
.user-flag-percentage {
display: flex;
align-items: center;
@ -237,6 +235,156 @@
.reviewable-item {
background: var(--primary-very-low);
padding: 1.5rem;
margin-block: 3rem;
.show-raw-email {
color: var(--primary-medium);
font-size: var(--font-down-2);
}
.post-title {
background-color: yellow;
}
.created-by {
margin-right: 1em;
padding-top: 0.35em;
@include breakpoint("mobile-large") {
float: left;
margin-bottom: 1em;
}
}
.names {
font-weight: bold;
}
.post-contents-wrapper {
width: 100%;
margin-top: 1em;
min-width: 275px;
word-break: break-word;
@include breakpoint("mobile-large", min-width) {
display: flex;
}
}
.reviewable-post-header {
display: flex;
justify-content: space-between;
width: var(--topic-body-width);
align-items: center;
max-width: 100%;
.reviewable-reply-to {
display: flex;
align-items: center;
color: var(--primary-medium);
font-size: 0.9em;
.d-icon {
margin-right: 0.5em;
}
}
}
.post-contents {
width: 100%;
min-width: 0; // Flexbox fix
}
.post-body {
position: relative;
max-width: var(--topic-body-width);
margin-top: 0.5em;
&.is-collapsed {
max-height: 50vh;
overflow: hidden;
&::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
height: 25%;
width: 100%;
background: linear-gradient(to bottom, transparent, var(--secondary));
}
+ .post-body__toggle-btn {
transform: translateX(-50%) translateY(-50%);
}
}
p {
margin-bottom: 0;
}
&__toggle-btn {
background: var(--primary-very-low);
color: var(--primary-high);
font-size: var(--font-down-2);
box-shadow: var(--shadow-dropdown);
margin-left: 50%;
transform: translateX(-50%);
border-radius: 4px;
.d-icon {
color: var(--primary-high);
}
&:hover {
background: var(--primary-very-low);
color: var(--tertiary);
.d-icon {
color: var(--tertiary);
}
}
}
aside {
margin: 0 0 1em 0;
}
img {
max-width: 100%;
height: auto;
}
pre,
code {
word-break: break-all;
}
}
.post-topic {
width: 100%;
color: var(--primary-medium);
margin-bottom: 0.75em;
.title-text {
font-weight: bold;
color: var(--primary);
display: block;
font-size: var(--font-up-2);
margin-right: 0.75em;
}
.badge-category__wrapper {
margin-left: 0.25em;
}
.discourse-tag {
vertical-align: bottom;
padding-left: 0.1em;
}
}
&__context-question {
margin-block: 1rem;
}
.topic-statuses {
font-size: var(--font-up-2);
@ -458,159 +606,6 @@
}
}
.reviewable-item {
margin-block: 3rem;
.show-raw-email {
color: var(--primary-medium);
font-size: var(--font-down-2);
}
.post-title {
background-color: yellow;
}
.created-by {
margin-right: 1em;
padding-top: 0.35em;
@include breakpoint("mobile-large") {
float: left;
margin-bottom: 1em;
}
}
.names {
font-weight: bold;
}
.post-contents-wrapper {
width: 100%;
margin-top: 1em;
min-width: 275px;
word-break: break-word;
@include breakpoint("mobile-large", min-width) {
display: flex;
}
}
.reviewable-post-header {
display: flex;
justify-content: space-between;
width: var(--topic-body-width);
align-items: center;
max-width: 100%;
.reviewable-reply-to {
display: flex;
align-items: center;
color: var(--primary-medium);
font-size: 0.9em;
.d-icon {
margin-right: 0.5em;
}
}
}
.post-contents {
width: 100%;
min-width: 0; // Flexbox fix
}
.post-body {
position: relative;
max-width: var(--topic-body-width);
margin-top: 0.5em;
&.is-collapsed {
max-height: 50vh;
overflow: hidden;
&::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
height: 25%;
width: 100%;
background: linear-gradient(to bottom, transparent, var(--secondary));
}
+ .post-body__toggle-btn {
transform: translateX(-50%) translateY(-50%);
}
}
p {
margin-bottom: 0;
}
&__toggle-btn {
background: var(--primary-very-low);
color: var(--primary-high);
font-size: var(--font-down-2);
box-shadow: var(--shadow-dropdown);
margin-left: 50%;
transform: translateX(-50%);
border-radius: 4px;
.d-icon {
color: var(--primary-high);
}
&:hover {
background: var(--primary-very-low);
color: var(--tertiary);
.d-icon {
color: var(--tertiary);
}
}
}
aside {
margin: 0 0 1em 0;
}
img {
max-width: 100%;
height: auto;
}
pre,
code {
word-break: break-all;
}
}
.post-topic {
width: 100%;
color: var(--primary-medium);
margin-bottom: 0.75em;
.title-text {
font-weight: bold;
color: var(--primary);
display: block;
font-size: var(--font-up-2);
margin-right: 0.75em;
}
.badge-category__wrapper {
margin-left: 0.25em;
}
.discourse-tag {
vertical-align: bottom;
padding-left: 0.1em;
}
}
&__context-question {
margin-block: 1rem;
}
}
.editable-fields {
.editable-created-by {
display: flex;

View File

@ -195,20 +195,17 @@ $search-pad-horizontal: 0.5em;
align-items: center;
background: var(--primary-200);
color: var(--primary-medium);
.d-icon {
font-size: var(--font-down-2);
color: currentcolor;
}
}
.avatar-flair {
border-radius: 50%;
&.avatar-flair-image {
background-repeat: no-repeat;
background-size: 100% 100%;
}
.d-icon {
font-size: var(--font-down-2);
color: currentcolor;
}
}
.group-names {

View File

@ -15,16 +15,6 @@
font-size: var(--font-down-1-rem);
}
.sidebar-section-link-prefix {
.prefix-image {
border: 1px solid transparent;
}
&.active .prefix-image {
box-shadow: 0 0 0 1px var(--success);
}
}
.sidebar-section-link {
display: inline-flex;
width: 100%;
@ -173,6 +163,14 @@
height: var(--d-sidebar-section-link-prefix-width);
margin-right: var(--d-sidebar-section-link-prefix-margin-right);
.prefix-image {
border: 1px solid transparent;
}
&.active .prefix-image {
box-shadow: 0 0 0 1px var(--success);
}
&.image {
img {
border-radius: 100%;

View File

@ -28,6 +28,14 @@
transition: all 0.25s;
opacity: 0;
&:hover {
background: var(--d-sidebar-highlight-hover-background);
.d-icon {
color: var(--d-sidebar-highlight-hover-icon);
}
}
&:focus {
opacity: 1;
}
@ -52,16 +60,6 @@
color: var(--d-sidebar-highlight-hover-icon);
}
}
.discourse-no-touch & {
&:hover {
background: var(--d-sidebar-highlight-hover-background);
.d-icon {
color: var(--d-sidebar-highlight-hover-icon);
}
}
}
}
}

View File

@ -395,6 +395,7 @@
}
.sidebar-no-results {
display: block;
margin: 0.5em var(--d-sidebar-row-horizontal-padding) 0
var(--d-sidebar-row-horizontal-padding);
@ -403,10 +404,6 @@
}
}
.sidebar-no-results {
display: block;
}
.sidebar-panel-header__row {
display: flex;
justify-content: space-between;

View File

@ -61,9 +61,6 @@
display: inline-block;
@include ellipsis;
vertical-align: middle;
}
.discourse-tag {
margin: 0;
color: var(--primary-medium);

View File

@ -97,6 +97,29 @@
word-wrap: break-word;
line-height: 1.5;
video {
max-width: 100%;
}
sup sup {
top: 0;
}
img:not(.thumbnail, .ytp-thumbnail-image, .emoji) {
max-width: 100%;
height: auto;
display: inline-block; // Ensure dimensions are maintained even after load error
@supports not (aspect-ratio: 1) {
// (see javascripts/discourse/app/initializers/image-aspect-ratio.js)
height: var(--calculated-height);
}
}
svg {
max-height: 2000px;
}
> *:first-child {
margin-top: 0;
}
@ -176,6 +199,7 @@
mark {
text-decoration: none;
background-color: var(--highlight);
}
ins {
@ -188,10 +212,6 @@
text-decoration: line-through;
}
mark {
background-color: var(--highlight);
}
// Prevents users from breaking posts with tag nesting
big {
font-size: 1.5rem;
@ -218,32 +238,6 @@
}
}
.cooked,
.d-editor-preview {
video {
max-width: 100%;
}
sup sup {
top: 0;
}
img:not(.thumbnail, .ytp-thumbnail-image, .emoji) {
max-width: 100%;
height: auto;
display: inline-block; // Ensure dimensions are maintained even after load error
@supports not (aspect-ratio: 1) {
// (see javascripts/discourse/app/initializers/image-aspect-ratio.js)
height: var(--calculated-height);
}
}
svg {
max-height: 2000px;
}
}
.cooked-selection-barrier {
height: 0;
margin: 0;
@ -406,14 +400,14 @@ nav.post-controls {
&.button-count {
// Like count button
.discourse-no-touch & {
&.d-hover,
&:hover {
color: var(--primary);
}
&:not(.my-likes) {
padding-right: 0;
}
+ .toggle-like {
// Like button when like count is present
padding-left: 0.45em;
// Like button when like count is present
.discourse-no-touch & {
&.d-hover,
@ -422,6 +416,14 @@ nav.post-controls {
}
}
}
// Like count button
.discourse-no-touch & {
&.d-hover,
&:hover {
color: var(--primary);
}
}
}
&.my-likes,
@ -439,18 +441,6 @@ nav.post-controls {
cursor: not-allowed;
opacity: 1;
}
&.button-count {
// Like count button
&:not(.my-likes) {
padding-right: 0;
}
+ .toggle-like {
// Like button when like count is present
padding-left: 0.45em;
}
}
}
}
@ -484,18 +474,8 @@ nav.post-controls {
background: var(--d-post-control-background--hover);
color: var(--d-post-control-text-color--hover);
}
}
&.hidden {
display: none;
}
&.admin {
position: relative;
}
// TODO (glimmer-post-menu): Go over the the d-hover style and remove the unnecessary ones when glimmer-post-menu replaces the widget version
.discourse-no-touch & {
// TODO (glimmer-post-menu): Go over the the d-hover style and remove the unnecessary ones when glimmer-post-menu replaces the widget version
&.delete.d-hover,
&.delete:hover,
&.delete:active,
@ -509,6 +489,14 @@ nav.post-controls {
}
}
&.hidden {
display: none;
}
&.admin {
position: relative;
}
&.bookmarked .d-icon {
color: var(--tertiary);
}
@ -690,6 +678,14 @@ aside.quote {
}
.quote-controls {
float: right;
display: flex;
align-items: center;
a {
margin-left: 0.3em;
}
.quote-toggle {
padding: 0;
}
@ -746,16 +742,6 @@ aside.quote {
opacity: 0.4;
}
.quote-controls {
float: right;
display: flex;
align-items: center;
a {
margin-left: 0.3em;
}
}
.quote-button {
flex-direction: column;

View File

@ -595,6 +595,8 @@
}
.tracking-controls {
margin-top: 24px;
label {
align-items: center;
display: inline-block;
@ -624,6 +626,8 @@
color: var(--primary-medium);
font-size: var(--font-down-1);
line-height: var(--line-height-large);
display: block;
margin-top: 0.25em;
a[href] {
color: var(--tertiary);
@ -646,10 +650,6 @@
margin-bottom: 10px;
}
.tracking-controls {
margin-top: 24px;
}
&.second-factor-backup-preferences {
padding-left: 0;
@ -688,11 +688,6 @@
margin-right: 1em;
}
.instructions {
display: block;
margin-top: 0.25em;
}
.success-back {
display: flex;
align-items: center;

View File

@ -30,9 +30,6 @@
width: 100%;
height: auto;
box-sizing: border-box;
}
.topic-share-url {
margin-bottom: 8px;
}

View File

@ -10,13 +10,6 @@
}
}
.user-card,
.group-card {
--card-width: 39em;
--avatar-width: 8em;
--avatar-margin: -3.3em; // extends the avatar above the card
}
.animated-placeholder {
height: 20px;
position: relative;
@ -50,6 +43,9 @@
// shared styles for user and group cards
.user-card,
.group-card {
--card-width: 39em;
--avatar-width: 8em;
--avatar-margin: -3.3em; // extends the avatar above the card
min-width: 0;
width: var(--card-width);
color: var(--primary);

View File

@ -1,9 +1,9 @@
/*
* shared styles
*/
.d-modal.login-modal,
.d-modal.create-account {
&:not(:has(.login-right-side)) .d-modal__container {
max-width: 500px;
}
&.awaiting-approval {
display: none;
}
@ -212,14 +212,6 @@
}
}
/* end shared styles */
.d-modal.create-account,
.d-modal.login-modal {
&:not(:has(.login-right-side)) .d-modal__container {
max-width: 500px;
}
}
.d-modal.create-account {
.d-modal {
&__container {

View File

@ -209,17 +209,26 @@
}
.d-modal.topic-bulk-actions-modal {
p {
margin-top: 0;
}
#bulk-topics-cancel {
margin-left: auto;
}
.bulk-close-note-section {
margin-top: 1em;
}
.d-modal {
&__container {
min-width: 0;
width: 100%;
display: flex;
}
}
p {
margin-top: 0;
}
.bulk-buttons {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12em, 1fr));
@ -239,26 +248,6 @@
}
}
.d-modal.topic-bulk-actions-modal {
.d-modal {
&__container {
display: flex;
}
}
p {
margin-top: 0;
}
#bulk-topics-cancel {
margin-left: auto;
}
.bulk-close-note-section {
margin-top: 1em;
}
}
.d-modal.edit-slow-mode-modal {
.slow-mode-label {
display: inline-flex;

View File

@ -45,6 +45,7 @@
a,
a:visited {
color: #08c !important;
font-weight: bold;
}
/* bottom border to help separate posts */
@ -102,12 +103,6 @@
font-size: normal;
}
a,
a:visited {
color: #ddd;
font-weight: bold;
}
/* localhost - MOOT for production */
.topic-category-outlet.show-topic-category-location,
div.alert.alert-info.alert-emails-disabled,

View File

@ -168,11 +168,9 @@
Section below from prosemirror-view/style/prosemirror.css
********************************************************/
/* stylelint-disable-next-line no-duplicate-selectors */
.ProseMirror {
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: break-spaces;
}

View File

@ -64,6 +64,17 @@
}
&.is-loading {
.select-kit-filter::after {
content: "";
position: absolute;
background: var(--tertiary);
width: 100%;
height: 2px;
left: 0;
bottom: 0;
animation: lineDrawToRight 0.5s ease-in;
}
.select-kit-collection {
overflow: hidden;
}
@ -362,17 +373,4 @@
width: 100%;
}
}
&.is-loading {
.select-kit-filter::after {
content: "";
position: absolute;
background: var(--tertiary);
width: 100%;
height: 2px;
left: 0;
bottom: 0;
animation: lineDrawToRight 0.5s ease-in;
}
}
}

View File

@ -16,14 +16,18 @@
display: flex;
align-items: center;
// popup-menu doesnt use description text atm
// popup-menu doesn't use description text atm
// it's just easier to align the icon with text then
.icons {
align-self: center;
}
.shortcut {
margin-left: 1em;
border: none;
background: var(--primary-200);
font-size: var(--font-down-2);
color: var(--primary-high);
margin-left: 1.8rem;
}
&:last-child {
@ -45,14 +49,6 @@
color: var(--primary-medium);
}
.shortcut {
border: none;
background: var(--primary-200);
font-size: var(--font-down-2);
color: var(--primary-high);
margin-left: 1.8rem;
}
&.is-highlighted,
&.is-selected,
&:hover {

View File

@ -24,19 +24,28 @@
}
table.jexcel > thead > tr > td {
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-bottom: 1px solid #000;
background-color: #fff;
padding: 10px;
font-weight: bold;
border-top: 1px solid var(--jexcel_border_color);
border-right: 1px solid var(--jexcel_border_color);
border-bottom: 1px solid var(--jexcel_border_color);
background-color: var(--jexcel_header_background);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
}
}
table.jexcel > tbody > tr > td {
padding: 8px;
border-right: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid var(--jexcel_border_color);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
background-color: var(--jexcel_header_background);
}
}
table.jexcel {
@ -75,10 +84,6 @@ table.jexcel {
color: var(--jexcel_header_color_highlighted);
}
table.jexcel > tbody > tr > td:first-child {
background-color: var(--jexcel_header_background);
}
table.jexcel > tbody > tr.selected > td:first-child {
background-color: var(--jexcel_header_background_highlighted);
}
@ -230,38 +235,19 @@ table.jexcel > tbody > tr.selected > td:first-child {
box-shadow: unset;
}
table.jexcel > thead > tr > td {
border-top: 1px solid var(--jexcel_border_color);
border-right: 1px solid var(--jexcel_border_color);
border-bottom: 1px solid var(--jexcel_border_color);
background-color: var(--jexcel_header_background);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
}
}
table.jexcel > thead > tr > td.selected {
background-color: var(--jexcel_header_background_highlighted);
color: var(--jexcel_header_color_highlighted);
}
table.jexcel > tbody > tr > td {
border-right: 1px solid var(--jexcel_border_color);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
}
}
// Hides about item in context menu
.jcontextmenu > div:not(.contextmenu-line):last-child {
display: none;
}
.jexcel_container {
padding: 0.5em;
min-width: 100%;
padding: 0;
.jexcel_content {
min-width: 100%;
@ -272,7 +258,3 @@ table.jexcel > tbody > tr > td {
}
}
}
.jexcel_container {
padding: 0;
}

View File

@ -11,7 +11,31 @@
}
.topic-body {
padding: 0;
width: calc(var(--topic-body-width) + (var(--topic-body-width-padding) * 2));
float: left;
min-width: 0; // prevents some elements, like <pre>, from blowing out the width
position: relative;
border-top: 1px solid var(--primary-low);
padding: 0.8em 0 0 0;
.topic-meta-data {
padding: 0 var(--topic-body-width-padding) 0.25em
var(--topic-body-width-padding);
}
.cooked {
padding: 1em var(--topic-body-width-padding) 0.25em
var(--topic-body-width-padding);
}
.group-request {
padding: 0.5em var(--topic-body-width-padding) 0
var(--topic-body-width-padding);
}
a.expand-hidden {
padding-left: var(--topic-body-width-padding);
}
&:first-of-type {
border-top: none;
@ -500,35 +524,6 @@ blockquote {
}
}
// variables are used to calculate the width of .gap
.topic-body {
width: calc(var(--topic-body-width) + (var(--topic-body-width-padding) * 2));
float: left;
min-width: 0; // prevents some elements, like <pre>, from blowing out the width
position: relative;
border-top: 1px solid var(--primary-low);
padding: 0.8em 0 0 0;
.topic-meta-data {
padding: 0 var(--topic-body-width-padding) 0.25em
var(--topic-body-width-padding);
}
.cooked {
padding: 1em var(--topic-body-width-padding) 0.25em
var(--topic-body-width-padding);
}
.group-request {
padding: 0.5em var(--topic-body-width-padding) 0
var(--topic-body-width-padding);
}
a.expand-hidden {
padding-left: var(--topic-body-width-padding);
}
}
.topic-avatar {
border-top: 1px solid var(--primary-low);
padding-top: 15px;

View File

@ -2,6 +2,36 @@
// Topic lists
// --------------------------------------------------
.topic-list {
&-body {
border-width: 1px;
}
.num.posts-map {
font-size: var(--font-up-2);
padding: 0;
> button,
> a {
padding: 0;
}
}
.num.activity a {
padding: 0;
}
// so the topic excerpt is full width
// as the containing div is 80%
.topic-excerpt {
display: block;
padding-right: 0;
width: 120%;
}
.topic-excerpt-more {
color: var(--tertiary);
}
.right {
margin-left: 55px;
}
@ -65,6 +95,10 @@
margin-top: 0.5em;
z-index: z("base");
span.relative-date {
vertical-align: text-top;
}
.num.activity {
margin-left: auto;
font-size: var(--font-down-1);
@ -81,12 +115,6 @@
}
}
.topic-item-stats {
span.relative-date {
vertical-align: text-top;
}
}
.topic-item-stats__category-tags {
margin-right: 0.5em;
max-width: 90%;
@ -377,38 +405,6 @@ td .main-link {
}
}
.topic-list {
&-body {
border-width: 1px;
}
.num.posts-map {
font-size: var(--font-up-2);
padding: 0;
> button,
> a {
padding: 0;
}
}
.num.activity a {
padding: 0;
}
// so the topic excerpt is full width
// as the containing div is 80%
.topic-excerpt {
display: block;
padding-right: 0;
width: 120%;
}
.topic-excerpt-more {
color: var(--tertiary);
}
}
.category-list.with-topics .category-list-item .category-description {
display: none;
}

View File

@ -367,6 +367,7 @@
order: 2;
align-self: center;
text-align: right;
display: flex;
button {
margin: 0.25em;
@ -384,10 +385,6 @@
grid-column-end: -1;
order: 4;
}
td.invite-actions {
display: flex;
}
}
.user-invite-none {

View File

@ -19,19 +19,16 @@ body {
#ember-testing {
background-color: #fff;
}
.discourse-root {
background: var(--secondary);
}
#ember-testing {
width: 200%;
height: 200%;
transform: scale(0.5);
transform-origin: top left;
}
.discourse-root {
background: var(--secondary);
}
@media (prefers-color-scheme: dark) {
html {
background-color: #222;

View File

@ -53,6 +53,7 @@ $pd-font-family: arial, sans-serif !default;
// clear child float (pika-lendar), using the famous micro clearfix hack
// http://nicolasgallagher.com/micro-clearfix-hack/
/* stylelint-disable-next-line no-duplicate-selectors */
.pika-single {
&::before,
&::after {
@ -246,4 +247,4 @@ $pd-font-family: arial, sans-serif !default;
&:focus {
background-color: var(--tertiary-very-low);
}
}
}

View File

@ -194,6 +194,10 @@ body.wizard {
&__step-form {
display: flex;
flex: 1 0 50%;
@media only screen and (max-width: 568px) {
width: 100%;
}
}
&__sidebar {
@ -309,13 +313,6 @@ body.wizard {
}
}
&__step-form {
flex: 1 0 50%;
@media only screen and (max-width: 568px) {
width: 100%;
}
}
&__step.branding .wizard-container__description {
font-size: var(--font-0);
}

View File

@ -3,12 +3,6 @@
flex-direction: column;
}
.chat-form__row {
&.-separator {
border-bottom: 1px solid var(--primary-low);
}
}
.chat-form__section {
display: flex;
flex-direction: column;
@ -40,6 +34,10 @@
flex-direction: column;
justify-content: center;
&.-separator {
border-bottom: 1px solid var(--primary-low);
}
label,
.d-toggle-switch__checkbox-slider {
margin: 0;

View File

@ -124,10 +124,6 @@
}
}
&__participants-count {
white-space: nowrap;
}
&__warning-max-members {
padding-inline: 1rem;
}

View File

@ -44,6 +44,13 @@ $max_image_height: 150px;
.thumbnail.onebox-avatar {
display: none;
max-width: 20%;
margin-right: 0.5rem;
}
.thumbnail {
max-width: 100% !important;
margin: 0;
}
.aspect-image {
@ -62,16 +69,6 @@ $max_image_height: 150px;
p {
margin-top: 0.5rem;
}
.thumbnail {
max-width: 100% !important;
margin: 0;
&.onebox-avatar {
max-width: 20%;
margin-right: 0.5rem;
}
}
}
}
}

View File

@ -84,7 +84,7 @@
}
// unlinked, invalid mention
span.mention:not(--wide) {
span.mention:not(.--wide) {
color: var(--primary-high);
}
@ -159,19 +159,16 @@
}
.no-touch .chat-message-container {
&:hover,
&.-active {
background: var(--d-hover);
}
&:hover {
.chat-message-reaction-list .chat-message-react-btn {
visibility: visible;
}
}
&.-active,
&:hover {
&:hover,
&.-active {
background: var(--d-hover);
&.-bookmarked {
background: var(--highlight-medium);
}

View File

@ -10,6 +10,7 @@
.full-page-chat & {
padding-inline: 1rem;
box-sizing: border-box;
top: 2rem;
}
&__notice,
@ -37,7 +38,3 @@
}
}
}
.full-page-chat .chat-notices {
top: 2rem;
}

View File

@ -24,10 +24,6 @@
padding: 0 0.5rem;
}
.d-icon {
color: var(--primary-low-mid);
}
&.is-direct-reply {
display: flex;
cursor: pointer;

View File

@ -23,7 +23,6 @@ export default {
"shorthand-property-no-redundant-values": null,
"declaration-block-no-redundant-longhand-properties": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
"keyframes-name-pattern": null,
"selector-type-no-unknown": null,
"scss/dollar-variable-pattern": null,