-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
Style Guide #858
Comments
Hey, thanks for opening an issue, unfortunately the styling of this calendar really isn't the best (CSS is not my strong point at all, I mostly just cobbled together what I thought was OK CSS at the time, I kind of regret that now though 😅). Funnily enough I had to also add a dark theme to this calendar for work and it really wasn't a great experience. I'm going to work on some sass mixins (or if someone else is reading this and has amazing sass skills that would be amazing!) to make it a lot easier to theme (ala material2 style) but until then the best thing I can recommend is right click -> inspect element and copy the css specificity into your app. For the example you gave: It would be
|
Ok, thanks Matt. If i get any good at it, i can update here with what i find out as well. |
@jcanning you find any working solution? |
BREAKING CHANGE: all 3 views now have a default white background set. If you were relying on it being transparant before you will need to override with css. Closes #858
WIP here: #886, any feedback if I'm on the right lines would be awesome 😄 |
@mattlewis92 I will check this out for sure! I'm not super great with Git, how do i get your changes? Or just overwrite the files? |
I'm just looking for some early feedback right now to validate I'm on the right track, once I'm confident in the changes I'll just cut a beta release that you can install direct from npm 😄 |
ok cool. From what i've seen it looks like what i am looking for. along with some documentation on what each class to override in the theme. Thanks for taking this on, it will go a long way in some of my projects. Your calendar is awesome! |
I've just cut a new beta with this in, you can try it in your app with:
Then in your sass you can create a new theme
Demo code here and all available variables are here. Let me know if that works ok for you! Preview: |
@mattlewis92 I know this is going to boil down to my lack of scss knowledge but I am getting an error that states "@include cal-theme ... No mixin named cal-theme" at compile time. How should i set that up? I can see it in your src/angular-calendar.scss but when i add that to my scss, the imports for the month/day/week/common do not exist at all in my source. I am sure i am missing something simple. Thanks, |
Have you defo got version |
yes sir, "angular-calendar": "^0.27.0-beta.11", is what is listed there. |
hmm weird, and you've defo got I put together an example stackblitz for you that might help: https://stackblitz.com/edit/angular-xgefjt?file=demo/styles.scss |
Looks like it was my fault. So my Before: After: Posting this for other people as silly as me that might run into the same issue. This looks like what I am looking for. I will play around with this a bit and let you know if i have any suggestions but this is already meeting my needs! Thanks so much Matt! |
Inside your
|
@mattlewis92 i think it's on the right track but it looks like the cal-theme is not getting the value from my theme for some reason `ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Edit: Formatting of the image and wording |
I am terrible at scss but i think it has to do with the map-merge part? as you pass the overrides in, there isn't consideration for passing it like Edit: just another thought, your $overrides is expecting a color but it is being passed an object instead. Is there any way in scss to break out the $custom-theme object i am setting to get the colors? Not sure if i am making any sense. |
hmm, weird, I'm not particularly adept at sass to know quite what's going wrong there, any chance you can make a really minimal repro on github to share what you've done so far and then I can hack away on that and try and find a solution? |
Hello Matt, really appreciate what you're doing with this calendar. I'm stuck on one styling issue and that is height. How would I go about changing the calendar height, expand cells till it hits 100% of my view? Thanks in advance |
Hey Matt, sorry for the delay. I will do that for sure in a few days. I got tied up with life. I have another issue that I will post about as well. Thanks |
I think you can use flexbox to do this. |
Sure, no rush! 😄 |
Ahhh, I see what the issue is now, the |
Just started using angular-calendar. And this theming feature is great! Thanks Matt! |
Is your feature request related to a problem? Please describe
Yes, the problem is when using dark mode themes with angular material, the odd numbered times are not visible.
Describe the solution you'd like
Is is possible to get a style guide for this calendar? Overriding styles is a bit of a pain when you have to hunt down the proper styles.
Describe your use case for implementing this feature
Currently, when i use the default angular material styles the day and week view of a "Dark mode" theme does not display properly. The odd time's are not readable (see below).
Additional context
I was am looking for is the best methods to override the main style components of Angular Calendar.
The text was updated successfully, but these errors were encountered: