Skip to content

Commit 083d759

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Update WebAuthn key value pairs
Before: https://i.imgur.com/qhjmKRj.png After: https://i.imgur.com/NGRWLzA.png Bug: 325443308 Change-Id: I34768f11b609f76009a0078db73b4f8ace52be1e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6373028 Commit-Queue: Kim-Anh Tran <[email protected]> Reviewed-by: Kateryna Prokopenko <[email protected]>
1 parent ce8feaf commit 083d759

File tree

2 files changed

+46
-23
lines changed

2 files changed

+46
-23
lines changed

front_end/panels/webauthn/WebauthnPane.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ export class WebauthnPaneImpl extends UI.Widget.VBox implements
745745
this.#model.addEventListener(
746746
SDK.WebAuthnModel.Events.CREDENTIAL_DELETED, this.#deleteCredential.bind(this, authenticatorId));
747747
}
748+
section.createChild('div', 'divider');
748749

749750
return section;
750751
}

front_end/panels/webauthn/webauthnPane.css

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,39 @@
2121
}
2222

2323
.authenticators-view {
24-
margin: 0 10px;
24+
padding: 0 var(--sys-size-9);
2525
min-height: auto;
2626
display: none;
2727
}
2828

2929
.webauthn-pane.enabled .authenticators-view {
3030
display: block;
3131
}
32+
3233
/* New Authenticator Section */
3334
.new-authenticator-title {
34-
line-height: 24px;
35-
font-weight: bold;
3635
display: block;
36+
padding: var(--sys-size-7) 0 var(--sys-size-5) 0;
37+
font: var(--sys-typescale-headline5);
38+
39+
&:has(devtools-button) {
40+
padding-top: var(--sys-size-4);
41+
}
3742
}
3843

3944
.new-authenticator-container {
4045
display: none;
41-
margin: 10px;
46+
padding-left: var(--sys-size-9);
47+
}
48+
49+
.authenticator-option {
50+
> select, > devtools-button {
51+
margin: 0 var(--sys-size-9) var(--sys-size-3) var(--sys-size-9);
52+
}
53+
54+
> dt-checkbox {
55+
margin: 0 var(--sys-size-9) 0 var(--sys-size-8);
56+
}
4257
}
4358

4459
.webauthn-pane.enabled .new-authenticator-container {
@@ -47,9 +62,9 @@
4762

4863
.new-authenticator-form {
4964
border: none;
50-
padding: 10px 0;
5165
flex: 0 0 auto;
5266
margin: 0;
67+
padding-bottom: var(--sys-size-5);
5368
}
5469

5570
.webauthn-pane select {
@@ -58,34 +73,37 @@
5873
/* Active Authenticator Section */
5974
.authenticator-section {
6075
display: block;
61-
padding: 16px 0;
62-
border-bottom: 1px solid var(--sys-color-divider);
76+
}
77+
78+
.divider {
79+
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
80+
margin: 10px calc(var(--sys-size-9) * -1) 0;
6381
}
6482

6583
.authenticator-fields {
6684
border: none;
67-
padding: 10px 0;
6885
flex: 0 0 auto;
69-
margin: 0;
86+
margin-bottom: 10px;
7087
}
7188

7289
.authenticator-section-header {
90+
margin: var(--sys-size-4) 0 var(--sys-size-5) calc(var(--sys-size-5) * -1);
7391
display: flex;
7492
justify-content: space-between;
7593
align-items: flex-end;
7694
}
7795

7896
.authenticator-section-title {
7997
line-height: 24px;
80-
display: inline-block;
98+
display: inline-flex;
8199
}
82100

83101
.authenticator-section-title .authenticator-name-field {
84102
display: inline-block;
85-
font-weight: bold;
86103
border: none;
87104
animation: save-flash 0.2s;
88105
text-overflow: ellipsis;
106+
font: var(--sys-typescale-headline5);
89107
}
90108

91109
.authenticator-section-title.editing-name .authenticator-name-field {
@@ -95,30 +113,32 @@
95113
}
96114

97115
.authenticator-field-value {
98-
font-family: monospace;
116+
font: var(--sys-typescale-monospace-regular);
117+
line-height: 18px;
99118
}
100119

101120
.authenticator-option-checkbox {
102121
position: relative;
103122
top: 2px;
104123
}
105124

125+
.authenticator-field {
126+
margin: var(--sys-size-3) 0;
127+
}
128+
106129
.authenticator-field,
107130
.authenticator-option {
108131
display: flex;
109-
padding-bottom: 10px;
110132
align-items: center;
111-
margin: auto;
112-
113-
&:has(dt-checkbox) {
114-
padding-bottom: 4px;
115-
}
116133
}
117134

118135
.authenticator-option-label {
119-
text-align: right;
120-
width: 200px;
121-
padding-right: 10px;
136+
color: var(--sys-color-on-surface-subtle);
137+
font: var(--sys-typescale-body5-regular);
138+
padding-right: var(--sys-size-6);
139+
text-align: left;
140+
min-width: 150px;
141+
line-height: 18px;
122142
}
123143

124144
td .text-button {
@@ -152,8 +172,10 @@ td .text-button {
152172

153173
.credentials-title {
154174
display: block;
155-
font-weight: bold;
156-
margin: 8px 0;
175+
font: var(--sys-typescale-headline5);
176+
padding: var(--sys-size-7) 0 var(--sys-size-5) 0;
177+
border-top: var(--sys-size-1) solid var(--sys-color-divider);
178+
margin-right: calc(var(--sys-size-9) * -1);
157179
}
158180

159181
.code {

0 commit comments

Comments
 (0)