Skip to content

Separating font weight between Comments (Block/Workspace) and Block labels #9348

@heliacer

Description

@heliacer

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

There is an inconsistency in font-weight handling between block comments and workspace comments in the Zelos renderer.

  • Block comments explicitly apply font-weight: normal in constants.ts.
  • Workspace comments do not, so they inherit the theme’s bold font weight (same as block labels).

This creates a visual mismatch: block comments render in a lighter weight, while workspace comments appear bold.

Screenshot for reference:
Screenshot with Blockly workspace, with Zelos renderer

Request

Make font-weight handling for comments consistent. Possible solutions:

  1. Apply font-weight: normal to workspace comments too, e.g.:
  `${selector} blocklyCommentText blocklyTextarea {`
  `  font-weight: normal;` // Both workspace / block comments hold these classes, unlike .blocklyTextInputBubble
  `}`
  1. Extend the fontStyle theme option to allow separate weights for block labels and comments:
const fontStyle = {
   family: 'Georgia, serif',
   blockWeight: '600',
   textWeight: '400',
   size: 12
}

Alternatives considered

  • Adding a single font-weight: normal rule to workspace comments (simplest and most consistent).
  • Allowing finer-grained configuration (e.g., multiple weights) - possible, but likely unnecessary unless there’s strong demand.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions