From c949b0bda57877d104423de7aabe643a0afca3e1 Mon Sep 17 00:00:00 2001 From: Bryan Cinman Date: Fri, 22 Feb 2019 19:00:07 -0500 Subject: [PATCH] force spectrum font sizing --- index.html | 8 ++++++++ src/spectrum/plot/index.tsx | 7 +++++-- src/spectrum/plot/style.css | 10 ++++++++-- src/spectrum/plot/style.css.d.ts | 1 + src/spectrum/style.css | 1 + yarn.lock | 13 +------------ 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index f3b4621..2ff1771 100644 --- a/index.html +++ b/index.html @@ -14,12 +14,20 @@ padding: 0; margin: 0; } + + text { + font-weight: 700; + font-size: 24px; + } + .wrapper { width: 100%; flex-wrap: wrap; border: 1px solid #ccc; padding: 20px; width: 500px; + font-weight: 700; + font-size: 20px; } .wrapper p { diff --git a/src/spectrum/plot/index.tsx b/src/spectrum/plot/index.tsx index 949521c..637b8f8 100644 --- a/src/spectrum/plot/index.tsx +++ b/src/spectrum/plot/index.tsx @@ -1,5 +1,6 @@ import { h, Component } from "preact"; import { sortObjectArray } from "../../utils"; +import classNames from "classnames"; import * as css from "./style.css"; const PLOT_WIDTH = 240; @@ -226,9 +227,11 @@ export default class Plot extends Component { }; } + // @ts-ignore + const classes = classNames(css.wrapper, css[props.mode]); + return ( - // @ts-ignore - + diff --git a/src/spectrum/plot/style.css b/src/spectrum/plot/style.css index 8ef9ee4..dee5edc 100644 --- a/src/spectrum/plot/style.css +++ b/src/spectrum/plot/style.css @@ -24,6 +24,11 @@ stroke: #fff; } +.wrapper text { + font-size: 11px; + font-weight: normal; +} + .marker { font-size: 12px; } @@ -36,6 +41,7 @@ stroke-width: 0.5; } -.legend { - font-size: 7px; +.legend tspan { + font-weight: normal; + font-size: 8px; } diff --git a/src/spectrum/plot/style.css.d.ts b/src/spectrum/plot/style.css.d.ts index a928501..2a53c70 100644 --- a/src/spectrum/plot/style.css.d.ts +++ b/src/spectrum/plot/style.css.d.ts @@ -7,3 +7,4 @@ export const line: string; export const marker: string; export const related: string; export const relatedLine: string; +export const wrapper: string; diff --git a/src/spectrum/style.css b/src/spectrum/style.css index cf1e089..10d7f23 100644 --- a/src/spectrum/style.css +++ b/src/spectrum/style.css @@ -39,6 +39,7 @@ text-transform: uppercase; margin-bottom: 16px; font-size: 16px; + font-weight: normal; } .symbol { diff --git a/yarn.lock b/yarn.lock index c3f85c3..d0fb9b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -102,13 +102,6 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" -"@babel/polyfill@^7.2.5": - version "7.2.5" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d" - dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.12.0" - "@babel/template@^7.1.0", "@babel/template@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" @@ -983,7 +976,7 @@ copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" -core-js@^2.5.7, core-js@^2.6.5: +core-js@^2.6.5: version "2.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" @@ -3350,10 +3343,6 @@ regenerate@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"