Replace icon border with a soft bevel edge

This commit is contained in:
raucao committed 2026-10-04 19:47:10 +02:00
1 parent e0ddce8ed3
commit 49e1fc3e12
3 files changed
+33 -9

No files matched your search

@@ -27,7 +27,7 @@ export default class SettingsIntegrationsAvatar extends Component {
<template>
{{#if this.siteIcon}}
<span
class="flex size-10 flex-none items-center justify-center overflow-hidden rounded-lg bg-gray-100 ring-1 ring-gray-200"
class="icon-edge flex size-10 flex-none items-center justify-center overflow-hidden rounded-lg bg-gray-100"
{{setStyle "background-color" this.themeColor}}
>
<img
@@ -38,15 +38,19 @@ export default class SettingsIntegrationsAvatar extends Component {
/>
</span>
{{else if @integration.iconUrl}}
<img
src={{@integration.iconUrl}}
alt=""
aria-hidden="true"
class="size-10 flex-none rounded-lg object-cover ring-1 ring-gray-200"
/>
<span
class="icon-edge flex size-10 flex-none items-center justify-center overflow-hidden rounded-lg"
>
<img
src={{@integration.iconUrl}}
alt=""
aria-hidden="true"
class="size-full object-cover"
/>
</span>
{{else}}
<span
class="flex size-10 flex-none items-center justify-center rounded-lg
class="icon-edge flex size-10 flex-none items-center justify-center rounded-lg
{{@integration.colorClass}}"
>
<svg
+1 -1
View File
@@ -64,7 +64,7 @@ export default class SiteLinksItemComponent extends Component {
>
<span
data-test-site-links-tile
class="flex size-full items-center justify-center overflow-hidden rounded-xl border border-white/40 bg-gray-950/40 backdrop-blur transition-colors hover:border-white/60
class="icon-edge flex size-full items-center justify-center overflow-hidden rounded-xl bg-gray-950/40 backdrop-blur
{{if this.isError 'ring-2 ring-red-400/70'}}"
{{setStyle "background-color" this.tileColor}}
>
+20
View File
@@ -3,3 +3,23 @@
/* @theme { */
/* --font-sans: Helvetica, "Liberation Sans", "Nimbus Sans", sans-serif; */
/* } */
/* Soft edge instead of a solid border: a light highlight along the top, a
shade along the bottom, and a hairline all around. Painted as an overlay so
it sits on top of full-bleed (maskable) icons, and semi-transparent so it
reads regardless of the icon's colors. */
.icon-edge {
position: relative;
}
.icon-edge::after {
position: absolute;
inset: 0;
border-radius: inherit;
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 40%),
inset 0 -1px 0 rgb(0 0 0 / 30%),
inset 0 0 0 1px rgb(255 255 255 / 10%);
content: '';
pointer-events: none;
}