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

Scale Modal --min-height-window #731

Closed
dillasyx opened this issue Dec 10, 2021 · 3 comments · Fixed by #1127
Closed

Scale Modal --min-height-window #731

dillasyx opened this issue Dec 10, 2021 · 3 comments · Fixed by #1127
Assignees
Labels
feature New component features and enhancements

Comments

@dillasyx
Copy link

In the scoped variables there is a --max-height-window, but why isn't there a possibility to set the min height of a modal?
In some cases this could be useful.

@acstll
Copy link
Collaborator

acstll commented Dec 10, 2021

Thanks for asking @dillasyx

It wasn't needed to make it work, and we try and avoid adding variables which are not strictly necessary.

When more "complex" customisation is needed, there's the ::part API. You can already do this:

scale-modal::part(window) {
  min-height: 256px;
}

It's also possible to create new scope variables with this same technique (I wasn't aware of this until now 🤯)

scale-modal::part(window) {
  min-height: var(--min-height-window);
}

Having said that, I'm not against adding --max-height-window. In which cases would it be useful?

@acstll acstll added the feature New component features and enhancements label Dec 10, 2021
@dillasyx
Copy link
Author

--min-height-window could be useful if you open a modal with lists or tables of different lengths. If one table is shorter than the max height, the modal is smaller, too. If you then switch to a longer table, while the modal is open, it resizes and that looks kinda bad. It's just a visual thing, but yeah, that's why I thought about a min-height variable

@dillasyx
Copy link
Author

But the provided answer also works, so it's fine for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New component features and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants