From 1f7d2367424b0381e7cc095fb2755a1691311099 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Tue, 21 Nov 2023 10:00:18 +0100 Subject: [PATCH] gui: Specialize a special-purpose checkbox style (#9236) ### Purpose Discovered while working on the WebAuthn credentials table in #9175: there's a style on `td input[type="checkbox"]` that modifies margins for all checkboxes in ``s. It looks like this style is specially tailored to the particular table that added it (PR #8734), so it should have a correspondingly special-purpose class to not accidentally apply it to other tables. As best as I could tell there are only 2 instances of `` in `
`s, shown in the screenshots below. ### Testing - Open "Actions > Logging > Debugging Facilities" and observe the vertical spacing of the checkboxes. - Open "Edit Folder > Advanced", check "Sync Extended Attributes" or "Send Extended Attributes", click "Add filter entry" and observe the vertical spacing of the checkbox that appears. ### Screenshots #### Before ![Logs > Debugging Facilities](https://github.com/syncthing/syncthing/assets/1367758/998fc66d-a0ad-41d9-a476-7a2b3da622d1) ![Add filter entry](https://github.com/syncthing/syncthing/assets/1367758/647cb565-fcd0-4a81-a6ca-1f75137039b0) #### After Logs > Debugging Facilities now more compact: ![Logs > Debugging Facilities now ](https://github.com/syncthing/syncthing/assets/1367758/7cf8fc77-610e-4b4a-be21-c50d30be7bb9) Add filter entry unchanged: ![Add filter entry](https://github.com/syncthing/syncthing/assets/1367758/0ba710d6-cee1-49b4-92bc-acfc0c22c2bd) --- gui/default/assets/css/overrides.css | 3 ++- gui/default/syncthing/folder/editFolderModalView.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/default/assets/css/overrides.css b/gui/default/assets/css/overrides.css index 62abbbec6..2adebda39 100644 --- a/gui/default/assets/css/overrides.css +++ b/gui/default/assets/css/overrides.css @@ -143,7 +143,8 @@ table.table-auto td { max-width: 0px; } -td input[type="checkbox"] { +/* Tag name is needed for selector to be specific enough to override Bootstrap style */ +input[type="checkbox"].extended-attributes-filter-rule-checkbox { margin-top: 13px; } diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index 2faa72d57..696f143a2 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -344,7 +344,7 @@
- +