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
fix(datepicker): remove hardcoded bg-light #3351
fix(datepicker): remove hardcoded bg-light #3351
Conversation
@@ -20,6 +20,7 @@ ngb-datepicker-month-view { | |||
&-weekdays { | |||
border-bottom: 1px solid rgba(0, 0, 0, 0.125); | |||
border-radius: 0; | |||
background-color: var(--light); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'var' was a good idea, but unfortunately we can't use this functionality as ng-bootstrap supports IE >= 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var is already in use:
&-weekday {
color: #5bc0de;
color: var(--info);
}
Do it like this maybe better?
Thanks for your PR @gpolychronisamadeus ! You'll also need to rename the commit message (and the title by the way) with |
Codecov Report
@@ Coverage Diff @@
## master #3351 +/- ##
=======================================
Coverage 90.88% 90.88%
=======================================
Files 95 95
Lines 2743 2743
Branches 510 510
=======================================
Hits 2493 2493
Misses 190 190
Partials 60 60
Continue to review full report at Codecov.
|
dbeea62
to
9cd0e30
Compare
I just changed the title with fix (less important than the commit message, but just to be coherent). Otherwise, LGTM ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@@ -20,6 +20,8 @@ ngb-datepicker-month-view { | |||
&-weekdays { | |||
border-bottom: 1px solid rgba(0, 0, 0, 0.125); | |||
border-radius: 0; | |||
background-color: #f8f9fa; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing bg-light
class but you are also introducing a hard coded background color. Why not set on parent background color and in custom css it can be overridden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ngb-datepicker-month-view-weekdays
is a custom-class publicly available.
You can override the background-color by defining your own. Isn't it enough ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can but I have to override for each including header, week, weekday, day using !important
@benouat
@maxokorokov
Please review