Repository navigation
fix: use theme selection color for selected date under Lumo - #123
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update selected-date fallback order src/main/resources/META-INF/frontend/fc-month-calendar/vaadin-month-calendar.css |
The selected-date background fallback now checks --_selection-color before --vaadin-text-color. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: javier-godoy
Merge Risk: 
Minimal · up to 1c362
-
The selected date now uses the theme selection color as intended, with no identified merge-blocking risk.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 warning Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base contains one changed line. It is in vaadin-month-calendar.css and changes only the fallback order for the selected-date background. This change implements the selection-color objective of
#122. No unrelated files or changes are present in the diff. The reviewed head contains no other changes from this PR.
-
Full details: Linked Issues check
-
Explanation
[
#122, selection color] Met. The diff changes one declaration in vaadin-month-calendar.css, line 27. The fallback for [part~='date'][part~='selected']::before now checks --_selection-color before --vaadin-text-color. Under Lumo, the fallback reaches the selection color instead of the text color. This matches the Expected behavior in#122. The result depends on the issue's analysis that Lumo defines --_selection-color as the primary color. This repository does not show that definition, so it is not independently verified here.[
#122, Vaadin 25.2 selectors] Not met. The issue reports that the injected rules in fc-month-calendar.js use an exact [part='date'] match. On Vaadin 25.2, date cells also carry past, future, or today in part. At the reviewed head, connectedCallback() still injects [part='date'][class]::before, [part='date'][selected], and [part='date'][selected]::before with exact matches. The PR does not change fc-month-calendar.js. The PR description states that it closes#122, so this reported defect stays open.Resolution
In fc-month-calendar.js, update the three injected selectors in connectedCallback() to match tokens in the part attribute, for example [part~='date'][class]::before, [part~='date'][selected], and [part~='date'][selected]::before. Then confirm on Vaadin 25.2 that selected and past, future, or today cells receive these rules. If the 25.2 selector change is not part of this PR, remove the close reference to
#122or split that work into a separate issue.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|



Fall back to the theme's selection color (--_selection-color) before --vaadin-text-color for the selected date background, so under Lumo it uses --lumo-primary-color, as vaadin-date-picker does, instead of the body text color. Aura is unaffected, since it defines --vaadin-date-picker-date-selected-background.
Close #122
Summary by CodeRabbit