Skip to content

references/liquid-glass.md uses non-existent Glass.prominent — fails to compile #64

Closed

Description

@kumamaki

Summary

references/liquid-glass.md (v3.1.0) repeatedly references Glass.prominent as a static property of the Glass material type. This property does not exist in the shipping SwiftUI / SwiftUICore SDKs on either macOS 26 or iOS 26, so any code an agent generates from these examples fails to compile with:

error: type 'Glass' has no member 'prominent'

Reproduction

Any of the snippets in the doc that use .prominent reproduce, e.g.:

Text("Hi")
    .padding()
    .glassEffect(.prominent)   // ← compile error in macOS 26 / iOS 26 SDK
.glassEffect(.prominent.tint(.red.opacity(0.3)))   // ← compile error

Evidence (four independent sources, all agree)

1. macOS 26 SDK swiftinterface — SwiftUICore.framework/Modules/SwiftUICore.swiftmodule/arm64e-apple-macos.swiftinterface:

public struct Glass : Swift.Equatable, Swift.Sendable {
  public static var regular: SwiftUICore.Glass { get }
  public static var clear:   SwiftUICore.Glass { get }
  public static var identity: SwiftUICore.Glass { get }
  public func tint(_ color: SwiftUICore.Color?) -> SwiftUICore.Glass
  public func interactive(_ isEnabled: Swift.Bool = true) -> SwiftUICore.Glass
  public static func == (a: SwiftUICore.Glass, b: SwiftUICore.Glass) -> Swift.Bool
}

2. iOS 26 SDK swiftinterface — same framework, iOS variant — surfaces the identical API. No .prominent.

3. Compiler probe —

import SwiftUI
@available(macOS 26.0, *)
func probe() { let _: Glass = .prominent }

xcrun -sdk macosx swiftc -typecheck -target arm64-apple-macos26.0 probe.swift →

error: type 'Glass' has no member 'prominent'

4. Apple's official documentation JSON — https://developer.apple.com/tutorials/data/documentation/swiftui/glass.json:

  • Type Properties: clear, identity, regular
  • Instance Methods: interactive(_:), tint(_:)

Likely root cause

The skill conflates the Glass material with the GlassProminentButtonStyle (used as .buttonStyle(.glassProminent)). Those are real, shipping APIs — but they are a PrimitiveButtonStyle, not a Glass material. There is no "prominent" prominence level on the Glass material itself.

To make a glass surface appear more prominent in shipping macOS 26 / iOS 26, the idiomatic move is a stronger tint:

.glassEffect(.regular.tint(.accentColor.opacity(0.4)), in: .rect(cornerRadius: 16))

…not a separate prominence enum value.

Affected sections of references/liquid-glass.md

  • "Prominence Levels" — the entire .regular vs .prominent distinction is wrong; only .regular, .clear, .identity exist.
  • "Tinting" — .glassEffect(.prominent.tint(.red.opacity(0.3))) should become .glassEffect(.regular.tint(.red.opacity(0.3))).
  • "Segmented Control" example — .prominent.interactive() should become .regular.interactive().tint(.accentColor) (or similar) for the selected state.
  • Best-practices bullet that mentions "Appropriate prominence levels used" should be reworded around tint intensity.

The .buttonStyle(.glass) and .buttonStyle(.glassProminent) examples are correct and should stay.

Environment

  • Xcode 26.2 (Build 17C52)
  • macOS 26.3 host
  • Both MacOSX.sdk and iPhoneOS.sdk from Xcode 26.2 verified

Happy to send a PR if helpful — wanted to file the issue first so you can decide the framing you want for the rewrite.

Activity

  1. EngOmarElsayed commented on May 9, 2026

    @EngOmarElsayed
    Collaborator

    Thanks for catching this, if you want to open a PR with the fix do that if not I will fix it as soon as possible

  2. kumamaki commented on May 10, 2026

    @kumamaki
    ContributorAuthor

    Sure. Here.

  3. added a commit that references this issue on May 17, 2026
    c24f959
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions