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

More generic exhibit element classnames #58

Open
karger opened this issue Jul 3, 2012 · 3 comments
Open

More generic exhibit element classnames #58

karger opened this issue Jul 3, 2012 · 3 comments

Comments

@karger
Copy link
Contributor

karger commented Jul 3, 2012

Some class names generated on rendered exhibit elements are extremely specific, e.g exhibit-tabularView-body and exhibit-thumbnailView-itemContainer . This will make it hard to e.g. change one's mind about which view to use without also going back and changing css. I think it would help to use more generic classnames, e.g. exhibit-viewBody and exhibit-itemContainer, to be used in addition to or instead of the more specific classes (note that if for example the containing view received class exhibit-thumbnailView, then instead of exhibit-thumbnailView-itemContainer I could use the selector exhibit-thumbnailView > exhibit-itemContainer).

If this issue is accepted/approved then I will keep in mind to make such changes as I do other work on the code.

@Pike
Copy link
Contributor

Pike commented Jul 4, 2012

I think that having generic class names in addition is a good idea, I wouldn't give up on the specific ones, though.

@karger
Copy link
Contributor Author

karger commented Jul 5, 2012

Do you think the more specific ones add something when you can achieve the same specificity with some more complex selectors?

@Pike
Copy link
Contributor

Pike commented Jul 9, 2012

Here's the CSS we use right now to make some tables, plus the exhibit tabular views, look different than most of the other tables on the site, https://github.com/mozilla/elmo/blob/develop/static/css/style.css#L406.

I think that the selectors there are complex enough.

It might be an interesting idea to have an attribute to add site-specific classes to the table. Guess one can do that with the tableStyler, oth that's a pretty big sword for that purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants