settings: Hyphenate dense-mode classes.

This commit is contained in:
Karl Stolley 2024-04-25 11:38:45 -05:00 committed by Tim Abbott
parent 2763be8977
commit 0cfd4c8eed
3 changed files with 5 additions and 5 deletions

View File

@ -769,8 +769,8 @@ export function dispatch_normal_event(event) {
activity_ui.build_user_sidebar();
}
if (event.property === "dense_mode") {
$("body").toggleClass("less_dense_mode");
$("body").toggleClass("more_dense_mode");
$("body").toggleClass("less-dense-mode");
$("body").toggleClass("more-dense-mode");
}
if (
event.property === "web_font_size_px" ||

View File

@ -278,9 +278,9 @@ export function initialize_kitchen_sink_stuff() {
}
if (!user_settings.dense_mode) {
$("body").addClass("less_dense_mode");
$("body").addClass("less-dense-mode");
} else {
$("body").addClass("more_dense_mode");
$("body").addClass("more-dense-mode");
}
// To keep the specificity same for the CSS related to hiding the

View File

@ -930,7 +930,7 @@ run_test("user_settings", ({override}) => {
toggled = [];
dispatch(event);
assert_same(user_settings.dense_mode, true);
assert_same(toggled, ["less_dense_mode", "more_dense_mode"]);
assert_same(toggled, ["less-dense-mode", "more-dense-mode"]);
event = event_fixtures.user_settings__web_font_size_px;
user_settings.web_font_size_px = 14;