Skip to content

[css-borders-4] Concave corner-shape and inset box-shadowΒ #12961

@noamr

Description

@noamr

The default implementation of inset box-shadow reduces the radius by the spread. This creates situations with concave corners might look "technically" like something that resembles a shadow but doesn't match the "strokey" concept of box-shadow.

For example, this is the current spec-compliant result of the following CSS:

#target {
  width: 200px;
  height: 200px;
  border-radius: 70px;
  corner-shape: scoop bevel notch squircle;
  background: lightgreen;
  border: 10px solid orange;
  box-shadow: 0 0 0 10px inset; 
}
Image

The black shadow does look like something that could be a shadow, but could also feel strange given the behavior of normal (outset) box-shadow spread.

Alternatives I can think of:

  1. Leave as is
  2. Render inset shadows as strokes, and apply the inverse of the corner-smoothing algorithm. This would make inset shadows look like the inverse of the equivalent outset shadows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions