Skip to content

CSS Default Behavior Mismatch Between OneJS and Web Standards #82

@Candlend

Description

@Candlend

OneJS's UI Toolkit has CSS default behaviors that differ from web browser standards, causing unexpected layout issues when using web-first frameworks like Tailwind CSS.
Main Concern: When migrating web UI code to OneJS, developers are forced to modify their existing code extensively due to these default behavior differences, rather than being able to port code with minimal changes.

Issues

1. Flexbox Defaults

  • Expected: flex-direction: row, align-items: stretch (web defaults)
  • Actual: Requires explicit flex-row class, align-items may not default to stretch
  • Impact: Every horizontal flex container needs flex-row, breaking web-compatible layouts

2. TextField Default Styling

  • Expected: Minimal default styling like web <input> elements
  • Actual: Built-in borders/padding interfere with custom styling, requires USS files for inner elements
  • Impact: Cannot directly apply Tailwind classes, needs workarounds

3. Button Default Styling

  • Expected: Minimal default styling like web <button> elements
  • Actual: Default borders/padding differ from web standards
  • Impact: Buttons don't match web appearance, height/padding calculations differ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions