vandres / craft-matrix-extended

Adds functionality to the native Matrix field type
Other
3 stars 0 forks source link

Layout on smaller displays #16

Closed sandrodunkel closed 3 months ago

sandrodunkel commented 3 months ago

I was wondering how much you can control the layout of the add-buttons? On smaller screens — or even on bigger screens if you have a lot of blocks and groups — they look a bid weird. Maybe there's a way for you to inject some css into this? The simple add-buttons are all contained within .btngroup.matrix-extended-btngroup whilst every dropdown group is its own button. Maybe there's a way to wrap them on a new line instead of forcing them all to be in one line and shrinking like this.

screenshot

sandrodunkel commented 3 months ago

I just found a css rule you applied:

.matrix-extended-buttons.ungrouped {
  flex-wrap: nowrap;
}

If I remove this line, then the buttons wrap as I would expect them to. But maybe I'm missing a use case where you would actually want to prevent them from wrapping.

Screenshot with this css rule disabled: screenshot2

vandres commented 3 months ago

Hi!

The reason is, I prefer the look mentioned here https://github.com/vandres/craft-matrix-extended/issues/14#issuecomment-2175919918 I am having more ungrouped items than grouped ones.

With you use-case, that unfortunately doesn't work well. I guess, there is only one solution: A new config option "Force one line" or something

Currently, I am a little down under work-wise. This feature might take a week or so

sandrodunkel commented 3 months ago

Would absolutely love to see that config option! No worries though, take your time, I appreciate your work!

vandres commented 3 months ago

Implemented in v3.5.0