Hiding the toc_js block not working when minimum elements is not respected with custom css

Created on 9 August 2023, over 1 year ago
Updated 21 September 2023, about 1 year ago

Problem/Motivation

We use some custom styling using display: flex on the class, however it seems that this breaks the hiding of the element when the minimum elements are not reached.

Steps to reproduce

Install the module
Configure toc_js with 'minimum elements' set to 1 for a content-type
Add custom css with

.toc_js {
    display: flex;
}

The element will not be hidden when no items are found.

Proposed resolution

See patch. Note that this causes the block to be visible for a couple of ms.

Remaining tasks

Review or propose another resolution.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇧🇪Belgium leanderjcc Ghent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024