reports icon indicating copy to clipboard operation
reports copied to clipboard

FB18236338: Add `effectiveLabelStyle` EnvironmentKey so custom views can read the inherited LabelStyle

Open samhenrigold opened this issue 6 months ago • 0 comments

Submission Date

2025-06-20

Status

Open

Area

SwiftUI

Operating System Version

iOS 26.0

Type

Suggestion

Description

Currently, there is no public environment key to read the inherited LabelStyle set via .labelStyle(_:).

It would be helpful to expose a read-only .effectiveLabelStyle environment key so custom views can respond appropriately to the caller's chosen style. It would be a great accompaniment to the new labelIconToTitleSpacing and labelReservedIconWidth environment values.

extension EnvironmentValues {
    public var effectiveLabelStyle: AnyLabelStyle { get }
}

Keywords

AnyLabelStyle, labelStyle

Prerequisites

  • [x] The title follows the format FB<number>: <title>
  • [x] I will keep this issue updated with Apple's responses

samhenrigold avatar Jun 23 '25 18:06 samhenrigold