feat: implement Dynamic Type with Apple text styles
Replace all custom Theme.FontSize values and hardcoded font sizes with Apple's built-in text styles (.largeTitle, .title2, .headline, .body, .subheadline, .caption, .caption2) to support accessibility scaling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ struct SuggestedTripCard: View {
|
||||
HStack {
|
||||
// Region badge
|
||||
Text(suggestedTrip.region.shortName)
|
||||
.font(.system(size: Theme.FontSize.micro, weight: .semibold))
|
||||
.font(.caption)
|
||||
.foregroundStyle(.white)
|
||||
.padding(.horizontal, Theme.Spacing.xs)
|
||||
.padding(.vertical, 4)
|
||||
@@ -30,7 +30,7 @@ struct SuggestedTripCard: View {
|
||||
HStack(spacing: 4) {
|
||||
ForEach(suggestedTrip.displaySports, id: \.self) { sport in
|
||||
Image(systemName: sport.iconName)
|
||||
.font(.system(size: 12))
|
||||
.font(.caption)
|
||||
.foregroundStyle(sport.themeColor)
|
||||
}
|
||||
}
|
||||
@@ -58,12 +58,12 @@ struct SuggestedTripCard: View {
|
||||
Image(systemName: "mappin")
|
||||
}
|
||||
}
|
||||
.font(.system(size: 11))
|
||||
.font(.caption2)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
|
||||
// Date range
|
||||
Text(suggestedTrip.trip.formattedDateRange)
|
||||
.font(.system(size: Theme.FontSize.micro))
|
||||
.font(.caption)
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
}
|
||||
.padding(Theme.Spacing.md)
|
||||
@@ -86,16 +86,16 @@ struct SuggestedTripCard: View {
|
||||
// Start → End display
|
||||
HStack(spacing: 6) {
|
||||
Text(startCity)
|
||||
.font(.system(size: Theme.FontSize.caption, weight: .semibold))
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
.lineLimit(1)
|
||||
|
||||
Image(systemName: "arrow.right")
|
||||
.font(.system(size: 10, weight: .semibold))
|
||||
.font(.caption2)
|
||||
.foregroundStyle(Theme.warmOrange)
|
||||
|
||||
Text(endCity)
|
||||
.font(.system(size: Theme.FontSize.caption, weight: .semibold))
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user