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

Duplicate .gv-list-view html class #1026

Closed
m-e-h opened this issue May 11, 2018 · 6 comments
Closed

Duplicate .gv-list-view html class #1026

m-e-h opened this issue May 11, 2018 · 6 comments

Comments

@m-e-h
Copy link
Contributor

m-e-h commented May 11, 2018

gv-list-view class is on both the container and each entry.
https://github.com/gravityview/GravityView/blob/master/templates/views/list/list-header.php#L9
https://github.com/gravityview/GravityView/blob/master/templates/views/list/list-body.php#L29

Not sure if this was intentional. If so maybe add an additional default class to the entry?
2.0 styled all my containers like entries. 😀

┆Issue is synchronized with this Asana task

@soulseekah
Copy link
Contributor

Thanks for opening the issue. This does seem to be valid, we'll investigate further and have fix ASAP.

👍

@zackkatz
Copy link
Member

zackkatz commented May 11, 2018

Yeah, it's valid intentional—there are .gv-list-container and .gv-list-multiple-container classes for the container—I added this to be consistent with the other layouts' CSS usage.

We'll re-consider this, though!

@soulseekah
Copy link
Contributor

image

This is in the deprecated template, it behaved the same as far as I can tell.

@zackkatz
Copy link
Member

Yeah, that was in the entry loop, but not in the container. https://github.com/gravityview/GravityView/blob/tweak/edit-entry-calculation-fields/templates/list-header.php#L12

@m-e-h
Copy link
Contributor Author

m-e-h commented May 14, 2018

To give a little more perspective, here's the HTML I'm seeing:

list-viewhtml

So, if I wanted to style the individual entries in rows of 3, I'd do something like:

.layout-3-card-row .gv-list-view {
    max-width: calc(33% - 1.5rem);
}

Except now my entries AND the container are 33%.

This should probably be considered a breaking change and will likely cause confusion for anyone trying to style entries going forward.

@zackkatz
Copy link
Member

@m-e-h Well, it took three years, but this is fixed in 2.10 😄

It's a "breaking change" but you're right that it makes sense to break. We don't change CSS selectors lightly!

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