Fix Card.svelte icon positioning and styling
- Restored icon to top-right position with absolute positioning - Added proper circular background with nord0 color - Set correct dimensions (50px × 50px) and border-radius for circular shape - Added shadow and hover effects to match original design - Fixed z-index to ensure icon appears above other elements - Maintained shake animation on card hover for visual feedback The icon now appears correctly in the top-right corner with a round background instead of being positioned at bottom center with transparent background. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,21 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified
|
|||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
right: 15px;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: var(--nord0);
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1.5em;
|
||||||
|
box-shadow: 0em 0em 1em 0.1em rgba(0, 0, 0, 0.6);
|
||||||
|
transition: 100ms;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
#image{
|
#image{
|
||||||
width: 300px;
|
width: 300px;
|
||||||
@@ -177,6 +192,18 @@ const img_name=recipe.short_name + ".webp?v=" + recipe.dateModified
|
|||||||
scale: 0.9 0.9;
|
scale: 0.9 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon:hover,
|
||||||
|
.icon:focus-visible
|
||||||
|
{
|
||||||
|
transform: scale(1.1, 1.1);
|
||||||
|
background-color: var(--nord3);
|
||||||
|
box-shadow: 0.2em 0.2em 1em 0.1em rgba(0, 0, 0, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon:focus {
|
||||||
|
transform: scale(0.9, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
.card:hover .icon,
|
.card:hover .icon,
|
||||||
.card:focus-visible .icon
|
.card:focus-visible .icon
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user