Skip to Main Content
Builder.io Ideas
Categories Visual Editor
Created by Guest
Created on Jan 20, 2023

Specify default units for typography properties

This is mainly a nice-to-have feature, but one minor annoyance of the visual editor is that it will autofill 'px' even when I don't want to use pixels. You are able to override this with your own value, but this gets repetitive. Our team has certain common practices around typography, so ideally we would be able to set default units somewhere. (Please correct me if in fact this is already a feature.)

  1. Font-size: There have been debates about this over the years, but our view is that rems are a better practice for accessibility than pixels since they adjust with the user's browser preferences.

  2. Letter-spacing: We find using ems instead of pixels is more scalable since they will scale with the font size of the element. If using pixels, adjustments will need to be made as the font size of the element changes across breakpoints.

  3. Line-height: Same idea, a unitless value (i.e. 1 or 1.2) will not need to be adjusted for each breakpoint, it will scale with the overall font size.

One additional benefit of this would be that by setting default values for our space, we could enforce these standards across our team of developers. This would also benefit less technical members. If we can default them to the best practice, they'll use it, whereas on their own, they would be less likely go the extra mile to replace px with rems or use unitless line-height.



  • Attach files
  • Guest
    Reply
    |
    Feb 3, 2023

    I have a similar problem. You have my vote.

    My idea is to have a fundamental possibility to restrict the input values to an admin defined set of values, see my recent topic below:

    https://forum.builder.io/t/how-to-force-values-design-system/3197

    Summarized: I would like to define a set of values which should be enforced to be used by a content manager instead of letting him choose a random px value that comes in his mind. So we need an overall restriction policy in Builderio for input fields where units (px, rem, etc.) are used.