Skip to content

Commit adac104

Browse files
Kateryna ProkopenkoDevtools-frontend LUCI CQ
authored andcommitted
Update icon guidelines
Bypass-Check-License: Only updating files, no new files are added. Bug: 414330824 Change-Id: Id4a26bff8390ef0505294aae5861fdcefa42bdd1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6874551 Reviewed-by: Ergün Erdoğmuş <[email protected]> Auto-Submit: Kateryna Prokopenko <[email protected]> Commit-Queue: Kateryna Prokopenko <[email protected]> Commit-Queue: Ergün Erdoğmuş <[email protected]>
1 parent b35244d commit adac104

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

docs/styleguide/ux/components.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,14 @@ Find an exhaustive collection of icons currently used in DevTools [here](https:/
274274

275275
#### Developer guidelines
276276

277+
For some frequently used icons e.g. cross-circle, warning-filled etc. colors are auto-set in the component. See full list [here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/ui/components/icon_button/icon.css;l=47)
278+
277279
##### Dos and Don'ts
278280

279281
###### Do
280282

281-
* Set class and change color and / or size in .css files
283+
* Set class and change color in .css files
284+
* Set one of the predefined classes to change icon size e.g. extra-small for 12px
282285

283286
###### Don't
284287

front_end/ui/components/docs/icon_component/basic.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
height: 50px;
2222
}
2323

24-
.custom-size-and-color {
24+
.custom-color {
2525
color: blue;
26-
width: 14px;
27-
height: 14px;
2826
}
2927
</style>
3028
</head>

front_end/ui/components/docs/icon_component/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ row4.appendChild(iconDescription4);
6060
const icon4 = document.createElement('td');
6161
Lit.render(
6262
html`
63-
<devtools-icon name="select-element" class="custom-size-and-color"></devtools-icon>
63+
<devtools-icon name="select-element" class="custom-color small"></devtools-icon>
6464
`,
6565
icon4);
6666
row4.appendChild(icon4);

0 commit comments

Comments
 (0)