Skip to content

Commit 2436747

Browse files
masnobleDevtools-frontend LUCI CQ
authored andcommitted
Fix Security Sidebar style behavior
A few fixes: 1. Background highlighting would get clipped before when sidebar was small or there was a long url to be shown. Fixed to scale down with sidebar width 2. Scheme color would change when element was highlighted. Fixed to remain same color when selected 3. Overflow acts weird with fix #1. Fixed to show ellipsis instead side by side changes: https://screenshot.googleplex.com/7e6BWrUQM3razDk.png Bug: 365737493 Change-Id: I073f19b427821584b9882d38cc2d88b8bd6a36de Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5931804 Reviewed-by: Kim-Anh Tran <[email protected]> Reviewed-by: Shuran Huang <[email protected]> Commit-Queue: Joshua Thomas <[email protected]>
1 parent 1c14f72 commit 2436747

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

front_end/panels/security/sidebar.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
* found in the LICENSE file.
55
*/
66

7+
.tree-outline-disclosure {
8+
width: 100%;
9+
}
10+
711
.tree-outline li.security-group-list-item {
812
& + ol {
913
padding-left: 0;
@@ -18,10 +22,37 @@
1822
color: var(--sys-color-token-subtle);
1923
}
2024

25+
.tree-outline li.security-sidebar-origins + .children > li {
26+
&.selected {
27+
.url-scheme-secure {
28+
color: var(--sys-color-green);
29+
}
30+
31+
.url-scheme-neutral,
32+
.url-scheme-insecure,
33+
.url-scheme-insecure-broken {
34+
color: var(--sys-color-error);
35+
}
36+
}
37+
}
38+
2139
.security-main-view-reload-message,
2240
.tree-outline li.security-sidebar-origins,
2341
.tree-outline li.security-group-list-item {
2442
&:hover:not(:has(span[is="dt-checkbox"])) .selection {
2543
background: transparent;
2644
}
2745
}
46+
47+
.tree-outline li {
48+
& .leading-icons {
49+
flex: none;
50+
}
51+
52+
& .tree-element-title,
53+
.highlighted-url,
54+
.title {
55+
overflow: hidden;
56+
text-overflow: ellipsis;
57+
}
58+
}

0 commit comments

Comments
 (0)