Skip to content

Commit

Permalink
Refactor cursor styles for improved visibility and transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
amit712singhal committed Oct 31, 2024
1 parent 565f5cb commit cdbcc61
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions public/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ body {
cursor: none;
}

/* Base cursor styles */
.cursor-dot {
width: 5px;
height: 5px;
Expand All @@ -152,14 +153,27 @@ body {
border: 2px solid hsla(0, 0%, 100%, 0.5);
}

.cursor-dot, .cursor-outline {
.cursor-dot,
.cursor-outline {
position: fixed;
top: 0;
left: 0;
transform: translate(-50%, -50%);
border-radius: 50%;
pointer-events: none;
z-index: 1000;
opacity: 0;
/* Hide by default */
transition: opacity 0.3s ease;
/* Smooth transition for hiding/showing */
}

@media (hover: none) and (pointer: coarse) {

.cursor-dot,
.cursor-outline {
display: none !important;
}
}

:focus-visible {
Expand Down Expand Up @@ -872,10 +886,6 @@ article.container::before {
clip-path: circle(3% at calc(100%-273px) 6%);
}

.cursor-dot, .cursor-outline {
visibility: hidden;
}

/*------------------ Main -------------------*/
main {
height: calc(100vh - 96px);
Expand Down

0 comments on commit cdbcc61

Please sign in to comment.