Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
styles: Convert [disabled] selectors to :disabled pseudo-class.
Anders Kaseorg192f1eb0fcd8
diff --git a/frontend_tests/node_tests/dropdown_list_widget.js b/frontend_tests/node_tests/dropdown_list_widget.jsindex afd13e89a67..21d033299bd 100644--- a/frontend_tests/node_tests/dropdown_list_widget.js+++ b/frontend_tests/node_tests/dropdown_list_widget.js@@ -14,7 +14,7 @@ const setup_zjquery_data = (name) => {$.clear_all_elements();const input_group = $(".input_group");const reset_button = $(".dropdown_list_reset_button");- input_group.set_find_results(".dropdown_list_reset_button:not([disabled])", reset_button);+ input_group.set_find_results(".dropdown_list_reset_button:enabled", reset_button);$(`#${name}_widget #${name}_name`).closest = () => input_group;const $widget = $(`#${name}_widget #${name}_name`);return {reset_button, $widget};diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.jsindex 8151983f61f..a14021230cf 100644--- a/frontend_tests/node_tests/settings_org.js+++ b/frontend_tests/node_tests/settings_org.js@@ -929,7 +929,7 @@ run_test("misc", () => {const stub_notification_disable_parent = $.create("<stub notification_disable parent");stub_notification_disable_parent.set_find_results(- ".dropdown_list_reset_button:not([disabled])",+ ".dropdown_list_reset_button:enabled",$.create("<disable link>"),);@@ -1010,7 +1010,7 @@ run_test("misc", () => {];const dropdown_list_parent = $.create("<list parent>");dropdown_list_parent.set_find_results(- ".dropdown_list_reset_button:not([disabled])",+ ".dropdown_list_reset_button:enabled",$.create("<disable button>"),);widget_settings.forEach((name) => {diff --git a/static/js/dropdown_list_widget.js b/static/js/dropdown_list_widget.jsindex 9560b9a8882..67fde5dd849 100644--- a/static/js/dropdown_list_widget.js+++ b/static/js/dropdown_list_widget.js@@ -30,7 +30,7 @@ const DropdownListWidget = function (opts) {if (!value || value === opts.null_value) {elem.text(opts.default_text);elem.addClass("text-warning");- elem.closest(".input-group").find(".dropdown_list_reset_button:not([disabled])").hide();+ elem.closest(".input-group").find(".dropdown_list_reset_button:enabled").hide();return;}@@ -39,7 +39,7 @@ const DropdownListWidget = function (opts) {const text = opts.render_text(item.name);elem.text(text);elem.removeClass("text-warning");- elem.closest(".input-group").find(".dropdown_list_reset_button:not([disabled])").show();+ elem.closest(".input-group").find(".dropdown_list_reset_button:enabled").show();};const update = (value) => {diff --git a/static/styles/app_components.css b/static/styles/app_components.cssindex d3572a67855..a9d4a30ca1b 100644--- a/static/styles/app_components.css+++ b/static/styles/app_components.css@@ -177,7 +177,7 @@}}- &[disabled="disabled"] {+ &:disabled {cursor: not-allowed;filter: saturate(0);background-color: hsl(0, 0%, 93%);@@ -330,14 +330,14 @@color: hsl(0, 0%, 0%);}- &[disabled] {+ &:disabled {visibility: hidden;}&,&:focus,&:active,- &[disabled]:hover {+ &:disabled:hover {position: relative;right: 20px;background: none;diff --git a/static/styles/night_mode.css b/static/styles/night_mode.cssindex b419aff7f7e..48f65ed7448 100644--- a/static/styles/night_mode.css+++ b/static/styles/night_mode.css@@ -115,7 +115,7 @@ on a dark background, and don't change the dark labels dark either. */}/* these are converting grey things to "new grey" */- *[disabled="disabled"],+ :disabled,*[readonly="readonly"],.sidebar-title,.recipient_row_date {@@ -329,7 +329,7 @@ on a dark background, and don't change the dark labels dark either. */.clear_search_button,.clear_search_button:focus,.clear_search_button:active,- .clear_search_button[disabled]:hover,+ .clear_search_button:disabled:hover,#user-groups .save-instructions,#message_view_header .search_icon,#searchbox_legacy .search_icon,diff --git a/static/styles/portico/billing.css b/static/styles/portico/billing.cssindex 11b8a52c3fd..fcbf6c0f3d0 100644--- a/static/styles/portico/billing.css+++ b/static/styles/portico/billing.css@@ -143,7 +143,7 @@}.stripe-button-el:active,- .stripe-button-el:not(:disabled):active {+ .stripe-button-el:enabled:active {background-color: hsl(169, 70%, 32%);span {background: 0;diff --git a/static/styles/zulip.css b/static/styles/zulip.cssindex fc4e58661b0..5fb8ca6ff3f 100644--- a/static/styles/zulip.css+++ b/static/styles/zulip.css@@ -1773,7 +1773,7 @@ div.focused_table {}.search_button,- .search_button[disabled]:hover {+ .search_button:disabled:hover {position: absolute;right: 35px;top: 6px;@@ -1794,7 +1794,7 @@ div.focused_table {color: hsl(0, 0%, 0%);}- .search_button[disabled] {+ .search_button:disabled {visibility: hidden;}@@ -2838,7 +2838,7 @@ select.inline_select_topic_edit {}.search_button,- .search_button[disabled]:hover {+ .search_button:disabled:hover {top: 0;}}