Skip to content

Commit 31aebde

Browse files
Update css fix for trash template
1 parent 200b931 commit 31aebde

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

ckanext/iaea/assets/css/custom.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,18 @@
206206
plugin outranks this theme in CKAN's template search path, so it cannot be
207207
removed via a template override from here; hide it with CSS instead. The
208208
dictionary renders as a .module-content whose direct children include the
209-
per-field .accordion elements (built by datastore/snippets/dictionary_view.html);
210-
the only other .accordion in the app (the admin data-type page) is not wrapped
211-
in a .module-content, so the "> .accordion" child combinator targets the data
212-
dictionary alone. The dictionary remains editable on the dedicated /dictionary
213-
page. */
214-
.module-content:has(> .accordion) {
209+
per-field .accordion elements (built by datastore/snippets/dictionary_view.html).
210+
Scope this tightly: the admin trash page (admin/snippets/data_type.html) also
211+
renders .accordion elements as direct children of a .module-content -- the one
212+
core page.html wraps around {% block primary_content_inner %} -- so a bare
213+
".module-content:has(> .accordion)" blanks the whole trash page, Purge all form
214+
included. Two things distinguish the dictionary: its .module-content is a direct
215+
child of a <section class="module"> (the trash one sits in page.html's
216+
<article class="module">), and it opens with an <h2>Data Dictionary</h2> heading
217+
immediately before the accordions (the trash one opens with a <form>). Require
218+
both. The dictionary remains editable on the dedicated /dictionary page, which
219+
nests .accordion-item inside a <form> and never matched this rule. */
220+
section.module > .module-content:has(> h2 + .accordion) {
215221
display: none;
216222
}
217223

0 commit comments

Comments
 (0)