PERF: eliminate some slow CSS selectors (#25392)

This commit is contained in:
Kris 2024-01-26 13:10:45 -05:00 committed by GitHub
parent 4e72b06a54
commit 6b185f8655
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 23 additions and 35 deletions

View File

@ -240,11 +240,16 @@
{{/if}} {{/if}}
<div <div
class="directory-table__cell user-role{{if class={{concat-class
(or user.admin user.moderator user.second_factor_enabled) "directory-table__cell"
'' "user-role"
'--empty' (if
}}" (not
(or user.admin user.moderator user.second_factor_enabled)
)
"--empty"
)
}}
> >
<span class="directory-table__label"> <span class="directory-table__label">
<span>{{i18n "admin.users.status"}}</span> <span>{{i18n "admin.users.status"}}</span>

View File

@ -224,7 +224,7 @@
.main-link { .main-link {
@extend .topic-list-main-link; @extend .topic-list-main-link;
.raw-topic-link > * { .raw-topic-link a {
pointer-events: none; pointer-events: none;
} }

View File

@ -80,9 +80,6 @@ body > noscript {
table-layout: fixed; table-layout: fixed;
overflow: hidden; overflow: hidden;
margin: 2em 0; margin: 2em 0;
.posters > a {
float: none;
}
thead { thead {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;

View File

@ -314,7 +314,7 @@
} }
} }
[class*="--empty"] { .--empty {
display: none; display: none;
} }
} }

View File

@ -281,11 +281,6 @@ textarea {
color: var(--d-input-text-color); color: var(--d-input-text-color);
caret-color: currentColor; caret-color: currentColor;
&[class*="span"] {
float: none;
margin-left: 0;
}
&[disabled], &[disabled],
&[readonly] { &[readonly] {
cursor: not-allowed; cursor: not-allowed;

View File

@ -18,7 +18,7 @@ $topic-progress-height: 42px;
} }
} }
[class*="archetype-"] { #main-outlet {
--below-topic-margin: 0.75em; --below-topic-margin: 0.75em;
} }

View File

@ -1,8 +1,7 @@
.color-picker { .color-picker {
display: flex; display: flex;
* { align-items: stretch;
height: 35px;
}
.add-on { .add-on {
@include form-item-sizing; @include form-item-sizing;
background-color: var(--primary-low); background-color: var(--primary-low);
@ -12,13 +11,14 @@
padding-right: 0.5em; padding-right: 0.5em;
} }
.hex-input { .hex-input {
margin-right: 0; margin: 0;
} }
.picker { .picker {
padding: 0; padding: 0;
border-left: none; border-left: none;
cursor: pointer; cursor: pointer;
margin-bottom: 0; margin-bottom: 0;
height: unset;
} }
// Reset webkit/blink default style // Reset webkit/blink default style
input[type="color"]::-webkit-color-swatch-wrapper { input[type="color"]::-webkit-color-swatch-wrapper {

View File

@ -172,13 +172,6 @@ html.ios-device.keyboard-visible body #main-outlet .full-page-chat {
} }
} }
.topic-title-chat-icon {
display: inline-block;
* {
display: inline-block;
}
}
body.has-sidebar-page.has-full-page-chat #main-outlet-wrapper { body.has-sidebar-page.has-full-page-chat #main-outlet-wrapper {
gap: 0; gap: 0;
} }

View File

@ -46,13 +46,10 @@ html.rtl {
left: var(--composer-right, 20px); left: var(--composer-right, 20px);
right: 0; right: 0;
} }
> * {
pointer-events: auto;
}
} }
.chat-drawer { .chat-drawer {
pointer-events: auto;
align-self: flex-end; align-self: flex-end;
width: 400px; width: 400px;
min-width: 250px !important; // important to override inline styles min-width: 250px !important; // important to override inline styles

View File

@ -1,5 +1,6 @@
.discourse-local-date { .discourse-local-date {
> * { svg,
span {
pointer-events: none; pointer-events: none;
} }

View File

@ -1,7 +1,4 @@
div.poll { div.poll {
> * {
box-sizing: border-box;
}
margin: 1em 0; margin: 1em 0;
border: 1px solid var(--primary-low); border: 1px solid var(--primary-low);
display: grid; display: grid;
@ -38,6 +35,7 @@ div.poll {
} }
.poll-info { .poll-info {
box-sizing: border-box;
grid-area: info; grid-area: info;
display: flex; display: flex;
line-height: var(--line-height-medium); line-height: var(--line-height-medium);
@ -207,6 +205,7 @@ div.poll {
} }
.poll-container { .poll-container {
box-sizing: border-box;
grid-area: poll; grid-area: poll;
padding: 1em; padding: 1em;
width: 100%; width: 100%;
@ -230,6 +229,7 @@ div.poll {
} }
.poll-buttons { .poll-buttons {
box-sizing: border-box;
grid-area: buttons; grid-area: buttons;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;