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

Non-Modal Dialogs are rendered with Buttons to the left (instead to the right) #414

Open
mrh1997 opened this issue Oct 17, 2023 · 3 comments
Labels
v2 wontfix This will not be worked on

Comments

@mrh1997
Copy link

mrh1997 commented Oct 17, 2023

According to the docs one can create Dialogs-like-looking-Elements without the Popup-semantics by omitting the <dialog> tag and only use <article>:

  <article>
    ...
    <footer>
      <button className="secondary">Cancel</button>
      <button>OK</button>
    </footer>
  </article>

Current Behavior

Unfortunaltely the Buttons are rendered to the left side in this case. When embracing the article by a dialog the buttons are rendered to the right.

Expected Behavior

I expect <article> without an enclosing <dialog> renders the same way (i.e. the buttons to the right)

I think the problem is this line as it is part of a selector dialog > article > footer instead of simply article > footer.

Maybe the whole footer section should be moved out of the dialog selector?!?

Reproduction URL

https://jsfiddle.net/owgcpb4j

Environment

Windows 11, Firefox, PicoCSS latest (v2)

@rokf
Copy link

rokf commented Oct 29, 2023

One hack that you can use is that you put a nav in the footer and put the buttons in a div or ul. You can then use an empty div as the first child of nav, which will move the buttons (second child) to the right.

@mrh1997
Copy link
Author

mrh1997 commented Oct 30, 2023

My intention was not to find a hack (I implemented already a workaround via CSS), but to fix the issue.

I would even provide a pull request if s.b. conforms that my solution will not break something else...

@lucaslarroche
Copy link
Member

Aligning right for dialogue > article > footer is already very opinionated.
Aligning right for article > footer might be too much.

I would love to hear other user's thoughts.

@lucaslarroche lucaslarroche added the wontfix This will not be worked on label Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants