Would it be possible to implement outer margin in a way, that margin of each dimension would be separately adjustable?
Like in css margin: 20px 20px 40px 20px;
Hi @klemenoslaj ,
Yes it is possible.
Not easy to implement it.
The question is why do you need something like this?
Why you don't add it to the gridster element outside from css?
Like if you want 20px extra margin to bottom:
gridster{
margin-bottom: 20px;
}
Yes this is what I currently have, but that looks ugly.
The UI requirements are, that padding should be inside scroll area, not outside, which makes sense, because you will then see padding only when you reach bottom of scroll area, and not all the time.
Will think about it, and maybe implement it this weekend.
Ok so I had a try to implement this.
I remembered why I implement the outer margin as margin on the elements.
Browsers don't seem to like to combinations of padding, scroll and position absolute children.
If you add padding on the gridster element the scroll will just ignore it. Since the scroll only cares about where the last child ends.
But managed to do it on gridster-item eventually.
Probably will move to gridster element padding after I switch to CSS Grid.
Added in v4.6.0
Yes indeed, this behavior is not consistent between all the browsers.
thanks!
Hi @tiberiuzuld.
I am sorry to have come back to this issue, but since my latest update the behavior of outer margins was changed, because now gridster2 uses padding for outer margin.
That breaks scrolling in gridster as you mentioned in comment above:
If you add padding on the gridster element the scroll will just ignore it. Since the scroll only cares about where the last child ends.
Steps to reproduce:
gridType to GridType.FixedouterMargin to trueouterMarginBottom to 100Or even simpler:
gridType to Fixed<gridster> elementWill you open this existing issue or should I create a new one?
Opened a new issue.
https://github.com/tiberiuzuld/angular-gridster2/issues/286
Thanks @tiberiuzuld!