Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API improvement suggestion #365

Open
chris-montero opened this issue Sep 18, 2024 · 3 comments
Open

API improvement suggestion #365

chris-montero opened this issue Sep 18, 2024 · 3 comments

Comments

@chris-montero
Copy link

Problem

Elm-ui 1.1.8 "el" elements can normally only contain one single child. The way to draw something "layered" with elm-ui is to use the Attribute by the name "inFront" or "behindContent".

Solution

Instead of this, let the "el" element have multiple children, just like the "row" and "column". And have the children of the "el" element just be rendered one on top of the other in the correct order.

This is the approach used in this project, which drew inspiration from elm-ui for its UI layout engine.

@johndeighan
Copy link

It's a good suggestion; unfortunately, it would break a lot of existing code. So, I would suggest just creating a new element, for example layers, which would accept multiple children and do what you suggest.

@chris-montero
Copy link
Author

I'm mentioning this in the hopes it will make it in the 2.0 branch that is in the works.

@wclr
Copy link

wclr commented Nov 11, 2024

Is there a problem with using inFront to achieve such layering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants