Changeset 265120 in webkit
- Timestamp:
- Jul 30, 2020 5:12:06 PM (4 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r265118 r265120 1 2020-07-30 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: on Big Sur, match OS background, text, and border colors 4 https://bugs.webkit.org/show_bug.cgi?id=214366 5 <rdar://problem/65617290> 6 7 Reviewed by Devin Rousso. 8 9 Refactoring: 10 - Remove --background-color-code because it was always the same value as --background-color-content. 11 - Replace commonly hardcoded `hsl(0, 0%, 97%)` background with --background-color-intermediate. 12 13 * UserInterface/Views/AnimationDetailsSidebarPanel.css: 14 (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section): 15 (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles .CodeMirror): 16 * UserInterface/Views/BoxShadowEditor.css: 17 (.box-shadow-editor > table > tr > td > input[type="text"]): 18 * UserInterface/Views/BreakpointActionView.css: 19 (@media (prefers-color-scheme: dark) .breakpoint-action-eval-editor): 20 * UserInterface/Views/BreakpointPopoverController.css: 21 (.edit-breakpoint-popover-condition): 22 * UserInterface/Views/ChangesDetailsSidebarPanel.css: 23 (.sidebar > .panel.changes-panel .css-rule): 24 * UserInterface/Views/ComputedStyleSection.css: 25 (.computed-style-section .computed-property-item.expanded): 26 (.computed-style-properties.details-section > .content,): 27 * UserInterface/Views/ConsolePrompt.css: 28 (.console-prompt): 29 (.console-prompt > .CodeMirror-scroll): 30 * UserInterface/Views/CookiePopover.css: 31 (.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"])): 32 33 * UserInterface/Views/DetailsSection.css: 34 (.details-section .details-section): 35 (.details-section .details-section > .header): 36 Refactor. --background-color-content is the same color value. 37 38 (.details-section .details-section:not(.collapsed) > .header): 39 Refactor. --border-color-secondary is the same color value. 40 41 (.details-section > .content > .group:nth-child(even)): 42 (.details-section > .content > .group > .row:matches(.empty, .text)): 43 (@media (prefers-color-scheme: dark) .details-section > .header > label,): 44 45 * UserInterface/Views/DividerNavigationItem.css: 46 (.navigation-bar .item.divider): 47 Don't use hairline dividers. MacOS Catalina and Big Sur don't use hairline borders. 48 49 * UserInterface/Views/GraphicsOverviewContentView.css: 50 (.content-view.graphics-overview > section > .header): 51 (@media (prefers-color-scheme: dark) .content-view.graphics-overview): 52 * UserInterface/Views/LocalResourceOverridePopover.css: 53 (.popover .local-resource-override-popover-content .editor): 54 * UserInterface/Views/LogContentView.css: 55 (@media (prefers-color-scheme: dark) .console-messages): 56 * UserInterface/Views/QuickConsole.css: 57 (.quick-console): 58 * UserInterface/Views/ScopeChainDetailsSidebarPanel.css: 59 (@media (prefers-color-scheme: dark) .watch-expression-editor): 60 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: 61 (.spreadsheet-css-declaration): 62 (.spreadsheet-css-declaration.locked): 63 * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: 64 (@media (prefers-color-scheme: dark) .cm-s-default,): 65 * UserInterface/Views/TabBar.css: 66 (body.big-sur.docked .tab-bar > .border.bottom): 67 * UserInterface/Views/URLBreakpointPopover.css: 68 (.popover .url-breakpoint-content > .editor-wrapper > .editor): 69 70 * UserInterface/Views/Variables.css: 71 (:root): 72 Add --separator-color, which has the same semantics as `separator` color from Apple HIG 73 (https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/#dynamic-system-colors). 74 --border-color-secondary was only defined in the dark mode. Define it in the light mode, too. 75 76 (body.window-inactive): 77 Remove unused variable. 78 79 (body.big-sur): 80 (@media (prefers-color-scheme: dark) :root): 81 (@media (prefers-color-scheme: dark) body.big-sur): 82 (@media (prefers-color-scheme: dark) body.window-inactive): 83 (body.window-inactive *): Remove unnecessarily greedy selector. 84 1 85 2020-07-30 Devin Rousso <drousso@apple.com> 2 86 -
trunk/Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.css
r255396 r265120 29 29 30 30 .sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section { 31 background-color: hsl(0, 0%, 97%);31 background-color: var(--background-color-intermediate); 32 32 } 33 33 … … 41 41 background-color: transparent; 42 42 } 43 44 @media (prefers-color-scheme: dark) {45 .sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section {46 background-color: hsl(0, 0%, 18%);47 }48 } -
trunk/Source/WebInspectorUI/UserInterface/Views/BoxShadowEditor.css
r259170 r265120 52 52 font-family: Menlo, monospace; 53 53 text-align: end; 54 background-color: var(--background-color-co de);54 background-color: var(--background-color-content); 55 55 border: 1px solid var(--text-color-quaternary); 56 56 -webkit-appearance: none; -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.css
r242768 r265120 112 112 113 113 .breakpoint-action-eval-editor { 114 background: var(--background-color-co de);114 background: var(--background-color-content); 115 115 } 116 116 } -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css
r254730 r265120 85 85 -webkit-appearance: textfield; 86 86 border: 1px solid hsl(0, 0%, 78%); 87 background: var(--background-color-co de);87 background: var(--background-color-content); 88 88 } 89 89 -
trunk/Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.css
r244951 r265120 33 33 font: 11px Menlo, monospace; 34 34 color: var(--text-color-secondary); 35 background-color: var(--background-color-co de);35 background-color: var(--background-color-content); 36 36 -webkit-user-select: text; 37 37 } -
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.css
r260978 r265120 42 42 .computed-style-section .computed-property-item.expanded { 43 43 padding-bottom: 2px; 44 background-color: hsl(0, 0%, 97%);44 background-color: var(--background-color-intermediate); 45 45 border-top: 0.5px solid var(--text-color-quaternary); 46 46 border-bottom: 0.5px solid var(--text-color-quaternary); … … 159 159 display: block; 160 160 } 161 162 @media (prefers-color-scheme: dark) {163 .computed-style-section .computed-property-item.expanded {164 background-color: var(--background-color-code);165 }166 } -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.css
r239760 r265120 25 25 26 26 .console-prompt { 27 background-color: white;27 background-color: var(--background-color-content); 28 28 } 29 29 … … 36 36 overflow: hidden; 37 37 } 38 39 @media (prefers-color-scheme: dark) {40 .console-prompt {41 background-color: var(--background-color-code);42 }43 } -
trunk/Source/WebInspectorUI/UserInterface/Views/CookiePopover.css
r259842 r265120 52 52 padding: 3px 4px 2px; 53 53 font-family: Menlo, monospace; 54 background-color: var(--background-color-co de);54 background-color: var(--background-color-content); 55 55 border: 1px solid var(--text-color-quaternary); 56 56 -webkit-appearance: none; -
trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css
r258058 r265120 34 34 35 35 .details-section .details-section { 36 background-color: hsl(0, 0%, 100%);36 background-color: var(--background-color-content); 37 37 border-color: var(--text-color-quaternary); 38 38 } … … 90 90 .details-section .details-section > .header { 91 91 top: 21px; 92 background-color: hsl(0, 0%, 100%);92 background-color: var(--background-color-content); 93 93 font-weight: 500; 94 94 … … 98 98 99 99 .details-section .details-section:not(.collapsed) > .header { 100 border-bottom: 1px solid hsl(0, 0%, 87%);100 border-bottom: 1px solid var(--border-color-secondary); 101 101 } 102 102 … … 183 183 184 184 .details-section > .content > .group:nth-child(even) { 185 background-color: hsl(0, 0%, 97%);185 background-color: var(--background-color-intermediate); 186 186 } 187 187 … … 257 257 padding: 0 6px 7px 6px; 258 258 text-align: center; 259 color: gray;259 color: var(--text-color-secondary); 260 260 } 261 261 … … 304 304 } 305 305 306 .details-section > .header > label { 307 color: var(--text-color-secondary); 308 } 309 310 .details-section .details-section, 311 .details-section .details-section > .header { 312 background-color: var(--background-color-content); 313 } 314 315 .details-section .details-section:not(.collapsed) > .header { 316 border-bottom-color: var(--border-color-secondary); 317 } 318 306 .details-section > .header > label, 319 307 .details-section > .content > .group > .row.simple > .label { 320 308 color: var(--text-color-secondary); 321 309 } 322 323 .details-section > .content > .group:nth-child(even) { 324 background-color: unset; 325 } 326 327 .details-section > .content > .group > .row:matches(.empty, .text) { 328 color: var(--text-color-secondary); 329 } 330 } 310 } -
trunk/Source/WebInspectorUI/UserInterface/Views/DividerNavigationItem.css
r257759 r265120 27 27 width: 1px; 28 28 height: 16px; 29 background-color: hsl(0, 0%, 74%);29 background-color: var(--separator-color); 30 30 } 31 32 @media (-webkit-min-device-pixel-ratio: 2) {33 .navigation-bar .item.divider {34 width: 0.5px;35 }36 }37 38 @media (prefers-color-scheme: dark) {39 .navigation-bar .item.divider {40 background-color: hsl(0, 0%, 40%);41 }42 } -
trunk/Source/WebInspectorUI/UserInterface/Views/GraphicsOverviewContentView.css
r265118 r265120 49 49 margin-top: -1px; 50 50 -webkit-padding-start: 8px; 51 background-color: hsl(0, 0%, 97%);51 background-color: var(--background-color-intermediate); 52 52 border-top: 1px solid var(--border-color); 53 53 border-bottom: 1px solid var(--border-color); … … 76 76 background-color: hsl(0, 0%, 14%); 77 77 } 78 79 .content-view.graphics-overview > section > .header {80 background-color: hsl(0, 0%, 21%);81 }82 78 } 83 79 -
trunk/Source/WebInspectorUI/UserInterface/Views/LocalResourceOverridePopover.css
r254730 r265120 58 58 -webkit-appearance: unset; 59 59 border: 1px solid hsl(0, 0%, 78%); 60 background: var(--background-color-co de);60 background: var(--background-color-content); 61 61 border-color: var(--text-color-quaternary); 62 62 } -
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css
r253404 r265120 243 243 @media (prefers-color-scheme: dark) { 244 244 .console-messages { 245 background-color: var(--background-color-co de);245 background-color: var(--background-color-content); 246 246 } 247 247 -
trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.css
r255191 r265120 32 32 33 33 color: var(--text-color); 34 background-color: var(--background-color-co de);34 background-color: var(--background-color-content); 35 35 border-top: 1px solid var(--border-color); 36 36 padding: 3px 0 4px; -
trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.css
r249504 r265120 67 67 @media (prefers-color-scheme: dark) { 68 68 .watch-expression-editor { 69 background-color: var(--background-color-co de);69 background-color: var(--background-color-content); 70 70 } 71 71 } -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css
r248602 r265120 30 30 font-size: 11px; 31 31 color: var(--text-color-tertiary); 32 background: var(--background-color-co de);32 background: var(--background-color-content); 33 33 border-bottom: 0.5px solid var(--text-color-quaternary); 34 34 -webkit-user-select: text; … … 133 133 134 134 .spreadsheet-css-declaration.locked { 135 background-color: hsl(0, 0%, 97%)135 background-color: var(--background-color-intermediate); 136 136 } 137 137 … … 158 158 159 159 @media (prefers-color-scheme: dark) { 160 .spreadsheet-css-declaration.locked {161 background: var(--background-color);162 }163 164 160 .spreadsheet-css-declaration .selector.style-attribute { 165 161 color: var(--text-color-secondary); -
trunk/Source/WebInspectorUI/UserInterface/Views/SyntaxHighlightingDefaultTheme.css
r248898 r265120 140 140 .cm-s-default, 141 141 .CodeMirror { 142 background-color: var(--background-color-co de);142 background-color: var(--background-color-content); 143 143 } 144 144 -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css
r264410 r265120 92 92 } 93 93 94 body.big-sur.docked .tab-bar > .border.bottom { 95 background-color: var(--border-color); 96 } 97 94 98 body.window-inactive .tab-bar > .border { 95 99 background-color: var(--tab-item-light-border-color); -
trunk/Source/WebInspectorUI/UserInterface/Views/URLBreakpointPopover.css
r254730 r265120 41 41 -webkit-appearance: textfield; 42 42 border: 1px solid hsl(0, 0%, 78%); 43 background: var(--background-color-co de);43 background: var(--background-color-content); 44 44 } 45 45 -
trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css
r263402 r265120 46 46 --text-color-quaternary: hsl(0, 0%, 85%); 47 47 48 --separator-color: hsla(0, 0%, var(--foreground-lightness), 0.15); 49 48 50 --background-color: white; 49 51 50 52 --background-color-content: white; 51 --background-color- code: white;53 --background-color-intermediate: hsl(0, 0%, 97%); 52 54 53 55 --background-color-unfocused: hsla(0, 0%, calc(100% - var(--foreground-lightness)), 0.8); … … 81 83 82 84 --border-color: hsl(0, 0%, 70%); 83 --border-color- dark: hsl(0, 0%, 57%);85 --border-color-secondary: hsl(0, 0%, 87%); 84 86 85 87 --button-background-color: white; … … 202 204 203 205 --color-picker-width: 256px; 206 207 --sorted-header-font-weight: 500; 204 208 } 205 209 … … 211 215 --glyph-color-disabled: hsla(0, 0%, 30%, 0.35); 212 216 --glyph-opacity: 0.6; 213 } 214 215 body.window-inactive * { 217 216 218 --border-color: hsl(0, 0%, 85%); 217 --border-color-dark: hsl(0, 0%, 72%); 219 } 220 221 body.big-sur { 222 --text-color: hsl(0, 0%, 15%); 223 224 --background-color-intermediate: hsl(0, 0%, 98.5%); 225 226 --panel-background-color: hsl(0, 0%, 96%); 227 --panel-background-color-light: hsl(0, 0%, 98%); 228 229 --separator-color: hsla(0, 0%, var(--foreground-lightness), 0.1); 230 231 --border-color: hsl(0, 0%, 87%); 232 --border-color-secondary: hsl(0, 0%, 91%); 233 234 --sorted-header-font-weight: 700; 218 235 } 219 236 … … 251 268 252 269 --background-color-content: hsl(0, 0%, 21%); 253 --background-color- code: hsl(0, 0%, 21%);270 --background-color-intermediate: hsl(0, 0%, 23%); 254 271 255 272 --gray-background-color: hsl(0, 0%, 50%); … … 359 376 } 360 377 378 body.big-sur { 379 --glyph-color: hsl(0, 0%, 69%); 380 --glyph-color-pressed: hsl(0, 0%, 100%); 381 } 382 361 383 body.window-inactive { 384 --border-color: hsl(0, 0%, 33%); 385 362 386 --selected-background-color: hsla(212, 92%, 64%, 0.5); 363 387 … … 366 390 } 367 391 368 body.window-inactive * { 369 /* These properties are duplicated so that they have higher specificity than WebKit's stylesheet. 370 Otherwise, the variable definition inside 'body.window-inactive *' in OpenSource overrides with a lighter color. 371 When merging to open source, we should guard the existing .window-inactive style with 372 '@media not all' to avoid applying the definition too broadly. */ 373 --border-color: hsl(0, 0%, 33%); 374 --border-color-dark: hsl(0, 0%, 37%); /* non-semantic variable names */ 392 body.big-sur { 393 --text-color: hsl(0, 0%, 85%); 394 395 --background-color: hsl(0, 0%, 20%); 396 --background-color-secondary: hsl(0, 0%, 23%); 397 --background-color-tertiary: hsl(0, 0%, 27%); 398 399 --background-color-content: hsl(0, 0%, 17%); 400 --background-color-intermediate: hsl(0, 0%, 19%); 401 402 --panel-background-color: hsl(0, 0%, 20%); 403 --panel-background-color-light: hsl(0, 0%, 25%); 404 405 --border-color: hsl(0, 0%, 30%); 406 --border-color-secondary: hsl(0, 0%, 24%); 375 407 } 376 408 }
Note: See TracChangeset
for help on using the changeset viewer.