-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Weird Collection Repeat Behavior #3034
Comments
Could you post a little bit of markup for each of your examples? Not sure I'm understanding the problem here. |
From the CodePen... First Example
Second Example
|
Oh, I didn't see the codepen! My fault. |
Both 25% and 100% seem to be working as intended for me. collection-repeat's default behavior should probably do the width: 100% for you, to cover 99% of cases. |
I changed the codepen to the 25% example. Scroll up and down a bit and the layout will start to mess up. |
@andrewmcgivery this is actually just a CSS bug. The height of your items in css is different than the amount defined by I'm going to commit a fix that will make items' width and height css-wise equal their width and height in the collection repeat grid. |
Type: bug
Platform: all
Reference CodePen: http://codepen.io/andrewmcgivery/pen/ogGmNW
So, I took a ng-repeat and made it a collection-repeat. In that collection repeat, I set the width to 100%. This gave me un expected behavior.
So, I tried setting the following CSS, and it made it work as expected.
.item {
width:100%
}
I also noticed in the docs that it says I need to use the following CSS which seems to accomplish the same as the CSS I used.
.my-item {
left: 0;
right: 0;
}
This seems like a weird behavior to me (possibly a misunderstanding). I figured if I said 100% it would assume I mean width: 100%.
Next experiment is setting collection-item-width to 25% and leaving the suggested css (left: 0, right: 0). This gave even weirder behavior. The items were all over the place.
To fix this, I had to put in my css for list items width:25%.
Am I just misunderstanding something here? Do the docs need to be updated to be a little more clear?
The text was updated successfully, but these errors were encountered: