Skip to content

Commit

Permalink
Merge pull request #338 from ifpen/337-fix-fonts-regressions-after-da…
Browse files Browse the repository at this point in the history
…rk-mode-application

fix: font color issue for D3 year calendar
  • Loading branch information
bengaid committed Jun 13, 2024
2 parents 4f3d66f + d18453a commit c553fd0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ function calendarD3WidgetPluginClass() {
function drawCalendar() {
const year = svg.selectAll('g').data(years).join('g');

const mainTextColor = getComputedStyle(document.documentElement).getPropertyValue('--widget-color');

year
.attr('class', 'year')
.attr(
Expand All @@ -351,6 +353,7 @@ function calendarD3WidgetPluginClass() {
.attr('font-weight', 'bold')
.attr('text-anchor', 'end')
.text(([key]) => key)
.attr('fill', mainTextColor)
.style('opacity', 1);

year
Expand All @@ -364,6 +367,7 @@ function calendarD3WidgetPluginClass() {
.attr('y', (i) => (countDay(i) + 0.5) * cellSize)
.attr('dy', '0.31em')
.text(formatDay)
.attr('fill', mainTextColor)
.style('opacity', 1);

year
Expand Down Expand Up @@ -438,6 +442,7 @@ function calendarD3WidgetPluginClass() {
.style('opacity', 1)
.attr('x', (d) => timeWeek.count(d3.timeYear(d), timeWeek.ceil(d)) * cellSize + 3)
.attr('y', -5)
.attr('fill', mainTextColor)
.style('opacity', 1);
}
function pathMonth(t) {
Expand Down

0 comments on commit c553fd0

Please sign in to comment.