From bbb89605a5567a2fcdba079253121d7d4ef07497 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 12 Feb 2022 16:10:40 +0100 Subject: [PATCH 1/9] Page must have one main landmark https://dequeuniversity.com/rules/axe/4.3/landmark-one-main --- bookwyrm/templates/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 43e8eb22..810b46b7 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -206,7 +206,7 @@ {% endif %} -
+
{# almost every view needs to know the user shelves #} {% with request.user.shelf_set.all as user_shelves %} @@ -214,7 +214,7 @@ {% endblock %} {% endwith %}
-
+
From b27b6a59808de3669cf0d655138ea34ddd9ee94a Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 12 Feb 2022 16:14:35 +0100 Subject: [PATCH 2/9] Certain ARIA roles must contain particular children https://dequeuniversity.com/rules/axe/4.3/aria-required-children In order to make this work, I had to translate Bulma's style so it doesn't use `ul` and `li` anymore. The JS code had to be adapted, I also changed `button` to `tab` (seemed like a more relevant name) and added a `scrollIntoView()` on load the active tab is always visible. --- bookwyrm/static/css/bookwyrm.css | 153 ++++++++++++++++++ bookwyrm/static/js/vendor/tabs.js | 60 +++---- bookwyrm/templates/feed/suggested_books.html | 51 +++--- .../templates/snippets/create_status.html | 67 ++++---- 4 files changed, 238 insertions(+), 93 deletions(-) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index f05ea3c9..51c518b4 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -301,6 +301,159 @@ details.dropdown .dropdown-menu a:focus-visible { } } +/** Bookwyrm Tabs + ******************************************************************************/ + +.bw-tabs { + -webkit-overflow-scrolling:touch; + -webkit-touch-callout:none; + position: relative; + align-items:center; + display:flex; + font-size:1rem; + justify-content:flex-start; + overflow-x:auto; + overflow-y:hidden; + user-select:none; + white-space:nowrap +} +.bw-tabs::before { + border-bottom-color:#dbdbdb; + border-bottom-style:solid; + border-bottom-width:1px; + bottom: 0; + content:""; + position: absolute; + width: 100%; +} +.bw-tabs:not(:last-child) { + margin-bottom:1.5rem +} +.bw-tabs a { + align-items:center; + border-bottom-color:#dbdbdb; + border-bottom-style:solid; + border-bottom-width:1px; + color:#4a4a4a; + display:flex; + justify-content:center; + margin-bottom:-1px; + padding:.5em 1em; + position: relative; +} +.bw-tabs a:hover { + border-bottom-color:transparent; + color:#363636 +} +.bw-tabs a.is-active { + border-bottom-color:transparent; + color:#3273dc +} +.bw-tabs.is-left { + padding-right:.75em +} +.bw-tabs.is-center { + flex:none; + justify-content:center; + padding-left:.75em; + padding-right:.75em +} +.bw-tabs.is-right { + justify-content:flex-end; + padding-left:.75em +} +.bw-tabs .icon:first-child { + margin-right:.5em +} +.bw-tabs .icon:last-child { + margin-left:.5em +} +.bw-tabs.is-centered { + justify-content:center +} +.bw-tabs.is-right { + justify-content:flex-end +} +.bw-tabs.is-boxed a { + border:1px solid transparent; + border-radius:4px 4px 0 0 +} +.bw-tabs.is-boxed a:hover { + background-color:#f5f5f5; + border-bottom-color:#dbdbdb +} +.bw-tabs.is-boxed a.is-active { + background-color:#fff; + border-color:#dbdbdb; + border-bottom-color:#fff!important +} +.bw-tabs.is-fullwidth a { + flex-grow:1; + flex-shrink:0 +} +.bw-tabs.is-toggle a { + border-color:#dbdbdb; + border-style:solid; + border-width:1px; + margin-bottom:0; + position:relative +} +.bw-tabs.is-toggle a:hover { + background-color:#f5f5f5; + border-color:#b5b5b5; + z-index:2 +} +.bw-tabs.is-toggle a+a { + margin-left:-1px +} +.bw-tabs.is-toggle a:first-child { + border-top-left-radius:4px; + border-bottom-left-radius:4px +} +.bw-tabs.is-toggle a:last-child { + border-top-right-radius:4px; + border-bottom-right-radius:4px +} +.bw-tabs.is-toggle a.is-active { + background-color:#3273dc; + border-color:#3273dc; + color:#fff; + z-index:1 +} +.bw-tabs.is-toggle { + border-bottom:none +} +.bw-tabs.is-toggle.is-toggle-rounded a:first-child { + border-bottom-left-radius:290486px; + border-top-left-radius:290486px; + padding-left:1.25em +} +.bw-tabs.is-toggle.is-toggle-rounded a:last-child { + border-bottom-right-radius:290486px; + border-top-right-radius:290486px; + padding-right:1.25em +} +.bw-tabs.is-small { + font-size:.75rem +} +.bw-tabs.is-medium { + font-size:1.25rem +} +.bw-tabs.is-large { + font-size:1.5rem +} + +.bw-tabs.has-aside-text a { + margin-top: 1.5rem; +} + +.bw-tabs a .aside-text { + position: absolute; + top: calc(-.75rem - .75rem); + left: 0; + color: #4a4a4a; +} + /** Details panel ******************************************************************************/ diff --git a/bookwyrm/static/js/vendor/tabs.js b/bookwyrm/static/js/vendor/tabs.js index f9568b29..0535cc86 100644 --- a/bookwyrm/static/js/vendor/tabs.js +++ b/bookwyrm/static/js/vendor/tabs.js @@ -11,17 +11,17 @@ class TabGroup { this.container = container; this.tablist = this.container.querySelector('[role="tablist"]'); - this.buttons = this.tablist.querySelectorAll('[role="tab"]'); + this.tabs = this.tablist.querySelectorAll('[role="tab"]'); this.panels = this.container.querySelectorAll(':scope > [role="tabpanel"]'); this.delay = this.determineDelay(); - if(!this.tablist || !this.buttons.length || !this.panels.length) { + if(!this.tablist || !this.tabs.length || !this.panels.length) { return; } this.keys = this.keys(); this.direction = this.direction(); - this.initButtons(); + this.initTabs(); this.initPanels(); } @@ -46,17 +46,21 @@ class TabGroup { }; } - initButtons() { + initTabs() { let count = 0; - for(let button of this.buttons) { - let isSelected = button.getAttribute("aria-selected") === "true"; - button.setAttribute("tabindex", isSelected ? "0" : "-1"); + for(let tab of this.tabs) { + let isSelected = tab.getAttribute("aria-selected") === "true"; + tab.setAttribute("tabindex", isSelected ? "0" : "-1"); - button.addEventListener('click', this.clickEventListener.bind(this)); - button.addEventListener('keydown', this.keydownEventListener.bind(this)); - button.addEventListener('keyup', this.keyupEventListener.bind(this)); + tab.addEventListener('click', this.clickEventListener.bind(this)); + tab.addEventListener('keydown', this.keydownEventListener.bind(this)); + tab.addEventListener('keyup', this.keyupEventListener.bind(this)); - button.index = count++; + if (isSelected) { + tab.scrollIntoView(); + } + + tab.index = count++; } } @@ -73,11 +77,11 @@ class TabGroup { } clickEventListener(event) { - let button = event.target.closest('a'); + let tab = event.target.closest('[role="tab"]'); event.preventDefault(); - this.activateTab(button, false); + this.activateTab(tab, false); } // Handle keydown on tabs @@ -88,12 +92,12 @@ class TabGroup { case this.keys.end: event.preventDefault(); // Activate last tab - this.activateTab(this.buttons[this.buttons.length - 1]); + this.activateTab(this.tabs[this.tabs.length - 1]); break; case this.keys.home: event.preventDefault(); // Activate first tab - this.activateTab(this.buttons[0]); + this.activateTab(this.tabs[0]); break; // Up and down are in keydown @@ -147,15 +151,15 @@ class TabGroup { switchTabOnArrowPress(event) { var pressed = event.keyCode; - for (let button of this.buttons) { - button.addEventListener('focus', this.focusEventHandler.bind(this)); + for (let tab of this.tabs) { + tab.addEventListener('focus', this.focusEventHandler.bind(this)); } if (this.direction[pressed]) { var target = event.target; if (target.index !== undefined) { - if (this.buttons[target.index + this.direction[pressed]]) { - this.buttons[target.index + this.direction[pressed]].focus(); + if (this.tabs[target.index + this.direction[pressed]]) { + this.tabs[target.index + this.direction[pressed]].focus(); } else if (pressed === this.keys.left || pressed === this.keys.up) { this.focusLastTab(); @@ -184,8 +188,8 @@ class TabGroup { // Set the tab as selected tab.setAttribute('aria-selected', 'true'); - // Give the tab parent an is-active class - tab.parentNode.classList.add('is-active'); + // Give the tab is-active class + tab.classList.add('is-active'); // Get the value of aria-controls (which is an ID) var controls = tab.getAttribute('aria-controls'); @@ -201,11 +205,11 @@ class TabGroup { // Deactivate all tabs and tab panels deactivateTabs() { - for (let button of this.buttons) { - button.parentNode.classList.remove('is-active'); - button.setAttribute('tabindex', '-1'); - button.setAttribute('aria-selected', 'false'); - button.removeEventListener('focus', this.focusEventHandler.bind(this)); + for (let tab of this.tabs) { + tab.classList.remove('is-active'); + tab.setAttribute('tabindex', '-1'); + tab.setAttribute('aria-selected', 'false'); + tab.removeEventListener('focus', this.focusEventHandler.bind(this)); } for (let panel of this.panels) { @@ -214,11 +218,11 @@ class TabGroup { } focusFirstTab() { - this.buttons[0].focus(); + this.tabs[0].focus(); } focusLastTab() { - this.buttons[this.buttons.length - 1].focus(); + this.tabs[this.tabs.length - 1].focus(); } // Determine whether there should be a delay diff --git a/bookwyrm/templates/feed/suggested_books.html b/bookwyrm/templates/feed/suggested_books.html index 435d4f51..2582dcf0 100644 --- a/bookwyrm/templates/feed/suggested_books.html +++ b/bookwyrm/templates/feed/suggested_books.html @@ -9,37 +9,30 @@ {% else %} {% with active_book=request.GET.book %}
-
- + {% endwith %} + {% endif %} + {% endfor %}
{% for shelf in suggested_books %} {% with shelf_counter=forloop.counter %} diff --git a/bookwyrm/templates/snippets/create_status.html b/bookwyrm/templates/snippets/create_status.html index bb7adc0b..ff48d12c 100644 --- a/bookwyrm/templates/snippets/create_status.html +++ b/bookwyrm/templates/snippets/create_status.html @@ -4,42 +4,37 @@ {% with status_type=request.GET.status_type %}
-
- +
From f742cc023b5f67aa450f11298eb27503222b2695 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 12 Feb 2022 16:18:56 +0100 Subject: [PATCH 3/9] ARIA attributes must conform to valid values https://dequeuniversity.com/rules/axe/4.3/aria-valid-attr-value --- bookwyrm/templates/lists/list.html | 4 ++-- bookwyrm/templates/search/book.html | 2 +- bookwyrm/templates/settings/link_domains/link_domains.html | 2 +- bookwyrm/templates/settings/reports/report.html | 2 +- bookwyrm/templates/snippets/filters_panel/filters_panel.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index ab64fc9b..509a67f6 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -92,7 +92,7 @@ {% trans "Edit notes" %} - + {% include "lists/edit_item_form.html" with book=item.book %} @@ -107,7 +107,7 @@ {% trans "Add notes" %} - + {% include "lists/edit_item_form.html" with book=item.book %} diff --git a/bookwyrm/templates/search/book.html b/bookwyrm/templates/search/book.html index cc615d50..7096a55d 100644 --- a/bookwyrm/templates/search/book.html +++ b/bookwyrm/templates/search/book.html @@ -45,7 +45,7 @@ {{ result_set.connector.name|default:result_set.connector.identifier }} - + {% endif %} diff --git a/bookwyrm/templates/settings/link_domains/link_domains.html b/bookwyrm/templates/settings/link_domains/link_domains.html index ceb0d8cb..b633c5fb 100644 --- a/bookwyrm/templates/settings/link_domains/link_domains.html +++ b/bookwyrm/templates/settings/link_domains/link_domains.html @@ -53,7 +53,7 @@ {% trans "View links" %} ({{ domain.links.count }}) - +
diff --git a/bookwyrm/templates/settings/reports/report.html b/bookwyrm/templates/settings/reports/report.html index a795273b..3f83f016 100644 --- a/bookwyrm/templates/settings/reports/report.html +++ b/bookwyrm/templates/settings/reports/report.html @@ -21,7 +21,7 @@
{% trans "Message reporter" %} - +
{% trans "Update on your report:" as dm_template %} diff --git a/bookwyrm/templates/snippets/filters_panel/filters_panel.html b/bookwyrm/templates/snippets/filters_panel/filters_panel.html index c3ddeeea..f0fe5d3f 100644 --- a/bookwyrm/templates/snippets/filters_panel/filters_panel.html +++ b/bookwyrm/templates/snippets/filters_panel/filters_panel.html @@ -22,7 +22,7 @@ {% endif %} - +
From 78775241166616e4004c92d17d0ec8bd38399a4b Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 12 Feb 2022 16:25:40 +0100 Subject: [PATCH 4/9] ARIA button, link, and menuitem must have an accessible name https://dequeuniversity.com/rules/axe/4.3/aria-command-name In this case, the menuitem wasn't displayed (because the div was hidden). I prefer not to include the menuitem in that situation. --- .../snippets/shelve_button/shelve_button_dropdown_options.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html b/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html index 1fa26a88..f97dc2f3 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html @@ -5,10 +5,10 @@ {% with next_shelf_identifier=active_shelf.shelf.identifier|next_shelf %} {% for shelf in shelves %} +{% if next_shelf_identifier != shelf.identifier %} {% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %} +{% endif %} {% endfor %} {% if readthrough and active_shelf.shelf.identifier != 'read' %} From c33cf606247981fb7ae963d27f03c2fd5b6afe9d Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 12 Feb 2022 16:33:16 +0100 Subject: [PATCH 5/9] aria-hidden elements do not contain focusable elements https://dequeuniversity.com/rules/axe/4.3/aria-hidden-focus --- bookwyrm/templates/discover/large-book.html | 2 +- bookwyrm/templates/discover/small-book.html | 2 +- bookwyrm/templates/snippets/status/header.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/discover/large-book.html b/bookwyrm/templates/discover/large-book.html index a6ff0aca..d227502e 100644 --- a/bookwyrm/templates/discover/large-book.html +++ b/bookwyrm/templates/discover/large-book.html @@ -30,7 +30,7 @@
diff --git a/bookwyrm/templates/discover/small-book.html b/bookwyrm/templates/discover/small-book.html index 2da93d52..320064fc 100644 --- a/bookwyrm/templates/discover/small-book.html +++ b/bookwyrm/templates/discover/small-book.html @@ -15,7 +15,7 @@
diff --git a/bookwyrm/templates/snippets/status/header.html b/bookwyrm/templates/snippets/status/header.html index ae25932f..94723b08 100644 --- a/bookwyrm/templates/snippets/status/header.html +++ b/bookwyrm/templates/snippets/status/header.html @@ -5,7 +5,7 @@
From d510299ae4a28cbd96aa4f10b6938475f909e629 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 16:51:54 -0800 Subject: [PATCH 6/9] Reverts change to shelve button dropdown --- .../snippets/shelve_button/shelve_button_dropdown_options.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html b/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html index f97dc2f3..1fa26a88 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown_options.html @@ -5,10 +5,10 @@ {% with next_shelf_identifier=active_shelf.shelf.identifier|next_shelf %} {% for shelf in shelves %} -{% if next_shelf_identifier != shelf.identifier %} {% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %} -{% endif %} {% endfor %} {% if readthrough and active_shelf.shelf.identifier != 'read' %} From 31a61713d9c436c3b8fb6c2b03dca9bf14945bb0 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 16:53:53 -0800 Subject: [PATCH 7/9] Runs stylelint fix --- bookwyrm/static/css/bookwyrm.css | 184 ++++++++++++++++++------------- 1 file changed, 106 insertions(+), 78 deletions(-) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 5df45664..bc1db520 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -305,142 +305,170 @@ details.dropdown .dropdown-menu a:focus-visible { ******************************************************************************/ .bw-tabs { - -webkit-overflow-scrolling:touch; - -webkit-touch-callout:none; + -webkit-overflow-scrolling: touch; + -webkit-touch-callout: none; position: relative; - align-items:center; - display:flex; - font-size:1rem; - justify-content:flex-start; - overflow-x:auto; - overflow-y:hidden; - user-select:none; - white-space:nowrap + align-items: center; + display: flex; + font-size: 1rem; + justify-content: flex-start; + overflow-x: auto; + overflow-y: hidden; + user-select: none; + white-space: nowrap; } + .bw-tabs::before { - border-bottom-color:#dbdbdb; - border-bottom-style:solid; - border-bottom-width:1px; + border-bottom-color: #dbdbdb; + border-bottom-style: solid; + border-bottom-width: 1px; bottom: 0; - content:""; + content: ""; position: absolute; width: 100%; } + .bw-tabs:not(:last-child) { - margin-bottom:1.5rem + margin-bottom: 1.5rem; } + .bw-tabs a { - align-items:center; - border-bottom-color:#dbdbdb; - border-bottom-style:solid; - border-bottom-width:1px; - color:#4a4a4a; - display:flex; - justify-content:center; - margin-bottom:-1px; - padding:.5em 1em; - position: relative; + align-items: center; + border-bottom-color: #dbdbdb; + border-bottom-style: solid; + border-bottom-width: 1px; + color: #4a4a4a; + display: flex; + justify-content: center; + margin-bottom: -1px; + padding: 0.5em 1em; + position: relative; } + .bw-tabs a:hover { - border-bottom-color:transparent; - color:#363636 + border-bottom-color: transparent; + color: #363636; } + .bw-tabs a.is-active { - border-bottom-color:transparent; - color:#3273dc + border-bottom-color: transparent; + color: #3273dc; } + .bw-tabs.is-left { - padding-right:.75em + padding-right: 0.75em; } + .bw-tabs.is-center { - flex:none; - justify-content:center; - padding-left:.75em; - padding-right:.75em + flex: none; + justify-content: center; + padding-left: 0.75em; + padding-right: 0.75em; } + .bw-tabs.is-right { - justify-content:flex-end; - padding-left:.75em + justify-content: flex-end; + padding-left: 0.75em; } + .bw-tabs .icon:first-child { - margin-right:.5em + margin-right: 0.5em; } + .bw-tabs .icon:last-child { - margin-left:.5em + margin-left: 0.5em; } + .bw-tabs.is-centered { - justify-content:center + justify-content: center; } + .bw-tabs.is-right { - justify-content:flex-end + justify-content: flex-end; } + .bw-tabs.is-boxed a { - border:1px solid transparent; - border-radius:4px 4px 0 0 + border: 1px solid transparent; + border-radius: 4px 4px 0 0; } + .bw-tabs.is-boxed a:hover { - background-color:#f5f5f5; - border-bottom-color:#dbdbdb + background-color: #f5f5f5; + border-bottom-color: #dbdbdb; } + .bw-tabs.is-boxed a.is-active { - background-color:#fff; - border-color:#dbdbdb; - border-bottom-color:#fff!important + background-color: #fff; + border-color: #dbdbdb; + border-bottom-color: #fff !important; } + .bw-tabs.is-fullwidth a { - flex-grow:1; - flex-shrink:0 + flex-grow: 1; + flex-shrink: 0; } + .bw-tabs.is-toggle a { - border-color:#dbdbdb; - border-style:solid; - border-width:1px; - margin-bottom:0; - position:relative + border-color: #dbdbdb; + border-style: solid; + border-width: 1px; + margin-bottom: 0; + position: relative; } + .bw-tabs.is-toggle a:hover { - background-color:#f5f5f5; - border-color:#b5b5b5; - z-index:2 + background-color: #f5f5f5; + border-color: #b5b5b5; + z-index: 2; } -.bw-tabs.is-toggle a+a { - margin-left:-1px + +.bw-tabs.is-toggle a + a { + margin-left: -1px; } + .bw-tabs.is-toggle a:first-child { - border-top-left-radius:4px; - border-bottom-left-radius:4px + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; } + .bw-tabs.is-toggle a:last-child { - border-top-right-radius:4px; - border-bottom-right-radius:4px + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; } + .bw-tabs.is-toggle a.is-active { - background-color:#3273dc; - border-color:#3273dc; - color:#fff; - z-index:1 + background-color: #3273dc; + border-color: #3273dc; + color: #fff; + z-index: 1; } + .bw-tabs.is-toggle { - border-bottom:none + border-bottom: none; } + .bw-tabs.is-toggle.is-toggle-rounded a:first-child { - border-bottom-left-radius:290486px; - border-top-left-radius:290486px; - padding-left:1.25em + border-bottom-left-radius: 290486px; + border-top-left-radius: 290486px; + padding-left: 1.25em; } + .bw-tabs.is-toggle.is-toggle-rounded a:last-child { - border-bottom-right-radius:290486px; - border-top-right-radius:290486px; - padding-right:1.25em + border-bottom-right-radius: 290486px; + border-top-right-radius: 290486px; + padding-right: 1.25em; } + .bw-tabs.is-small { - font-size:.75rem + font-size: 0.75rem; } + .bw-tabs.is-medium { - font-size:1.25rem + font-size: 1.25rem; } + .bw-tabs.is-large { - font-size:1.5rem + font-size: 1.5rem; } .bw-tabs.has-aside-text a { @@ -449,7 +477,7 @@ details.dropdown .dropdown-menu a:focus-visible { .bw-tabs a .aside-text { position: absolute; - top: calc(-.75rem - .75rem); + top: calc(-0.75rem - 0.75rem); left: 0; color: #4a4a4a; } From 5d098b3c10745216ccf872b981342ec2ebd8b68a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 17:01:21 -0800 Subject: [PATCH 8/9] Removes duplicate selector --- bookwyrm/static/css/bookwyrm.css | 4 ---- dev-tools/.stylelintrc.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index bc1db520..303bc031 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -383,10 +383,6 @@ details.dropdown .dropdown-menu a:focus-visible { justify-content: center; } -.bw-tabs.is-right { - justify-content: flex-end; -} - .bw-tabs.is-boxed a { border: 1px solid transparent; border-radius: 4px 4px 0 0; diff --git a/dev-tools/.stylelintrc.js b/dev-tools/.stylelintrc.js index 68c68f89..de50a453 100644 --- a/dev-tools/.stylelintrc.js +++ b/dev-tools/.stylelintrc.js @@ -16,5 +16,6 @@ module.exports = { "property-no-vendor-prefix": null, "color-function-notation": null, "declaration-block-no-redundant-longhand-properties": null, + "no-descending-specificity": null } }; From 1b63c19a9cdda42b6b64aac8b65106dc522adef4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 17:10:12 -0800 Subject: [PATCH 9/9] Fixes error in previous PR --- bookwyrm/templates/layout.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index fe3bc7f5..a7ea3923 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -209,8 +209,11 @@
+ {# almost every view needs to know the user shelves #} + {% with request.user.shelf_set.all as user_shelves %} {% block content %} {% endblock %} + {% endwith %}