checkpoint before checking out main
This commit is contained in:
@@ -13,7 +13,7 @@ public struct CardPageContent<Content: View>: View {
|
||||
private let content: Content
|
||||
|
||||
public init(
|
||||
spacing: CGFloat = Spacing.md,
|
||||
spacing: CGFloat = CardLayoutMetrics.sectionSpacing,
|
||||
topPadding: CGFloat = Spacing.md,
|
||||
bottomPadding: CGFloat = Spacing.md,
|
||||
@ViewBuilder content: () -> Content
|
||||
@@ -95,12 +95,8 @@ public struct SurfaceCardModifier: ViewModifier {
|
||||
in: shape
|
||||
)
|
||||
// Clip child backgrounds as well as the card surface. Without
|
||||
// this, a full-width child can visually square off a corner
|
||||
// even though the shared background and border use Radius.xl.
|
||||
// this, a full-width child can visually square off a corner.
|
||||
.clipShape(shape)
|
||||
.overlay(
|
||||
shape.stroke(palette.divider, lineWidth: 0.5)
|
||||
)
|
||||
} else {
|
||||
content
|
||||
}
|
||||
|
||||
@@ -158,6 +158,14 @@ public enum Spacing {
|
||||
public static let hero: CGFloat = 48
|
||||
}
|
||||
|
||||
/// Semantic spacing for sibling card surfaces.
|
||||
public enum CardLayoutMetrics {
|
||||
/// Vertical gap between page-level cards or card sections.
|
||||
public static let sectionSpacing: CGFloat = 18
|
||||
/// Horizontal and vertical gap between compact cards or list-item cards.
|
||||
public static let compactItemSpacing: CGFloat = Spacing.xs
|
||||
}
|
||||
|
||||
// MARK: - Corner radius scale
|
||||
|
||||
public enum Radius {
|
||||
@@ -227,10 +235,6 @@ private struct CardSurfaceModifier: ViewModifier {
|
||||
content
|
||||
.padding(padding)
|
||||
.background(palette.surface, in: RoundedRectangle(cornerRadius: Radius.large, style: .continuous))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: Radius.large, style: .continuous)
|
||||
.stroke(palette.divider, lineWidth: 0.5)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,10 +271,6 @@ private struct SecondaryButtonModifier: ViewModifier {
|
||||
.font(TypeStyle.headline)
|
||||
.frame(maxWidth: .infinity, minHeight: 50)
|
||||
.background(palette.surface, in: RoundedRectangle(cornerRadius: Radius.large, style: .continuous))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: Radius.large, style: .continuous)
|
||||
.stroke(palette.dividerStrong, lineWidth: 0.5)
|
||||
)
|
||||
.foregroundStyle(palette.textPrimary)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// OSGKeyboard · Shared
|
||||
//
|
||||
// Flat semantic surface used by home / dashboard stats on every platform.
|
||||
// Deliberately shadowless — hierarchy comes from fill + hairline border.
|
||||
// Deliberately shadowless — hierarchy comes from the semantic surface fill.
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@@ -30,8 +30,5 @@ public struct UsageSurfaceCard<Content: View>: View {
|
||||
.padding(padding)
|
||||
.background(palette.surface, in: shape)
|
||||
.clipShape(shape)
|
||||
.overlay(
|
||||
shape.stroke(palette.divider, lineWidth: 0.5)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user