Skip to content

Shadows with negative spread (Tailwind shadow-md/-lg/-xl) can't be expressed #12

Open

Description

@samitbasu

Found while porting the reference shell.

Problem

Tailwind's larger shadows use a negative spread. shadow-lg is
0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1), and shadow-md and shadow-xl are built the same way. egui 0.37's Shadow stores spread as a u8, so a negative spread can't be passed through. bullseye's shadow(..) class inherits that limit. The shell's shadow-lg / shadow-xl therefore come out larger and heavier than in CSS.

Tailwind's shadows also stack two layers, while a BoxPaint holds a single shadow.

Possible fix (not planned yet)

A shadow with spread -s is the shadow of the box shrunk by s on every side, with the same offset and blur. bullseye could:

  • accept a signed spread,
  • paint it as an egui Shadow on the shrunken rect,
  • and allow more than one shadow layer.

Status

The user asked for this to be recorded, not yet added to the plan (#1). An example that shows the difference is coming in a separate PR.

Activity

  1. added
    record
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    record

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions