vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Extract monospace text styling to a %placeholder

Open bartaz opened this issue 5 years ago • 6 comments

Currently only <code> <pre> etc elements provide built-in monospace font styling, but they also come with other styles, like background, etc.

There is no easy way of creating other elements that will use monospace font but different style.

We should extract any necessary styles (font, line-height, etc) to some %vf-text-monospace placeholder, so it can be reused in places that need to use monospace font without inheriting base <code> styling.

bartaz avatar Nov 19 '20 12:11 bartaz

Triaging: effort low, impact low/medium.

Needs decision. Do we want to allow monospace text outside of code elements?

bartaz avatar Sep 23 '24 10:09 bartaz

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15163.

This message was autogenerated

I'd support having a mixin or a simple css class setting the relevant font properties. My usecase would be showing git revisions in a table and without monospace they do not align nicely.

apollo13 avatar Oct 11 '24 06:10 apollo13

I'd support having a mixin or a simple css class setting the relevant font properties. My usecase would be showing git revisions in a table and without monospace they do not align nicely.

Why can't you just wrap them in <code>?

bartaz avatar Oct 11 '24 06:10 bartaz

Fair enough, it doesn't look to bad in this case. Thanks!

apollo13 avatar Oct 11 '24 06:10 apollo13

Unless there is some high impact use case for this we will consider it for the new architecture only.

bartaz avatar Oct 24 '24 13:10 bartaz