mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 08:26:12 +03:00
fix(ui): remove the fringe on project icon corners (#64582)
This commit is contained in:
committed by
GitHub
Unverified
parent
aab2f85c86
commit
a5533f7bdf
@@ -112,16 +112,49 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
* The backing, the ring and the image composite as one group, and the surface's rounded clip cuts that group once.
|
||||
* Clipped one by one, each gets its own antialiased corner and the backing shows through the image's corner pixels
|
||||
* as a lighter fringe. The opaque mask is what makes the media a group.
|
||||
*/
|
||||
[data-slot="project-avatar-surface"][data-has-image] {
|
||||
background: var(--project-avatar-bg);
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-image"] {
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-media"] {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
-webkit-mask-image: linear-gradient(#000, #000);
|
||||
mask-image: linear-gradient(#000, #000);
|
||||
}
|
||||
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-media"]::before,
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-media"]::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
/* Square: the group clip is the only rounded edge the backing gets. */
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-media"]::before {
|
||||
background: var(--project-avatar-bg);
|
||||
}
|
||||
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-media"]::after {
|
||||
border-radius: inherit;
|
||||
box-shadow: inset 0 0 0 0.5px var(--project-avatar-border);
|
||||
}
|
||||
|
||||
[data-slot="project-avatar-surface"] [data-slot="project-avatar-image"] {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
@@ -195,7 +195,11 @@ export function ProjectAvatar(props: ProjectAvatarProps) {
|
||||
</Show>
|
||||
}
|
||||
>
|
||||
{(value) => <img src={value()} draggable={false} data-slot="project-avatar-image" />}
|
||||
{(value) => (
|
||||
<span data-slot="project-avatar-media">
|
||||
<img src={value()} draggable={false} data-slot="project-avatar-image" />
|
||||
</span>
|
||||
)}
|
||||
</Show>
|
||||
<Show when={split.label}>
|
||||
{(label) => (
|
||||
|
||||
Reference in New Issue
Block a user