User preference for monospaced / variable-width font in textareas
|Assignee:||Jean-Philippe Lang||% Done:|
Currently, Redmine's stylesheets do not define a
font-family for text areas which leaves this up to the browser and results in e.g. monspaced fonts in Firefox and variable-width fonts in Webkit (Chrome, Safari, ...).
Generally, our experience at Planio has shown that there are users who will write more code in text areas and users who will write more prose text.
Therefore, this patch makes the behaviour more deterministic across browsers and lets users choose their preference in My Account. It includes a few tests and applies cleanly against current trunk.
- Textareas in Redmine are rendered using the regular
text_areahelper in Rails. There is no way to render an extra css class for all textareas without touching every view file in Redmine that has a textarea. This would have made this patch much bigger.
- The setting would not work in plugins out of the box since plugin developers would have to change their code as well.
Why aren't you rendering an inline style definition in the HTML
In theory, we could have defined an inline style in the HTML
HEAD on every page, depending on the value of
#5 Updated by Jan from Planio www.plan.io about 2 years ago
third time's a charm :)
#6 Updated by Go MAEDA about 2 years ago
- Status changed from Needs feedback to New
- Target version changed from Candidate for next minor release to 3.4.0
I found a simple use case of this feature in Planio's site . I think this feature is useful for developers.
The patch passed all tests. Setting target version to 3.4.0.
#7 Updated by Jean-Philippe Lang about 2 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
I've also changed the preference to a drop down instead of a checkbox in order to offer 3 options (monospaced, proportional and browser defaut).