-
Notifications
You must be signed in to change notification settings - Fork 11
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
Responsive heightOffset #19
Comments
👋 Hey @havardlj, Not directly, I'm afraid. You can, however, set // Dummy code that illustrates `heightOffset` set
// to 5 on desktop and 2 for mobile devices.
window.addEventListener("resize", event => {
accordion.heightOffset = window.innerWidth <= 600 ? 2 : 5;
}); It's possible that what you're trying to achieve can be done purely with CSS (padding, transparent borders, etc). Do you have a link to something that shows your accordion in action? The |
Thanks for your quick feedback! I ended up changing the library to Handy Collapse however, as it lets me set the control/trigger-box and content-box, which solved several of my projects coding challenges. |
What do you mean by "control/trigger box" and "content box"? I designed this component to be as efficient as possible in terms of filesize (at the risk of alienating users less experienced with CSS and DOM interaction). Ergo, I understand if it doesn't align with everybody's expectations... |
Is there any way of making the heightOffset responsive? I usually have a gap that is fluid between tablet and desktop
The text was updated successfully, but these errors were encountered: