| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| Object { | ||
| "fontFamily": "overpass, overpass, open sans, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol", | ||
| "fontFamily": "var(--pf-chart-global--FontFamily)", | ||
| "fontSize": 14, |
There was a problem hiding this comment.
we have vars for the font sizes used in charts - this one is --pf-chart-global--FontSize--sm
https://github.com/patternfly/patternfly-next/blob/master/src/patternfly/_chart-globals.scss#L55-L61
Sorry, something went wrong.
There was a problem hiding this comment.
Victory typically requires raw values for colors, pixels, etc. The font size; for example, must be output as a value because Victory concatenates that with 'px'.
Although the snapshot does not reflect that. The font family and letter spacing are one of the few places where we can output a variable.
Sorry, something went wrong.
There was a problem hiding this comment.
Should we remove the unit from these vars so they're usable? We do that with other properties like padding, margin, width, height, etc.
Sorry, something went wrong.
There was a problem hiding this comment.
There is no unit in our pf-core chart vars for this very reason, it's just a raw number.
Victory is appending the unit automatically. I suspect because they use the raw value to calculate heights & widths of labels, legends, etc. Thus, a CSS variable breaks for properties like fontSize, padding, etc.
Although users can create a custom theme, I've asked Victory to better support CSS vars.
https://github.com/FormidableLabs/victory/issues/1357
Sorry, something went wrong.
| Object { | ||
| "fontFamily": "overpass, overpass, open sans, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol", | ||
| "fontFamily": "var(--pf-chart-global--FontFamily)", | ||
| "fontSize": 14, |
There was a problem hiding this comment.
same here
Sorry, something went wrong.
| Object { | ||
| "fontFamily": "overpass, overpass, open sans, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol", | ||
| "fontFamily": "var(--pf-chart-global--FontFamily)", | ||
| "fontSize": 14, |
There was a problem hiding this comment.
same here
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2584.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
👍
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When the pf-m-redhat-font selector is added to the page, the Red Hat font is expected to be used instead of the default Overpass font.
This change ensures that charts and its labels use the Red Hat font as expected.
Fixes #2573