Skip to content

font-variant on the axes #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 10, 2021
Merged

font-variant on the axes #606

merged 5 commits into from
Dec 10, 2021

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Dec 10, 2021

remove font-variant from the global styles; introduce the axis fontVariant option, which defaults to tabular-nums

closes #601

…riant option, which defaults to tabular-nums

closes #601
@Fil Fil requested a review from mbostock December 10, 2021 16:02
@Fil
Copy link
Contributor Author

Fil commented Dec 10, 2021

A comment: for Plot.text, I think it would be too magical to do auto-detection, and it's easy enough to use the fontVariant option. This PR removes font-variant from the static styles, and introduces a new axis option called fontVariant, which defaults to tabular-nums. (Just moving the static style to the axis wouldn't allow to undo the feature… and this approach seemed more consistent with our general patterns.)

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! But I think we should only default to tabular-nums for quantitative (and probably also temporal?) scales. For categorical/ordinal scales, we should default to normal.

Fil and others added 3 commits December 10, 2021 17:16
Co-authored-by: Mike Bostock <mbostock@gmail.com>
Co-authored-by: Mike Bostock <mbostock@gmail.com>
@Fil Fil requested a review from mbostock December 10, 2021 16:44
@mbostock mbostock merged commit d518c87 into main Dec 10, 2021
@mbostock mbostock deleted the fil/tabular-nums-axes branch December 10, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only apply font-variant: tabular-nums to axis ticks
2 participants