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

Allow button as modal closing icon. #448

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Allow button as modal closing icon. #448

merged 2 commits into from
Feb 16, 2024

Conversation

Atmos4
Copy link

@Atmos4 Atmos4 commented Feb 13, 2024

Accept button[rel=prev] as modal closing x-mark item.

The reason to still go with rel=prev even though it is not a valid button attribute is to allow it to be completely decoupled from the usage of formmethod, as formmethod=dialog can be used in the footer too.

Thus the following structures are both correct:

  • dialog > form > article > header > button[rel=prev][formmethod=dialog]
  • dialog > form > article > footer > button[formmethod=dialog]

Let me know what you think ✨

Accept `button[rel=prev]` as modal closing item
@lucaslarroche
Copy link
Member

Thanks!
Tested, LGTM.

@lucaslarroche lucaslarroche changed the base branch from main to dev February 16, 2024 13:36
@lucaslarroche lucaslarroche merged commit 021144d into picocss:dev Feb 16, 2024
@lucaslarroche
Copy link
Member

I rebased the branch with dev and merged it.
It will be released this weekend with v2.0.1

@lucaslarroche lucaslarroche mentioned this pull request Feb 16, 2024
@lucaslarroche
Copy link
Member

@Atmos4, It's shipped with 2.0.3.
Note: I wanted to fix the padding and messed up, so I ended with 2 patches 😬.

I updated the docs:
https://picocss.com/docs/modal

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

Successfully merging this pull request may close these issues.

None yet

2 participants