styles: Merge duplicate selectors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-08-05 17:34:58 -07:00 committed by Tim Abbott
parent 3572dcc67c
commit 6dea671fde
10 changed files with 128 additions and 179 deletions

View File

@ -57,10 +57,7 @@ $alert-error-red: hsl(0, 80%, 40%);
overscroll-behavior: contain; overscroll-behavior: contain;
.stacktrace { .stacktrace {
@extend .alert-display; @extend .alert-display, .alert-animations;
}
.stacktrace {
@extend .alert-animations;
font-size: 1rem; font-size: 1rem;
color: hsl(0, 80%, 40%); color: hsl(0, 80%, 40%);

View File

@ -45,6 +45,14 @@
.compose-content { .compose-content {
border-top: 1px solid hsla(0, 0%, 0%, 0.07); border-top: 1px solid hsla(0, 0%, 0%, 0.07);
transition: background-color 200ms linear; transition: background-color 200ms linear;
padding: 8px 10px 8px 10px;
margin-left: 250px;
margin-right: 250px;
position: relative;
border-left: 1px solid hsl(0, 0%, 93%);
border-right: 1px solid hsl(0, 0%, 93%);
} }
.ztable_comp_col1 { .ztable_comp_col1 {
@ -165,16 +173,6 @@
margin: auto; margin: auto;
} }
.compose-content {
padding: 8px 10px 8px 10px;
margin-left: 250px;
margin-right: 250px;
position: relative;
border-left: 1px solid hsl(0, 0%, 93%);
border-right: 1px solid hsl(0, 0%, 93%);
}
#compose_close { #compose_close {
display: none; display: none;
position: absolute; position: absolute;

View File

@ -236,10 +236,6 @@ on a dark background, and don't change the dark labels dark either. */
.message-header-contents, .message-header-contents,
.message_header_private_message .message-header-contents { .message_header_private_message .message-header-contents {
background-color: hsla(0, 0%, 0%, 0.2); background-color: hsla(0, 0%, 0%, 0.2);
}
.message-header-contents,
.message_header_private_message .message-header-contents {
border-color: transparent; border-color: transparent;
} }

View File

@ -167,6 +167,15 @@ ul {
margin: -14px; margin: -14px;
padding: 0; padding: 0;
.popover-title {
padding: 0;
border-color: hsla(0, 0%, 0%, 0.2);
}
.popover_info li {
word-wrap: break-word;
}
} }
.message-info-popover { .message-info-popover {
@ -228,17 +237,6 @@ ul {
} }
} }
.user_popover {
.popover-title {
padding: 0;
border-color: hsla(0, 0%, 0%, 0.2);
}
.popover_info li {
word-wrap: break-word;
}
}
.popover-avatar { .popover-avatar {
height: 240px; height: 240px;
width: 240px; width: 240px;

View File

@ -351,9 +351,7 @@ nav {
padding-top: 120px; padding-top: 120px;
z-index: 1; z-index: 1;
}
.portico-landing {
&.show { &.show {
opacity: 1; opacity: 1;
} }
@ -2057,9 +2055,6 @@ nav {
.portico-landing.apps .hero h1 { .portico-landing.apps .hero h1 {
font-size: 3em; font-size: 3em;
margin-bottom: 0px; margin-bottom: 0px;
}
.portico-landing.apps .hero h1 {
margin-top: 0px; margin-top: 0px;
} }
@ -3303,9 +3298,6 @@ nav {
.portico-landing.why-page .hero { .portico-landing.why-page .hero {
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
}
.portico-landing.why-page .hero {
font-size: 0.6em; font-size: 0.6em;
} }
@ -3464,28 +3456,24 @@ nav {
} }
nav { nav {
ul {
margin-top: 0px;
text-align: left;
}
.content {
display: inline-block;
z-index: 11;
}
.hamburger { .hamburger {
display: inline-block; display: inline-block;
float: right; float: right;
} }
.content { .content {
display: inline-block;
z-index: 11;
> ul.show { > ul.show {
outline-color: hsla(203, 43%, 22%, 0.7); outline-color: hsla(203, 43%, 22%, 0.7);
} }
} }
ul { ul {
margin-top: 0px;
text-align: left;
position: fixed; position: fixed;
float: none; float: none;
top: 0; top: 0;

View File

@ -54,7 +54,7 @@ html {
.header { .header {
position: relative; position: relative;
padding: 6px 0px; padding: 15px 0;
height: 29px; height: 29px;
background-color: hsl(0, 0%, 100%); background-color: hsl(0, 0%, 100%);
@ -545,10 +545,6 @@ input.text-error {
/* -- end new footer -- */ /* -- end new footer -- */
.header {
padding: 15px 0;
}
.header-main { .header-main {
.logo { .logo {
display: block; display: block;
@ -1594,10 +1590,6 @@ label.label-title {
font-weight: 600; font-weight: 600;
} }
input.new-organization-button {
margin-left: auto;
}
.inline-block { .inline-block {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;

View File

@ -455,95 +455,6 @@ input[type="checkbox"] {
} }
} }
#settings_page {
.icon-button {
border-radius: 5px;
border: 1px solid hsl(0, 0%, 80%);
font-size: 14px;
padding: 3px 14px 4px 11px;
text-decoration: none;
color: hsl(0, 0%, 47%);
min-width: 80px;
line-height: 16px;
&:hover {
background-color: hsl(0, 0%, 100%);
border: 1px solid hsl(0, 0%, 61%);
color: hsl(0, 0%, 18%);
.icon-button-icon {
color: hsl(0, 0%, 47%);
}
}
&.primary {
background-color: hsl(156, 30%, 50%);
color: hsl(0, 0%, 100%);
border: 1px solid hsl(155, 30%, 50%);
&:hover {
background-color: hsl(166, 35%, 57%);
border: 1px solid hsl(166, 35%, 57%);
}
.icon-button-icon {
font-weight: lighter;
color: hsl(0, 0%, 100%);
}
&.saving {
background-color: hsl(156, 14%, 40%);
border-color: hsl(156, 14%, 40%);
}
}
.icon-button-icon {
vertical-align: bottom;
margin-right: 3px;
margin-bottom: 1px;
font-size: 15px;
font-weight: 500;
}
}
.save-button-controls {
display: inline;
margin-left: 15px;
&.hide {
display: none;
}
}
.save-button {
margin-right: 5px;
.icon-button-loading {
display: none;
}
&.saving {
.icon-button-icon {
display: none;
}
.icon-button-loading {
display: inline-block;
margin-right: 2px;
}
}
}
.admin-realm-time-limit-input {
width: 5ch;
text-align: right;
}
.realm-time-limit-label {
vertical-align: middle;
}
}
.organization-settings-parent > div:first-of-type { .organization-settings-parent > div:first-of-type {
margin-top: 10px; margin-top: 10px;
} }
@ -1179,6 +1090,93 @@ input[type="checkbox"] {
overflow: hidden; overflow: hidden;
border-radius: 4px; border-radius: 4px;
.icon-button {
border-radius: 5px;
border: 1px solid hsl(0, 0%, 80%);
font-size: 14px;
padding: 3px 14px 4px 11px;
text-decoration: none;
color: hsl(0, 0%, 47%);
min-width: 80px;
line-height: 16px;
&:hover {
background-color: hsl(0, 0%, 100%);
border: 1px solid hsl(0, 0%, 61%);
color: hsl(0, 0%, 18%);
.icon-button-icon {
color: hsl(0, 0%, 47%);
}
}
&.primary {
background-color: hsl(156, 30%, 50%);
color: hsl(0, 0%, 100%);
border: 1px solid hsl(155, 30%, 50%);
&:hover {
background-color: hsl(166, 35%, 57%);
border: 1px solid hsl(166, 35%, 57%);
}
.icon-button-icon {
font-weight: lighter;
color: hsl(0, 0%, 100%);
}
&.saving {
background-color: hsl(156, 14%, 40%);
border-color: hsl(156, 14%, 40%);
}
}
.icon-button-icon {
vertical-align: bottom;
margin-right: 3px;
margin-bottom: 1px;
font-size: 15px;
font-weight: 500;
}
}
.save-button-controls {
display: inline;
margin-left: 15px;
&.hide {
display: none;
}
}
.save-button {
margin-right: 5px;
.icon-button-loading {
display: none;
}
&.saving {
.icon-button-icon {
display: none;
}
.icon-button-loading {
display: inline-block;
margin-right: 2px;
}
}
}
.admin-realm-time-limit-input {
width: 5ch;
text-align: right;
}
.realm-time-limit-label {
vertical-align: middle;
}
h3 { h3 {
font-size: 1.5em; font-size: 1.5em;
font-weight: normal; font-weight: normal;

View File

@ -76,6 +76,20 @@ button {
border-color: hsl(157, 18%, 77%); border-color: hsl(157, 18%, 77%);
padding: 0px; padding: 0px;
} }
&.add-task,
&.add-desc,
&.poll-option,
&.poll-question {
border-radius: 3px;
border: 1px solid hsl(0, 0%, 80%);
background-color: hsl(0, 0%, 100%);
width: 100px;
&:hover {
border-color: hsl(0, 0%, 60%);
}
}
} }
img.task-completed { img.task-completed {
@ -93,22 +107,6 @@ button {
} }
} }
button {
&.add-task,
&.add-desc,
&.poll-option,
&.poll-question {
border-radius: 3px;
border: 1px solid hsl(0, 0%, 80%);
background-color: hsl(0, 0%, 100%);
width: 100px;
&:hover {
border-color: hsl(0, 0%, 60%);
}
}
}
.widget-error { .widget-error {
color: hsl(1, 45%, 50%); color: hsl(1, 45%, 50%);
font-size: 12px; font-size: 12px;

View File

@ -922,9 +922,6 @@ td.pointer {
.summary_row { .summary_row {
.message_header { .message_header {
padding: 5px 0px 4px 5px; padding: 5px 0px 4px 5px;
}
.message_header {
border-radius: 0; border-radius: 0;
} }
@ -2562,13 +2559,9 @@ select.inline_select_topic_edit {
box-shadow: 0px 0px 5px hsla(0, 0%, 0%, 0.2); box-shadow: 0px 0px 5px hsla(0, 0%, 0%, 0.2);
&::after { &::after {
right: 10px;
}
}
.nav .dropdown-menu::after {
right: 21px; right: 21px;
} }
}
.column-middle { .column-middle {
margin-right: 7px; margin-right: 7px;
@ -2759,17 +2752,13 @@ select.inline_select_topic_edit {
#message_view_header_underpadding { #message_view_header_underpadding {
top: 30px; top: 30px;
height: 10px;
} }
.messagebox-content { .messagebox-content {
padding-right: 15px; padding-right: 15px;
} }
.message_time {
right: auto;
left: -3px;
}
/* In mobile views we place it just to the right of the time element */ /* In mobile views we place it just to the right of the time element */
.message_controls { .message_controls {
right: 40px; right: 40px;
@ -2794,10 +2783,6 @@ select.inline_select_topic_edit {
line-height: 15px; line-height: 15px;
} }
#message_view_header_underpadding {
height: 10px;
}
#floating_recipient_bar { #floating_recipient_bar {
top: 40px; top: 40px;
} }

View File

@ -10,7 +10,6 @@ module.exports = {
// Disable recommended rules we don't comply with yet // Disable recommended rules we don't comply with yet
"font-family-no-missing-generic-family-keyword": null, "font-family-no-missing-generic-family-keyword": null,
"no-descending-specificity": null, "no-descending-specificity": null,
"no-duplicate-selectors": null,
// Disable standard rules we don't comply with yet // Disable standard rules we don't comply with yet
"comment-empty-line-before": null, "comment-empty-line-before": null,