Skip to content

No way to control contentMode of @PageImage #918

@Saafo

Description

@Saafo

Feature Name

PageImage content mode

Description

In Xcode 14 series built-in DocC, the @PageImage's content mode seems to be .aspectFit. However when using Xcode 16.0 built-in DocC, the content mode seems to be .aspectFill. Wish there's some way to control this behavior.

E.g.:

@PageImage(purpose: Purpose, source: ResourceReference, alt: String?, contentMode: ContentMode)

Motivation

I'm using a non-square(e.g. 17*21) svg as the PageImage. It works well in Xcode 14 series built-in DocC. But it got clipped in Xcode 16.0 built-in DocC.

CleanShot 2024-12-19 at 19 36 13@2x
Xcode 14.3 built-in DocC artifacts

CleanShot 2024-12-19 at 19 36 48@2x
Xcode 16 built-in DocC artifacts

Importance

Improve the icon integrity

Alternatives Considered

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