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

Custom CSS classes for domain and subdomain #349

Closed
leifg opened this issue Jun 13, 2023 · 3 comments
Closed

Custom CSS classes for domain and subdomain #349

leifg opened this issue Jun 13, 2023 · 3 comments

Comments

@leifg
Copy link

leifg commented Jun 13, 2023

There is probably a better way to do this but I am trying to make my month view responsive. So ideally I would pass in a CSS class for my domain in addition to ch-domain m_1. Is this possible or is there are better way to make my calendar responsive?

@wa0x6e
Copy link
Owner

wa0x6e commented Jun 17, 2023

What do you want to achieve ? Override width and height with CSS ? This will be a bad idea, as all SVG elements positions are computed, and absolute values instead of relatives.

If you are not using navigation, you can try targeting the domains with :nth-child css

@leifg
Copy link
Author

leifg commented Jun 17, 2023

My intent is to have a month view that is responsive, meaning it will use the maximum width available for the number of months and then break into a new line (e.g. 6 months per line on a desktop, 2 months on mobile).

The way I wanted to go about this is to use one of the many CSS frameworks to add classes to the month element (e.g. .col-sm-*, .col-md-*, col-lg-* in Bootstrap).

In the meantime I solved the issue by generating a new calendar for every month and putting it into a div. See example here.

@wa0x6e
Copy link
Owner

wa0x6e commented Jun 17, 2023 via email

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

2 participants