| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 // ========================================================================== 2 // WordPress Design System Tokens 3 // ========================================================================== 4 // 5 // These tokens are derived from the WordPress Design System in Figma: 6 // https://www.figma.com/design/804HN2REV2iap2ytjRQ055/WordPress-Design-System 7 // 8 // IMPORTANT: Do NOT expose these as CSS custom properties. 9 // Use these Sass variables to compile to static CSS values. 10 // The only CSS custom properties available are those in wp-base-styles: 11 // - --wp-admin-theme-color 12 // - --wp-admin-theme-color--rgb 13 // - --wp-admin-theme-color-darker-10 14 // - --wp-admin-theme-color-darker-20 15 // - --wp-admin-border-width-focus 16 // 17 // ========================================================================== 18 19 /** 20 * Grid Units (Spacing) 21 * 22 * Based on 4px base unit. Use for padding, margin, and gap values. 23 */ 24 25 $grid-unit-05: 4px; // Scales/grid unit 05 26 $grid-unit-10: 8px; // Scales/grid unit 10 27 $grid-unit-15: 12px; // Scales/grid unit 15 28 $grid-unit-20: 16px; // Scales/grid unit 20 29 $grid-unit-30: 24px; // Scales/grid unit 30 30 $grid-unit-40: 32px; // Scales/grid unit 40 31 $grid-unit-50: 40px; // Scales/grid unit 50 32 $grid-unit-60: 48px; // Scales/grid unit 60 33 $grid-unit-70: 56px; // Scales/grid unit 70 34 35 /** 36 * Border Radius 37 */ 38 39 $radius-xs: 1px; // radius-xs 40 $radius-s: 2px; // radius-s - Buttons, inputs 41 $radius-m: 4px; // radius-m - Focus rings 42 $radius-l: 8px; // radius-l - Cards, dashboard widgets 43 $radius-30: 12px; // Radius 30 44 $radius-full: 9999px; // radius-full - Pills, avatars, circles 45 46 /** 47 * Gray Scale 48 * 49 * Neutral colors for backgrounds, borders, and text. 50 */ 51 52 $gray-100: #f0f0f0; // Scales/Grays/gray-100 - Page background, disabled inputs 53 $gray-200: #e0e0e0; // Scales/Grays/gray-200 54 $gray-300: #ddd; // Scales/Grays/gray-300 55 $gray-400: #ccc; // Scales/Grays/gray-400 - Disabled borders 56 $gray-600: #949494; // Scales/Grays/gray-600 - Input borders, disabled text 57 $gray-700: #757575; // Scales/Grays/gray-700 58 $gray-800: #2f2f2f; // Scales/Grays/gray-800 59 $gray-900: #1e1e1e; // Scales/Grays/gray-900 - Primary text 60 61 $white: #fff; // Scales/Black & White/white 62 63 /** 64 * Theme Colors (Static reference values) 65 * 66 * For actual theme color usage, use var(--wp-admin-theme-color) instead. 67 * These are provided for reference and for contexts where CSS vars aren't available. 68 */ 69 70 $theme-reference: #3858e9; // Scales/Theme/theme (modern scheme) 71 $theme-darker-10-reference: #2145e6; // Scales/Theme/theme-darker-10 72 $theme-darker-20-reference: #183ad6; // Scales/Theme/theme-darker-20 73 $theme-alpha-04: rgba(56, 88, 233, 0.04); // Scales/Theme/theme-alpha-04 (4% opacity) 74 $theme-alpha-08: rgba(56, 88, 233, 0.08); // Scales/Theme/theme-alpha-08 (8% opacity) 75 76 $brand-9: #4465db; // Scales/brand-9 - Focus ring color (static, not theme-dependent) 77 78 /** 79 * Semantic Colors 80 * 81 * Use these for notices, alerts, and status indicators. 82 * These are intentionally NOT theme-dependent for consistency. 83 */ 84 85 $alert-yellow: #f0b849; // Scales/Yellow/alert-yellow - Warnings 86 $alert-green: #4ab866; // Scales/Green/alert-green - Success 87 $alert-red: #cc1818; // Scales/Red/alert-red - Errors 88 $alert-blue: #3858e9; // Info notices (matches modern theme) 89 90 // Background tints for notices 91 $alert-yellow-bg: #fef8ee; // Warning notice background 92 $alert-green-bg: #eff9f1; // Success notice background 93 $alert-red-bg: #fcf0f0; // Error notice background 94 95 $synced-color: #7a00df; // Scales/Purple/--wp-block-synced-color 96 97 /** 98 * Text Colors 99 */ 100 101 $text-primary: $gray-900; // Primary text color 102 $text-secondary: $gray-700; // Secondary text 103 $text-tertiary: #5d5d5d; // Alias/text/text-tertiary - Placeholder, hints 104 $text-disabled: $gray-600; // Disabled text 105 106 /** 107 * Component Tokens 108 */ 109 110 // Inputs 111 $input-bg: $white; // Alias/bg/bg-input 112 $input-border-color: $gray-600; // Default input border 113 $input-border-color-disabled: $gray-400; 114 $input-bg-disabled: $gray-100; 115 $input-border-width-default: 1px; // Input/Default 116 $input-border-width-focus: 1.5px; // Input/Focus 117 $field-spacing-horizontal: 8px; // Alias/field-spacing-horizontal 118 119 // Checkboxes and Radios 120 $checkbox-size: 16px; // Alias/checkbox 121 $radio-size: 16px; // Alias/radio 122 123 // Toggles 124 $toggle-width: 32px; // Alias/toggle-width 125 $toggle-height: 16px; // Alias/toggle-height 126 127 // Buttons 128 // Note: Gutenberg is transitioning to 40px as the default button size. 129 // The "compact" size (32px) is available for space-constrained contexts. 130 $button-height-default: 40px; // Default button height (next-default-40px) 131 $button-height-compact: 32px; // Compact button height 132 $button-height-small: 24px; // Small button height 133 134 // Cards and Surfaces 135 $card-bg: $white; 136 $card-border-color: rgba(0, 0, 0, 0.1); 137 $card-border-width: 1px; 138 $card-border-radius: $radius-l; // 8px for dashboard widgets 139 $card-border-radius-metabox: 0; // 0 for post editor metaboxes 140 $card-divider-color: rgba(0, 0, 0, 0.1); 141 142 // Card Padding Sizes 143 $card-padding-xs: $grid-unit-10; // 8px - xSmall cards 144 $card-padding-sm: $grid-unit-20; // 16px - Small cards (metaboxes, dashboard widgets) 145 $card-padding-md-h: $grid-unit-30; // 24px - Medium cards horizontal 146 $card-padding-md-v: $grid-unit-20; // 16px - Medium cards vertical 147 $card-padding-lg-h: $grid-unit-40; // 32px - Large cards horizontal 148 $card-padding-lg-v: $grid-unit-30; // 24px - Large cards vertical 149 150 // Page Layout 151 $page-padding-large: 48px; // Alias/page-large 152 $page-padding-small: 24px; // Alias/page-small 153 154 /** 155 * Typography Scale 156 */ 157 158 // Font Sizes 159 $font-size-xs: 11px; // xs - Small labels, button small 160 $font-size-s: 12px; // s - Body small 161 $font-size-m: 13px; // m - Base body text, buttons 162 $font-size-l: 15px; // l - Body large, heading large 163 $font-size-xl: 20px; // xl - Heading XL 164 165 /** 166 * Elevation (Box Shadows) 167 */ 168 169 $elevation-xs: 170 0 4px 4px rgba(0, 0, 0, 0.01), 171 0 3px 3px rgba(0, 0, 0, 0.02), 172 0 1px 2px rgba(0, 0, 0, 0.02), 173 0 1px 1px rgba(0, 0, 0, 0.03); 174 175 $elevation-s: 176 0 8px 8px rgba(0, 0, 0, 0.02), 177 0 1px 2px rgba(0, 0, 0, 0.05); 178 179 $elevation-m: 180 0 16px 16px rgba(0, 0, 0, 0.02), 181 0 4px 5px rgba(0, 0, 0, 0.03), 182 0 2px 3px rgba(0, 0, 0, 0.05); 183 184 $elevation-l: 185 0 50px 43px rgba(0, 0, 0, 0.02), 186 0 30px 36px rgba(0, 0, 0, 0.04), 187 0 15px 27px rgba(0, 0, 0, 0.07), 188 0 5px 15px rgba(0, 0, 0, 0.08); 189 190 /** 191 * Layout 192 */ 193 194 $modal-width-small: 384px; // Layout/Modal small 195 $modal-width-medium: 512px; // Layout/Modal medium 196 $modal-width-large: 840px; // Layout/Modal large
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Mon Sep 7 08:20:28 2026 | Cross-referenced by PHPXref |