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

feature: Support for responsive default expanded items #30

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

zipper
Copy link
Owner

@zipper zipper commented Jan 18, 2024

As well as using a class attribute, elements can be expanded by default using data-collapsable-default-expanded-media. This data attribute should contain a media query string (e.g. (min-width: 992px)), which is then evaluated using window.matchMedia. If it matches, the item will also be expanded by default, regardless of class. It is therefore intended to be used without the default expanded class name.

As well as using a class attribute, elements can be expanded by default using `data-collapsable-default-expanded-media`. This data attribute should contain a media query string (e.g. `(min-width: 992px)`), which is then evaluated using `window.matchMedia`. If it matches, the item will also be expanded by default, regardless of class. It is therefore intended to be used without the default expanded class name.
@zipper zipper merged commit f94b24f into master Jan 18, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant