Changeset 273992 in webkit
- Timestamp:
- Mar 5, 2021 11:54:19 AM (17 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/DOMTreeElement.css (modified) (2 diffs)
-
UserInterface/Views/DOMTreeElement.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r273912 r273992 1 2021-03-05 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: border color of "grid" badge should match color of corresponding outline 4 https://bugs.webkit.org/show_bug.cgi?id=222747 5 <rdar://problem/75042342> 6 7 Reviewed by BJ Burg. 8 9 * UserInterface/Views/DOMTreeElement.css: 10 (.tree-outline.dom .badge-css-grid): 11 Drive-by: decrease the font size and align the badge in the middle of the selected tree element (i.e. keep 1px space 12 above and below the badge). 13 14 (body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid): 15 (@media (prefers-color-scheme: dark) .tree-outline.dom .badge-css-grid): 16 * UserInterface/Views/DOMTreeElement.js: 17 (WI.DOMTreeElement.prototype._updateGridBadgeStatus): 18 For text and background color, only use the hue of the selected color to keep "grid" text always readable. 19 1 20 2021-03-04 Razvan Caliman <rcaliman@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.css
r273097 r273992 28 28 area. Use the same monospace font as the rest of the DOM tree outline. */ 29 29 30 font-size: 10px;31 line-height: 10px;30 font-size: 8px; 31 vertical-align: 1px; 32 32 color: var(--text-color); 33 background: hsla(0, 0%, 0%, 0.05);33 background: hsla(0, 0%, 95%, 0.8); 34 34 border: 1px solid hsla(0, 0%, var(--foreground-lightness), 0.1); 35 35 border-radius: 3px; 36 36 margin-left: 3px; 37 37 padding: 0 2px; 38 box-shadow: 0 0 1px hsla(0, 0%, 0%, 0.5); 38 39 } 39 40 … … 43 44 } 44 45 45 .tree-outline.domli.selected .badge-css-grid {46 color: hsla(0, 0%, var(--foreground-lightness), 0.5);47 background-color: transparent;46 body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid { 47 /* Override `li.selected * {color: inherited}` from DOMTreeOutline.css */ 48 color: var(--text-color); 48 49 } 49 50 50 .tree-outline.dom li.selected .badge-css-grid.activated {51 background: var(--glyph-color-disabled);52 color: white;53 }54 55 body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid {56 border-color: hsla(0, 0%, 100%, 0.2);57 }58 59 body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid.activated {60 background: hsla(0, 0%, 100%, 0.3);61 }62 51 63 52 @media (prefers-color-scheme: dark) { 64 53 .tree-outline.dom .badge-css-grid { 65 background: hsla(0, 0%, 100%, 0.05);54 background: hsla(0, 0%, 30%, 0.8); 66 55 border-color: hsla(0, 0%, 100%, 0.1); 67 56 } -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
r273097 r273992 2058 2058 return; 2059 2059 2060 this._gridBadgeElement.classList.toggle("activated", WI.overlayManager.isGridOverlayVisible(this.representedObject)); 2060 let isGridVisible = WI.overlayManager.isGridOverlayVisible(this.representedObject); 2061 this._gridBadgeElement.classList.toggle("activated", isGridVisible); 2062 2063 if (isGridVisible) { 2064 let color = WI.overlayManager.getGridColorForNode(this.representedObject); 2065 let hue = color.hsl[0]; 2066 this._gridBadgeElement.style.borderColor = color.toString(); 2067 this._gridBadgeElement.style.backgroundColor = `hsl(${hue}, 90%, 95%)`; 2068 this._gridBadgeElement.style.setProperty("color", `hsl(${hue}, 55%, 40%)`); 2069 } else 2070 this._gridBadgeElement.removeAttribute("style"); 2061 2071 } 2062 2072
Note: See TracChangeset
for help on using the changeset viewer.