_ios-theme.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // ==========================================================================
  2. // iOS Design Theme - Variables
  3. // ==========================================================================
  4. //
  5. // Purpose:
  6. // --------
  7. // This file establishes a design system based on Apple's Human Interface Guidelines (HIG).
  8. // It provides a comprehensive set of SCSS variables for colors, typography, spacing,
  9. // and other properties to ensure a consistent and native iOS look and feel across
  10. // the application.
  11. //
  12. // Sections:
  13. // ---------
  14. // 1. **System Colors**: Standard iOS system colors for backgrounds, text, and UI elements.
  15. // 2. **UI Colors**: Colors for specific UI components like buttons, switches, and notifications.
  16. // 3. **Typography**: Font families, sizes, and weights for different text styles.
  17. // 4. **Spacing & Layout**: Standardized spacing units for margins, padding, and grid systems.
  18. // 5. **Effects & Materials**: Variables for shadows, blurs, and other visual effects.
  19. // 6. **Component-Specific**: Variables tailored for specific components like lists, forms, etc.
  20. //
  21. // ==========================================================================
  22. // --------------------------------------------------------------------------
  23. // 1. System Colors
  24. // - Based on Apple's Human Interface Guidelines (HIG) color palette.
  25. // - Includes light and dark mode variants.
  26. // --------------------------------------------------------------------------
  27. // Light Mode System Colors
  28. $ios-color-system-blue-light: #007AFF;
  29. $ios-color-system-green-light: #34C759;
  30. $ios-color-system-indigo-light: #5856D6;
  31. $ios-color-system-orange-light: #FF9500;
  32. $ios-color-system-pink-light: #FF2D55;
  33. $ios-color-system-purple-light: #AF52DE;
  34. $ios-color-system-red-light: #FF3B30;
  35. $ios-color-system-teal-light: #5AC8FA;
  36. $ios-color-system-yellow-light: #FFCC00;
  37. // Light Mode Grays
  38. $ios-color-system-gray-1-light: #8E8E93;
  39. $ios-color-system-gray-2-light: #AEAEB2;
  40. $ios-color-system-gray-3-light: #C7C7CC;
  41. $ios-color-system-gray-4-light: #D1D1D6;
  42. $ios-color-system-gray-5-light: #E5E5EA;
  43. $ios-color-system-gray-6-light: #F2F2F7;
  44. // Light Mode UI Elements
  45. $ios-color-label-light: #000000;
  46. $ios-color-secondary-label-light: rgba(60, 60, 67, 0.6);
  47. $ios-color-tertiary-label-light: rgba(60, 60, 67, 0.3);
  48. $ios-color-quaternary-label-light: rgba(60, 60, 67, 0.18);
  49. $ios-color-system-background-light: #FFFFFF;
  50. $ios-color-secondary-system-background-light: #F2F2F7;
  51. $ios-color-tertiary-system-background-light: #FFFFFF;
  52. $ios-color-separator-light: rgba(60, 60, 67, 0.29);
  53. $ios-color-opaque-separator-light: #C6C6C8;
  54. // Dark Mode will be defined here if needed in the future
  55. // --------------------------------------------------------------------------
  56. // 2. UI Colors
  57. // - Colors for specific UI components.
  58. // --------------------------------------------------------------------------
  59. $ios-primary: $ios-color-system-blue-light;
  60. $ios-color-link: $ios-color-system-blue-light;
  61. $ios-color-button-primary-background: $ios-color-system-blue-light;
  62. $ios-card-background: $ios-color-system-background-light;
  63. $ios-background: $ios-color-system-background-light;
  64. $ios-background-secondary: $ios-color-secondary-system-background-light;
  65. $ios-background-tertiary: $ios-color-tertiary-system-background-light;
  66. $ios-border: $ios-color-separator-light;
  67. // Text Colors
  68. $ios-text-primary: $ios-color-label-light;
  69. $ios-text-secondary: $ios-color-secondary-label-light;
  70. $ios-text-tertiary: $ios-color-tertiary-label-light;
  71. // Semantic Colors
  72. $ios-success: $ios-color-system-green-light;
  73. $ios-warning: $ios-color-system-orange-light;
  74. $ios-error: $ios-color-system-red-light;
  75. $ios-danger: $ios-color-system-red-light;
  76. $ios-info: $ios-color-system-teal-light;
  77. // --------------------------------------------------------------------------
  78. // 3. Typography
  79. // - Font families, sizes, and weights based on SF Pro.
  80. // --------------------------------------------------------------------------
  81. $ios-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  82. // Dynamic Type Sizes (Large is default)
  83. $ios-font-size-large-title: 34px;
  84. $ios-font-size-title-1: 28px;
  85. $ios-font-size-title-2: 22px;
  86. $ios-font-size-title-3: 20px;
  87. $ios-font-size-headline: 17px;
  88. $ios-font-size-body: 17px;
  89. $ios-font-size-callout: 16px;
  90. $ios-font-size-subhead: 15px;
  91. $ios-font-size-footnote: 13px;
  92. $ios-font-size-caption-1: 12px;
  93. $ios-font-size-caption-2: 11px;
  94. // Custom sizes
  95. $ios-font-size-xl: 24px;
  96. $ios-font-size-lg: 18px;
  97. $ios-font-size-md: 16px;
  98. $ios-font-size-sm: 14px;
  99. $ios-font-size-xs: 12px;
  100. $ios-font-size-base: $ios-font-size-md;
  101. // Font Weights
  102. $ios-font-weight-regular: 400;
  103. $ios-font-weight-medium: 500;
  104. $ios-font-weight-semibold: 600;
  105. $ios-font-weight-bold: 700;
  106. // --------------------------------------------------------------------------
  107. // 4. Spacing & Layout
  108. // - Standardized spacing units for consistent layout.
  109. // --------------------------------------------------------------------------
  110. $ios-spacing-base-unit: 8px;
  111. $ios-spacing-xxs: $ios-spacing-base-unit * 0.25; // 2px
  112. $ios-spacing-xs: $ios-spacing-base-unit * 0.5; // 4px
  113. $ios-spacing-sm: $ios-spacing-base-unit; // 8px
  114. $ios-spacing-md: $ios-spacing-base-unit * 2; // 16px
  115. $ios-spacing-lg: $ios-spacing-base-unit * 3; // 24px
  116. $ios-spacing-xl: $ios-spacing-base-unit * 4; // 32px
  117. $ios-spacing-xxl: $ios-spacing-base-unit * 6; // 48px
  118. // --------------------------------------------------------------------------
  119. // 5. Effects & Materials
  120. // - Shadows, corner radii, and other visual effects.
  121. // --------------------------------------------------------------------------
  122. $ios-corner-radius-sm: 6px;
  123. $ios-corner-radius-md: 10px;
  124. $ios-corner-radius-lg: 14px;
  125. $ios-corner-radius-xl: 20px;
  126. $ios-corner-radius-continuous: 9999px;
  127. $ios-radius-sm: $ios-corner-radius-sm;
  128. $ios-radius-md: $ios-corner-radius-md;
  129. $ios-radius-lg: $ios-corner-radius-lg;
  130. $ios-radius-xl: $ios-corner-radius-xl;
  131. $ios-radius-full: $ios-corner-radius-continuous;
  132. $ios-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  133. $ios-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
  134. $ios-shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);
  135. $ios-shadow-standard: 0 3px 8px rgba(0, 0, 0, 0.12);
  136. $ios-shadow-strong: 0 6px 16px rgba(0, 0, 0, 0.15);
  137. $ios-shadow-card: $ios-shadow-standard;
  138. $ios-shadow-lg: $ios-shadow-strong;
  139. // --------------------------------------------------------------------------
  140. // 6. Component-Specific Variables
  141. // --------------------------------------------------------------------------
  142. $ios-list-item-height: 44px;
  143. $ios-form-input-height: 44px;
  144. $ios-navbar-height: 44px;
  145. $ios-tabbar-height: 50px;
  146. // Transitions
  147. $ios-transition-duration: 0.3s;
  148. $ios-transition-timing-function: ease-in-out;
  149. $ios-feedback-tap: transform 0.1s ease-out;