import SwiftUI struct ContentListRowStyle: ViewModifier { var openPost: (() -> Void)? var contentInsets = EdgeInsets(top: 20, leading: 16, bottom: 16, trailing: 16) var showsSeparator = true @Environment(\.colorScheme) private var colorScheme @Environment(\.displayScale) private var displayScale private var isPad: Bool { UIDevice.current.userInterfaceIdiom == .pad } func body(content: Content) -> some View { content .modifier(PostNavigationPadding(insets: contentInsets, action: openPost)) .frame(maxWidth: .infinity, alignment: .leading) .modifier(PostNavigationTarget(action: openPost, isAccessible: false)) .background(Color(uiColor: .systemBackground)) .overlay(alignment: .bottom) { if showsSeparator && isPad && colorScheme == .dark { Color(uiColor: .separator) .frame(height: 1 / displayScale) .accessibilityHidden(true) } } .padding(.bottom, showsSeparator ? (isPad ? 12 : 8) : 0) .background(Color(uiColor: .secondarySystemBackground)) } }