Where did the HIDDEN option go?

Under VISIBILITY there used to be a HIDDEN option. I notice this has been changed to INVISIBLE, which merely makes the component invisible but does not remove it from the page hierarchy. Whereas HIDDEN removed the component without leaving a hole in the page.

This was very useful if you had things that needed to be shown and hidden, but when hidden didn’t leave a hole in the page where the component would have been.

Has this been moved somewhere else or is this another example of where we need to use a Tailwind class to really hide the component?

I tried the Tailwind COLLAPSE class but it does the same thing as invisible. Is there a way of hiding and removing a component from the page hierarchy?

https://forums.realmacsoftware.com/t/trying-to-streamline-using-drop-zones/45598/77

Ok some explanation here with some answers next update removed hidden and collapsed

Still a couple of issues

The hidden issue in relation to video is a tailwind dom css issue and the browser

Yeah using tailwind hidden can be very useful - but be aware, it just sets it to display:none, ie still in dom.

1 Like

invisible causes the same issue with video if working across different screen sizes

Works a treat for my needs, doesn’t matter that it is still in the DOM.

2 Likes

This was a bug in the component controls—hidden should never have been an option in the Visibility control.

The hidden option applied the Tailwind utility class hidden, which actually sets display: none; in CSS. However, display and visibility are distinct concepts:

  • display: none; (Tailwind’s hidden)
    • Completely removes the element from the document flow.
    • The element no longer affects layout and does not occupy space.
  • visibility: hidden; (Tailwind’s invisible)
    • Hides the element from view but keeps it in the document flow.
    • The element still takes up space and affects layout.

Since visibility controls should only modify visibility properties, having hidden in this control was incorrect. The correct fix was replacing hidden with invisible, ensuring the control behaves as expected by keeping elements in the layout while making them visually hidden.

We do not currently have a control for setting the display of a component due to some complex technical issues affecting certain components. We recognize that a display control would be useful, but we need to take the time to implement it properly to avoid unintended issues.

Thank you for the explanation, it makes sense.

Until there is a DISPLAY option I’m assuming it is OK to use the HIDDEN Tailwind Class to achieve what I need. I have been using it already and of course it does exactly what I need.

ok getting there with visibility and different screen sizes, have to adjust the code so not as flexible, as long as 2xl is set t visible you can use video full screen

just a practice to check

great to be able to see xl and 2xl, excellent

1 Like

still have the issue of a button on a drop zone remains on the screen for a second when changing screen sizes

1 Like

Yes, absolutely! You can always use any Tailwind class on your component, including hidden.

However, when using display utility classes to show and hide components, it’s important to ensure you’re setting the correct display value when making them visible again.

For example:

• If you’re toggling the visibility of a Grid, you’ll need to restore it using grid for the appropriate breakpoint.

Incorrect: hidden md:block (This will break the grid layout.)

Correct: hidden md:grid

• Similarly, for a Flex, you should use hidden md:flex instead of hidden md:block.

• Just to complicate things further, the Container component currently defaults to display: grid, so you would need to use hidden md:grid to restore it properly (this could change in the future).

As you can see, managing display values dynamically isn’t always straightforward. This complexity is one of the reasons we don’t currently have a built-in Display control in our components—but, as I said, we’re aware of the need and evaluating the best way to implement it!

That looks like an interesting bug - it could be Elements, or Tailwind, or the browser :sweat_smile:

Any chance you could send me over that project so I can take a look? :slight_smile:

elementsapp://downloadDocument/gnTQSIZD69PK

wrong project updated

this is a simpler setup and the button remains for a second or so

@bon as of now I believe this is not possible
just an example if I need to add additional screen sizes might resolve my issue with video fullscreen, need to test in tailwind outside of Elements

module.exports = {
  theme: {
    extend: {
      screens: {
        '3xl': '5000px',  // Correct straight quotes
        '4xl': '10000px',
      },
    },
  },
  plugins: [],  // Use an empty array if no plugins
};

Very interesting.

So what are the ramifications of simply using hidden by itself on a container?

I think I have have tried every combination I am prepared to spend time on, and it has been a lot, just a combination, the only thing I still cannot overcome just using Elements and tailwind is if the 2xl screen size when using video and triggering fullscreen is set to video is set to I visible then fullscreen is replaced with the largest screen view, not found any real issues even using hidden

some examples

the issue where the button is visible for short time longer looks like a browser rendering issue, as far as I can tell.

Anyway, from what I can tell from your posts here I think you are trying to show and hide the video at different breakpoints?

If that’s correct, you should use the hidden and block tailwind classes directly on the Video component.

Attached is a project where the video is shown / hidden on various breakpoints: elementsapp://downloadDocument/u2ywDTGylDpo

Note: I’m using the CSS Classes in the Advanced group - this control is also responsive, so you can override the classes on each breakpoint and Elements will apply the appropriate breakpoint prefix (such as sm:, md:, etc).

Alternatively, you can of course enter all the classes in one go as you have been doing.

Hope that help! :slight_smile:

@bon unable to download you project

the issue I have is, it is not possible with tailwind to make the video hidden or invisible at 2xl and still open a video fullscreen from a video visible at another screen size, it only works when the 2xl is set to visible I am resigned to this . Maybe your project resolves this but cannot download

When I test in tailwind play the button does not remain on the screen

are we unable to use @apply

Have just fixed the link, try this: elementsapp://downloadDocument/u2ywDTGylDpo