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

[FEATURE] More symmetry between modals and cards #1440

Closed
mholt opened this issue Jan 21, 2023 · 14 comments
Closed

[FEATURE] More symmetry between modals and cards #1440

mholt opened this issue Jan 21, 2023 · 14 comments
Assignees

Comments

@mholt
Copy link
Contributor

mholt commented Jan 21, 2023

Is your feature request related to a problem? Please describe.

I'm adding a form to a modal, but I want a footer like the card footers, with the light background and light top border, kind of like this:

image

Describe the solution you'd like

Maybe a class that can make .modal-footer look like .card-footer

Describe alternatives you've considered

I've tried putting a .card in the modal as you can see above, but I had to set border: 0 myself to avoid a weird border around the .card-body (which should ideally just be .modal-body) all so I could use .card-footer. But even then, the border-radius of the footer is smaller than that of the modal, so the top and bottom of the modal have different border corners.

Basically: I like the look of the .card-footer (the light bg and border) in a modal, but I can't figure out how to make it fit nicely.

This is definitely just my personal taste, so it's OK if you don't want to do it; but I figured I'd ask in case you know a good way to make it possible!

Thanks for Tabler. My app looks way better than if I did it myself.

@Hussain0520
Copy link

Hey @mholt are you working on this issue? If not I would like to work. Thanks!

@mholt
Copy link
Contributor Author

mholt commented Jan 21, 2023

I am not, go for it! 👍

@Hussain0520
Copy link

Thanks, Is there someone who can assign me this?

@Hussain0520
Copy link

@codecalm can you assign me this feature?

@codecalm codecalm assigned codecalm and Hussain0520 and unassigned codecalm Jan 27, 2023
@Hussain0520
Copy link

Hey @mholt can you tell me how to replicate what you were trying in order to understand what changes I need to do. It would be helpful, Thanks!

@mholt
Copy link
Contributor Author

mholt commented Feb 4, 2023

@Hussain0520 Regrettably, I don't have my code anymore for that attempt, but it was basically:

  • A simple modal like the "Modal with form" example here: https://preview.tabler.io/modals.html
  • But instead of .modal-footer I used .card-footer; this of course requires being in a .card, so I also added the .card class to .modal-content.

Those two changes in your browser inspector tools should give you the same result as my attempt.

It'd basically be nice to have that look possible, without having to hack a .card into it.

@Hussain0520
Copy link

Okay @mholt got it Thanks!

@Hussain0520
Copy link

image
Hey @mholt are you looking for something like this? I tried this with Chrome Devtools!

@mholt
Copy link
Contributor Author

mholt commented Feb 8, 2023

Yeah, basically. The screenshot is cropped really close (too close to tell what the border radius is), and the padding in the footer looks a little off-balance; but that's the basic idea. (Thanks!)

@Hussain0520
Copy link

I didn't get the idea about the border radius but yeah the padding can be adjusted.

@mholt
Copy link
Contributor Author

mholt commented Feb 8, 2023

I mean that the border-radius on the top of the modal and the bottom should be the same.

@Hussain0520
Copy link

Hey @mholt actually I made the changes using DevTools and got the result but when I make changes in the code on my local machine I'm not seeing any changes. Do you have any idea about it? PS: I made changes in _modal.scss from _cards.scss

@codecalm
Copy link
Member

I've unified all :)

Screenshot 2023-02-11 at 16 02 25

@mholt
Copy link
Contributor Author

mholt commented Feb 11, 2023

It's beautiful!! Thank you! Can't wait to use it 😃

And once it's ready I'll show off my Tabler app

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