DEV: unused CSS cleanup, variable updates, simplification (#26111)

This commit is contained in:
Kris
2024-03-11 09:07:53 -04:00
committed by GitHub
parent f52dafe3cc
commit 8b4730e52c
23 changed files with 44 additions and 146 deletions

View File

@ -1,4 +1,4 @@
<section class="field">
<section class="field category-name-fields">
{{#unless this.category.isUncategorizedCategory}}
<section class="field-item">
<label>{{i18n "category.name"}}</label>

View File

@ -8,7 +8,7 @@
@icon="plus"
@action={{this.addSection}}
@title="sidebar.sections.custom.add"
class="btn-flat add-section"
class="btn-flat sidebar-footer-actions-button add-section"
/>
{{/if}}
@ -22,7 +22,7 @@
@action={{route-action "toggleMobileView"}}
@title={{if this.site.mobileView "desktop_view" "mobile_view"}}
@icon={{if this.site.mobileView "desktop" "mobile-alt"}}
class="sidebar-footer-actions-button sidebar-footer-actions-toggle-mobile-view"
class="btn-flat sidebar-footer-actions-button sidebar-footer-actions-toggle-mobile-view"
/>
{{/if}}

View File

@ -39,8 +39,6 @@
@import "personal-message";
@import "popup-menu";
@import "redirection";
@import "request_access";
@import "request-group-membership-form";
@import "reviewables";
@import "revise-and-reject-post-reviewable";
@import "rtl";

View File

@ -254,6 +254,12 @@ html.composer-open {
max-width: 100%;
width: auto;
&.has-selection {
.name {
font-size: var(--font-up-1);
}
}
.select-kit-header {
color: var(--primary-high);
white-space: nowrap;
@ -269,7 +275,6 @@ html.composer-open {
overflow: hidden;
.name {
display: flex;
font-size: var(--font-up-1);
max-width: 100%;
gap: 0 0.5em;
.badge-category {

View File

@ -342,3 +342,10 @@ body > noscript {
display: none !important;
}
}
.user-crawler {
.username {
margin-left: 5px;
display: inline-block;
}
}

View File

@ -13,21 +13,6 @@
}
// Animation Keyframes
@keyframes ping {
0% {
transform: scale(0.6);
box-shadow: 0 0 0 0 rgba(var(--success-rgb), 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(var(--success-rgb), 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(var(--success-rgb), 0);
}
}
@keyframes rotate-forever {
0% {
transform: rotate(0deg);

View File

@ -44,6 +44,12 @@ div.edit-category {
margin-bottom: 1em;
}
.category-name-fields {
display: flex;
flex-wrap: wrap;
gap: 1em;
}
.warning {
background-color: var(--tertiary-low);
padding: 0.5em 2.5em 0.5em 1em;

View File

@ -12,7 +12,6 @@
display: flex;
align-items: center;
width: 100%;
z-index: z("header");
background-color: var(--header_background);
box-shadow: var(--shadow-header);
backface-visibility: hidden; /** do magic for scrolling performance **/

View File

@ -1,5 +0,0 @@
.request-group-membership-form {
label {
font-weight: bold;
}
}

View File

@ -1,13 +0,0 @@
#request-access {
width: 325px;
margin: 0 auto;
input[type="text"] {
width: 320px;
height: 30px;
font-size: var(--font-up-3);
}
input[type="submit"] {
font-size: var(--font-up-3);
padding: 10px;
}
}

View File

@ -403,8 +403,6 @@
margin-top: 1em;
}
// temporary
.search-results {
.fps-user-item {
display: flex;

View File

@ -1,10 +1,9 @@
.shared-draft-controls {
margin-bottom: 1em;
background-color: var(--tertiary-low);
padding: 1em;
.publish-field {
margin-top: 1em;
}
clear: both;
}

View File

@ -56,9 +56,13 @@
font-size: var(--font-down-1);
color: var(--d-sidebar-link-icon-color);
}
&:focus,
&:hover {
background: var(--d-sidebar-highlight-background);
.d-icon {
color: var(--d-sidebar-highlight-color);
}
}
}
}

View File

@ -130,17 +130,6 @@
}
}
}
.sidebar-footer-wrapper {
.btn-flat.add-section {
padding: 0.25em 0.4em;
&:hover {
background: var(--d-sidebar-highlight-background);
svg {
color: var(--d-sidebar-link-icon-color);
}
}
}
}
}
.sidebar-section-form-modal {

View File

@ -1,11 +1,11 @@
$discourse-tooltip-background: var(--secondary);
$discourse-tooltip-border: var(--primary-medium);
#discourse-tooltip {
background-color: $discourse-tooltip-background;
--d-tooltip-background: var(--secondary);
--d-tooltip-border: var(--primary-medium);
background-color: var(--d-tooltip-background);
position: absolute;
z-index: z("tooltip");
border: 1px solid $discourse-tooltip-border;
border: 1px solid var(--d-tooltip-border);
max-width: 400px;
margin-top: 25px;
overflow-wrap: break-word;
@ -14,12 +14,12 @@ $discourse-tooltip-border: var(--primary-medium);
font-weight: 500;
&.retina {
border: 0.5px solid $discourse-tooltip-border;
border: 0.5px solid var(--d-tooltip-border);
}
.tooltip-pointer {
position: relative;
background: $discourse-tooltip-background;
background: var(--d-tooltip-background);
}
.tooltip-pointer:before,
@ -34,7 +34,7 @@ $discourse-tooltip-border: var(--primary-medium);
}
.tooltip-pointer:after {
border-bottom-color: $discourse-tooltip-background;
border-bottom-color: var(--d-tooltip-background);
border-width: 8px;
left: 50%;
margin-left: -8px;
@ -42,7 +42,7 @@ $discourse-tooltip-border: var(--primary-medium);
}
.tooltip-pointer:before {
border-bottom-color: $discourse-tooltip-border;
border-bottom-color: var(--d-tooltip-border);
border-width: 9px;
left: 50%;
margin-left: -9px;

View File

@ -1,5 +1,3 @@
$topic-progress-height: 42px;
@keyframes button-jump-up {
0% {
margin-bottom: -60px;
@ -191,12 +189,13 @@ $topic-progress-height: 42px;
}
#topic-progress {
--topic-progress-height: 42px;
position: relative;
background-color: var(--secondary);
color: var(--tertiary);
border: 1px solid var(--tertiary-low);
width: 145px;
height: $topic-progress-height;
height: var(--topic-progress-height);
/* as a big ol' click target, don't let text inside be selected */
@include unselectable;

View File

@ -377,11 +377,11 @@
margin: 0;
}
}
$label-max-width: 300px;
--label-max-width: 300px;
label.radio {
display: flex;
align-items: center;
max-width: $label-max-width;
max-width: var(--label-max-width);
margin: 0 0.5em 0 0;
padding: 0;
.avatar {
@ -392,7 +392,7 @@
.error {
color: var(--danger);
margin: 0;
max-width: calc(#{$label-max-width} - 20px);
max-width: calc(var(--label-max-width) - 20px);
grid-column-start: 2;
grid-column-end: 3;
}

View File

@ -40,13 +40,6 @@
border: 0;
}
// Affix
// --------------------------------------------------
.affix {
position: fixed;
}
// Contain floats
// --------------------------------------------------
@ -76,7 +69,3 @@
.clickable {
cursor: pointer;
}
.non-clickable {
cursor: default;
}

View File

@ -2,7 +2,6 @@
@import "category-list";
@import "compose";
@import "discourse";
@import "edit-category";
@import "header";
@import "invite-signup";
@import "latest-topic-list";

View File

@ -30,9 +30,6 @@ body.dragging {
}
}
/***********************/
/* bootstrap carryover */
/***********************/
code,
pre {
font-family: var(--d-font-family--monospace);
@ -51,7 +48,7 @@ h6 {
}
form {
margin: 0 0 18px;
margin: 0;
}
label,
@ -76,6 +73,7 @@ textarea {
input,
textarea {
width: 210px;
margin-left: 0;
}
select,
@ -93,21 +91,6 @@ select {
}
}
input,
textarea {
margin-left: 0;
}
input {
&[type="radio"],
&[type="checkbox"] {
&[disabled],
&[readonly] {
background-color: transparent;
}
}
}
.input {
&-xxlarge,
&-xxlarge + .control-instructions {
@ -158,18 +141,6 @@ input {
}
}
/* bootstrap columns */
.offset {
&2 {
margin-left: 116px;
}
&1 {
margin-left: 64px;
}
}
// Media Queries
@media all and (max-width: 570px) {
body {
@ -201,7 +172,6 @@ body.has-sidebar-page {
@media (prefers-reduced-motion: no-preference) {
body.sidebar-animate {
#main-outlet-wrapper {
// grid-template-columns transition supported in Firefox, Chrome support coming summer 2022
transition-property: grid-template-columns, max-width;
transition-timing-function: var(--d-sidebar-animation-ease);
transition-duration: var(--d-sidebar-animation-time);

View File

@ -1,11 +0,0 @@
.edit-category {
section.field {
.field-item {
display: inline-block;
vertical-align: top;
+ .field-item {
margin-left: 1em;
}
}
}
}

View File

@ -3,7 +3,6 @@
// --------------------------------------------------
.d-header {
left: 0;
height: 4em;
#site-text-logo {
font-size: var(--font-up-3);

View File

@ -1,12 +1,4 @@
// Desktop styles for "/user" section
.user-content-wrapper {
&,
> .user-stream {
> .alert:first-child {
margin-top: 10px;
}
}
}
.user-profile-hidden {
font-size: 1.5em;
@ -223,21 +215,10 @@ table.user-invite-list {
.user-messages-page {
.topic-list th {
padding-top: 4px;
padding-top: 0;
}
.show-mores {
position: absolute;
}
}
.user-messages {
margin-right: 0.2em;
}
.user-crawler {
.username {
margin-left: 5px;
display: inline-block;
}
}