Skip to content

Commit d2b459e

Browse files
committed
remove default white background
1 parent c284a10 commit d2b459e

File tree

484 files changed

+14
-557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

484 files changed

+14
-557
lines changed

docs/.vitepress/theme/custom.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
color: var(--vp-c-text-2);
2424
}
2525

26-
.vp-doc .plot,
27-
.vp-doc .plot-ramp {
28-
background: none;
29-
}
30-
3126
:root.dark marker[stroke="white"] {
3227
stroke: var(--vp-c-bg);
3328
}

docs/features/plots.md

Lines changed: 1 addition & 1 deletion

src/legends/ramp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export function legendRamp(color, options) {
4040
svg.append("style").text(
4141
`.${className}-ramp {
4242
display: block;
43-
background: white;
4443
height: auto;
4544
height: intrinsic;
4645
max-width: 100%;

src/plot.d.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,26 @@ export interface PlotOptions extends ScaleDefaults {
7777
/**
7878
* Custom styles to override Plot’s defaults. Styles may be specified either
7979
* as a string of inline styles (*e.g.*, `"color: red;"`, in the same fashion
80-
* as assigning
81-
* [*element*.style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style))
82-
* or an object of properties (*e.g.*, `{color: "red"}`, in the same fashion
83-
* as assigning [*element*.style
84-
* properties](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration)).
85-
* Note that unitless numbers ([quirky
86-
* lengths](https://www.w3.org/TR/css-values-4/#deprecated-quirky-length))
87-
* such as `{padding: 20}` may not supported by some browsers; you should
88-
* instead specify a string with units such as `{padding: "20px"}`. By
89-
* default, the returned plot has a white background, a max-width of 100%, and
90-
* the system-ui font. Plot’s marks and axes default to
91-
* [currentColor](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword),
92-
* meaning that they will inherit the surrounding content’s color. For
93-
* example, a dark theme:
80+
* as assigning [*element*.style](1)) or an object of properties (*e.g.*,
81+
* `{color: "red"}`, in the same fashion as assigning [*element*.style
82+
* properties](2)). Note that unitless numbers ([quirky lengths](3)) such as
83+
* `{padding: 20}` may not supported by some browsers; you should instead
84+
* specify a string with units such as `{padding: "20px"}`. By default, the
85+
* returned plot has a max-width of 100%, and the system-ui font. Plot’s marks
86+
* and axes default to [currentColor](4), meaning that they will inherit the
87+
* surrounding content’s color. For example, a dark theme:
9488
*
9589
* ```js
9690
* Plot.plot({
9791
* style: "background: black; color: white;",
9892
* marks: …
9993
* })
10094
* ```
95+
*
96+
* [1]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
97+
* [2]: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
98+
* [3]: https://www.w3.org/TR/css-values-4/#deprecated-quirky-length
99+
* [4]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword
101100
*/
102101
style?: string | Partial<CSSStyleDeclaration> | null;
103102

src/plot.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ export function plot(options = {}) {
220220
svg.append("style").text(
221221
`.${className} {
222222
display: block;
223-
background: white;
224223
height: auto;
225224
height: intrinsic;
226225
max-width: 100%;

test/output/aaplBollinger.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplBollingerGridInterval.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplBollingerGridSpacing.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCandlestick.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplChangeVolume.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplClose.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseDataTicks.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseGridColor.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseGridInterval.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseGridIntervalName.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseGridIterable.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseImplicitGrid.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplCloseUntyped.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplFancyAxis.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplMonthly.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplVolume.svg

Lines changed: 0 additions & 1 deletion

test/output/aaplVolumeRect.svg

Lines changed: 0 additions & 1 deletion

test/output/anscombeQuartet.svg

Lines changed: 0 additions & 1 deletion

test/output/armadillo.svg

Lines changed: 0 additions & 1 deletion

test/output/aspectRatioBand.svg

Lines changed: 0 additions & 1 deletion

test/output/aspectRatioLinear.svg

Lines changed: 0 additions & 1 deletion

test/output/aspectRatioLog.svg

Lines changed: 0 additions & 1 deletion

test/output/aspectRatioPoint.svg

Lines changed: 0 additions & 1 deletion

test/output/aspectRatioSqrt.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesBinsColors.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesBirthdays.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesBoxingHeight.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesHeightWeight.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesHeightWeightBin.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesHeightWeightBinStroke.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesHeightWeightSex.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesHeightWeightSport.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesNationality.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesSample.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesSampleFacet.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesSexWeight.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesSortFacet.svg

Lines changed: 0 additions & 1 deletion

test/output/athletesSortNationality.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<style>
5050
.plot {
5151
display: block;
52-
background: white;
5352
height: auto;
5453
height: intrinsic;
5554
max-width: 100%;

test/output/athletesSortNullLimit.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<style>
5050
.plot {
5151
display: block;
52-
background: white;
5352
height: auto;
5453
height: intrinsic;
5554
max-width: 100%;

test/output/athletesSortWeightLimit.svg

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)