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

Share fonts across components #66201

Closed
bpasero opened this issue Jan 8, 2019 · 3 comments
Closed

Share fonts across components #66201

bpasero opened this issue Jan 8, 2019 · 3 comments
Assignees
Labels
debt Code quality issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jan 8, 2019

From #65776 (comment)

Instead of components defining their own font rules, we should have one CSS class that components can pick to get a certain font style, e.g. one use case seems to be to use a monospace font in the workbench.

@bpasero bpasero added the debt Code quality issues label Jan 8, 2019
@bpasero bpasero self-assigned this Jan 8, 2019
@bpasero bpasero added this to the February 2019 milestone Feb 6, 2019
bpasero added a commit that referenced this issue Feb 7, 2019
@bpasero
Copy link
Member Author

bpasero commented Feb 7, 2019

@alexandrudima thoughts on this solution that is leveraging CSS variables: https://github.com/Microsoft/vscode/compare/ben/66201

?

Of course I still can tweak the font-family further by removing fonts that are specific to a OS. I think the variables work best over having to introduce a generic selector that is often hard to add for consumers.

The advantage of this approach is still that:

  • we can reduce fonts by OS
  • we can share the same consistent set of monospace font

Disadvantage:

  • does not work in the standalone editor (e.g. found one usage in base)

cleidigh referenced this issue Feb 9, 2019
* Rework description calculation

* Add borders back

* Tweaks 1

* Cleanup 1
@alexdima
Copy link
Member

@bpasero This looks good to me. Maybe we can have both a CSS variable and a base class name called monaco-monospace. Then, usages from /base/ can adopt and add the class name monaco-monospace. Usages from other places can choose to use the class name monaco-monospace or the CSS variable, as they see fit.

@bpasero
Copy link
Member Author

bpasero commented Feb 13, 2019

@alexandrudima thanks will do

@bpasero bpasero closed this as completed Feb 18, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

2 participants