Skip to content

Commit fb497ba

Browse files
authored
Add colors for weekly downloads sparkline in dark mode (#8291)
1 parent b5584bd commit fb497ba

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ void drawChart(Element svg, HTMLDivElement toolTip, HTMLDivElement chartSubText,
8989

9090
chartSubText.text = '${formatDate(firstDay)} - ${formatDate(lastDate)}';
9191
final chart = SVGGElement();
92-
final frame = SVGRectElement();
93-
frame.setAttribute('height', '$height');
94-
frame.setAttribute('width', '$width');
95-
frame.setAttribute('style', 'fill:white;stroke-width:1;stroke:white');
96-
chart.append(frame);
9792

9893
final sparklineBar = SVGLineElement();
9994
final sparklineCursor = SVGGElement();

pkg/web_css/lib/src/_detail_page.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
255255
margin: 0px;
256256
padding: 2px 8px;
257257
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
258-
color: var(--pub-color-white);
258+
color: var(--pub-weekly-chart-tooltip-text-color);
259259
background-color: var(--pub-weekly-chart-main-color);
260260
opacity: 1;
261261
z-index: 100000;

pkg/web_css/lib/src/_variables.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
--pub-detail_tab-text-color: var(--pub-neutral-textColor);
5757
--pub-detail_tab-underline-color: #dddddd;
5858
--pub-detail_tab-active-color: #1967d2;
59-
--pub-weekly-chart-main-color: #0175c2;
59+
--pub-weekly-chart-main-color: var(--pub-link-text-color);
60+
--pub-weekly-chart-tooltip-text-color: var(--pub-color-white);
6061
--pub-detail_tab-admin-color: #990000;
6162
--pub-hash_link-text-color: #ccc;
6263
--pub-footer-background-color: #27323a;
@@ -144,6 +145,8 @@
144145
--pub-detail_tab-active-color: color-mix(in srgb, var(--pub-link-text-color), var(--pub-inset-bgColor) 20%);
145146
--pub-detail_tab-admin-color: #e03030;
146147
--pub-home_title-text-color: #31b0fc;
148+
--pub-weekly-chart-main-color: var(--pub-link-text-color);
149+
--pub-weekly-chart-tooltip-text-color: var(--pub-color-anchorBlack);
147150
--pub-home_card-box_shadow-color: rgba(255, 255, 255, 0.2);
148151
--pub-home_card_title-text-color: var(--pub-home_title-text-color);
149152
--pub-home_card_hover-box_shadow-color: rgba(255, 255, 255, 0.3);

0 commit comments

Comments
 (0)