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

Read more #53

Open
ghost opened this issue Oct 13, 2016 · 6 comments
Open

Read more #53

ghost opened this issue Oct 13, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2016

How about an animated read more toggle?

@ghost
Copy link
Author

ghost commented Oct 13, 2016

@Link2Twenty
Copy link

Link2Twenty commented Oct 13, 2016

I'd probably do something like this:
https://jsfiddle.net/link2twenty/mdx7x37r/

There are a couple of problems though

  1. If the original text is smaller than the fixed max-height then the button will still show but do nothing (other than changing the label)
  2. Without knowing the size it is changing too before hand it's impossible to animate it, meaning you can animate it getting smaller but not getting larger.

@ghost
Copy link
Author

ghost commented Oct 13, 2016

I love the way you made it look/work! 👍 Also, good points, i guess those are the limitations of css. 😐 I discussed this website with some community members and one of them remarked that most of these methods either use a "hack", aren't supported well or depend on the DOM content. Ofcourse I pointed out that there is a statement about browser support and testing it before using it in production at the top of the website and I still think its a cool showcase of the possibilities of css.

@una
Copy link
Owner

una commented Oct 13, 2016

Is this much different than the accordion?

@Link2Twenty
Copy link

@una not really, it's the same concept but using checkboxes rather than radio buttons (to have multiple open), it does show how you can change label text based on check state, however. Which might be nice to include in an example somewhere (even if it's just part of accordion or something).

@marsjaninzmarsa
Copy link

Without knowing the size it is changing too before hand it's impossible to animate it, meaning you can animate it getting smaller but not getting larger.

You can animate max-height to some big value. And toggle overflow to auto for edge-cases.

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