| @@ -1,41 +1,75 @@ | ||
| 1 | -@use 'sass:color'; | |
| 1 | +:root { | |
| 2 | + --cs-color-accent: #2271b1; | |
| 3 | + --cs-color-accent-hover: #0a4b78; | |
| 4 | + --cs-color-accent-subtle: #c9e1f5; | |
| 5 | + --cs-color-primary: #03c7d2; | |
| 6 | + --cs-color-primary-hover: #0ca0a9; | |
| 7 | + --cs-color-secondary: #d46f4d; | |
| 8 | + --cs-color-text: #2c3337; | |
| 9 | + --cs-color-text-secondary: #50575e; | |
| 10 | + --cs-color-text-muted: #646970; | |
| 11 | + --cs-color-text-subtle: #787c82; | |
| 12 | + --cs-color-text-disabled: #a7aaad; | |
| 13 | + --cs-color-surface: #fff; | |
| 14 | + --cs-color-surface-subtle: #f6f7f7; | |
| 15 | + --cs-color-surface-muted: #f0f0f1; | |
| 16 | + --cs-color-surface-info: #f0f6fc; | |
| 17 | + --cs-color-border: #c3c4c7; | |
| 18 | + --cs-color-border-subtle: #dcdcde; | |
| 19 | + --cs-color-info: #72aee6; | |
| 20 | + --cs-color-success: #00a32a; | |
| 21 | + --cs-color-warning: #dba617; | |
| 22 | + --cs-color-error: #d63638; | |
| 23 | + --cs-cloud-status-public-color: #64baba; | |
| 24 | + --cs-cloud-status-private-color: #cc96fb; | |
| 25 | + --cs-cloud-status-unverified-color: #ea835e; | |
| 26 | + --cs-cloud-status-ai-verified-color: #1cabcf; | |
| 27 | + --cs-cloud-status-pro-verified-color: #41a269; | |
| 28 | + --cs-tooltip-background-color: rgb(19 18 18 / 90%); | |
| 29 | + --cs-toolbar-block-size: 136px; | |
| 30 | + --cs-wpcontent-inline-start-indent: 20px; | |
| 31 | + --cs-sidebar-width: 320px; | |
| 32 | + --cs-sidebar-gap: 30px; | |
| 33 | + --cs-card-radius: 8px; | |
| 34 | + --cs-control-height: 38px; | |
| 35 | + --cs-control-radius: 5px; | |
| 36 | + --cs-feedback-modal-inline-size: 460px; | |
| 37 | + --cs-preview-modal-inline-size: min(900px, 90vw); | |
| 38 | + --cs-preview-modal-inset: 40px; | |
| 39 | + --cs-font-size-body: 14px; | |
| 40 | + --cs-line-height-body: 1.5; | |
| 41 | + --cs-direction-multiplier: 1; // LTR = 1, RTL = -1 | |
| 42 | +} | |
| 2 | 43 | |
| 3 | -$accent: #2271b1; | |
| 4 | -$primary: #03c7d2; | |
| 5 | -$secondary: #d46f4d; | |
| 6 | -$outline: #9e9e9e; | |
| 7 | -$brand-discord: #5865f2; | |
| 8 | -$brand-facebook: #3b5998; | |
| 9 | -$cloud: #00bcd4; | |
| 10 | -$cloud-update: #ff9800; | |
| 44 | +html[dir="rtl"], | |
| 45 | +body.rtl { | |
| 46 | + --cs-direction-multiplier: -1; | |
| 47 | +} | |
| 11 | 48 | |
| 12 | -// WordPress classic admin control palette. WP 7.0's "modern" redesign restyles native form | |
| 13 | -// controls; these restore the classic metrics our admin UI is designed around (see | |
| 14 | -// common/_wp-admin.scss). | |
| 15 | -$accent-hover: #0a4b78; | |
| 16 | -$control-border: #8c8f94; | |
| 17 | -$control-text: #2c3338; | |
| 18 | -$control-height: 30px; | |
| 19 | - | |
| 20 | 49 | /* format: background-color [color] */ |
| 21 | 50 | $badges: ( |
| 22 | - php: #1d97c6, | |
| 23 | - html: #ef6a36, | |
| 51 | + // Badge text colours meet WCAG AA (>= 4.5:1) against their own background. | |
| 52 | + // php/html/cond darkened for WCAG AA — at least 4.5:1 against white 12px | |
| 53 | + // bold text; php reuses the accent token, html/cond keep hue at reduced lightness. | |
| 54 | + php: #2271b1, | |
| 55 | + html: #cd4510, | |
| 24 | 56 | css: #9b59b6, |
| 25 | - js: #ffeb3b #1c1f20, | |
| 26 | - cond: #2eae95, | |
| 27 | - core: #61c5cb, | |
| 57 | + js: #f7d67a #1c1f20, | |
| 58 | + cond: #22826f, | |
| 59 | + revisions: #50575e, | |
| 60 | + core: #4fa1a6, | |
| 28 | 61 | pro: #f7e8e3 #df9279, |
| 29 | - cloud: $cloud, | |
| 62 | + cloud: #009fb4, | |
| 30 | 63 | bundles: #50575e, |
| 31 | - cloud_search: #ff9800, | |
| 32 | - private: #f7e6be #ca961b, | |
| 33 | - public: #dbebf7 $accent, | |
| 34 | - success: #d3e8d1 #447340, | |
| 35 | - failure: #fad7c1 #a24b16, | |
| 36 | - info: #d2e6f4 #2b71a3, | |
| 37 | - neutral: #e2e5e5 #6c7e7e, | |
| 64 | + cloud_search: #d27c00, | |
| 65 | + private: #f7e6be #83610f, | |
| 66 | + public: #dbebf7 #206ba8, | |
| 67 | + success: #d3e8d1 #416e3d, | |
| 68 | + failure: #fad7c1 #9c4815, | |
| 69 | + info: #d2e6f4 #286896, | |
| 70 | + neutral: #f6f7f7 #646970, | |
| 71 | + neutralDark: #e2e5e5 #596767, | |
| 38 | 72 | special: #dfc5ef #6e249c |
| 39 | 73 | ); |
| 40 | 74 | $notices: ( |
| 41 | 75 | success: #d3e9d3 #377a37, |
| @@ -44,24 +78,4 @@ | ||
| 44 | 78 | info: #d2e6f4 #2b71a3, |
| 45 | 79 | neutral: #e2e5e5 #6c7e7e, |
| 46 | 80 | special: #dfc5ef #6e249c |
| 47 | 81 | ); |
| 48 | - | |
| 49 | -@function contrasting-text-color($bg-color) { | |
| 50 | - $sum: 0; | |
| 51 | - | |
| 52 | - @each $color, $multiplier in (red 0.299, green 0.587, blue 0.114) { | |
| 53 | - $sum: $sum + color.channel($bg-color, $color, $space: rgb) * $multiplier; | |
| 54 | - } | |
| 55 | - | |
| 56 | - @return if ($sum > 186, #1c1f20, #fff) | |
| 57 | -} | |
| 58 | - | |
| 59 | -@mixin link-colors($color, $lightness: 15%) { | |
| 60 | - a { | |
| 61 | - color: $color; | |
| 62 | - | |
| 63 | - &:hover, &:active, &:focus { | |
| 64 | - color: color.adjust($color, $lightness: $lightness); | |
| 65 | - } | |
| 66 | - } | |
| 67 | -} | |