Skip to content

Commit

Permalink
Add colors for weekly downloads sparkline in dark mode (#8291)
Browse files Browse the repository at this point in the history
  • Loading branch information
szakarias authored Nov 15, 2024
1 parent b5584bd commit fb497ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 0 additions & 5 deletions pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ void drawChart(Element svg, HTMLDivElement toolTip, HTMLDivElement chartSubText,

chartSubText.text = '${formatDate(firstDay)} - ${formatDate(lastDate)}';
final chart = SVGGElement();
final frame = SVGRectElement();
frame.setAttribute('height', '$height');
frame.setAttribute('width', '$width');
frame.setAttribute('style', 'fill:white;stroke-width:1;stroke:white');
chart.append(frame);

final sparklineBar = SVGLineElement();
final sparklineCursor = SVGGElement();
Expand Down
2 changes: 1 addition & 1 deletion pkg/web_css/lib/src/_detail_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
margin: 0px;
padding: 2px 8px;
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
color: var(--pub-color-white);
color: var(--pub-weekly-chart-tooltip-text-color);
background-color: var(--pub-weekly-chart-main-color);
opacity: 1;
z-index: 100000;
Expand Down
5 changes: 4 additions & 1 deletion pkg/web_css/lib/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
--pub-detail_tab-text-color: var(--pub-neutral-textColor);
--pub-detail_tab-underline-color: #dddddd;
--pub-detail_tab-active-color: #1967d2;
--pub-weekly-chart-main-color: #0175c2;
--pub-weekly-chart-main-color: var(--pub-link-text-color);
--pub-weekly-chart-tooltip-text-color: var(--pub-color-white);
--pub-detail_tab-admin-color: #990000;
--pub-hash_link-text-color: #ccc;
--pub-footer-background-color: #27323a;
Expand Down Expand Up @@ -144,6 +145,8 @@
--pub-detail_tab-active-color: color-mix(in srgb, var(--pub-link-text-color), var(--pub-inset-bgColor) 20%);
--pub-detail_tab-admin-color: #e03030;
--pub-home_title-text-color: #31b0fc;
--pub-weekly-chart-main-color: var(--pub-link-text-color);
--pub-weekly-chart-tooltip-text-color: var(--pub-color-anchorBlack);
--pub-home_card-box_shadow-color: rgba(255, 255, 255, 0.2);
--pub-home_card_title-text-color: var(--pub-home_title-text-color);
--pub-home_card_hover-box_shadow-color: rgba(255, 255, 255, 0.3);
Expand Down

0 comments on commit fb497ba

Please sign in to comment.