Skip to content
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

Align font options with CSS #8066

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Align font options with CSS #8066

merged 2 commits into from
Nov 19, 2020

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Nov 17, 2020

Based on discussion in chartjs/chartjs-plugin-datalabels#203 (comment)

  • remove color, lineWidth and strokeStyle from font
  • split defaults.color to color, borderColor and backgroundColor
  • align tick stroke options with CSS (unofficial) caniuse
  • alter default routing to work with sub-scopes and add some routes

Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

Thank you @kurkle for this change! I left very minor comments.

A suggestion (not for this PR) about routing. I'm not familiar with this new concept but I think it would be interesting if borderColor and textStrokeColor, if undefined, would route to color. That's how it's done in the datalabels plugin but it's similar to the currentColor variable in CSS. This would allow to easily sync the border and text colors of an element via a single color value (e.g. an outlined label).

docs/docs/axes/_common_ticks.md Outdated Show resolved Hide resolved
docs/docs/getting-started/v3-migration.md Outdated Show resolved Hide resolved
src/core/core.defaults.js Outdated Show resolved Hide resolved
@kurkle kurkle merged commit ddc72fc into chartjs:master Nov 19, 2020
@kurkle kurkle deleted the css-font branch December 30, 2020 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants