Skip to content

Instantly share code, notes, and snippets.

@starthecode
Created October 25, 2024 03:19
Show Gist options
  • Select an option

  • Save starthecode/5ba5d6cb7f6ea864f9bdd4eea9e22239 to your computer and use it in GitHub Desktop.

Select an option

Save starthecode/5ba5d6cb7f6ea864f9bdd4eea9e22239 to your computer and use it in GitHub Desktop.
Stylesheet file
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.btn-secondary {
@apply bg-white border border-slate-300 text-sm px-2 py-1 rounded-md;
}
}
body {
@apply leading-[normal] m-0;
}
*,
::before,
::after {
border-width: 0;
}
input {
outline: none;
border: none;
}
button:disabled,
button[disabled] {
@apply border-slate-200 text-slate-200;
}
.svg_css svg {
@apply w-5 h-5;
}
.loader_css svg {
@apply w-8 h-8;
}
/* profile menu */
.profile {
position: relative;
display: flex;
justify-content: flex-end;
align-items: center;
gap: 12px;
cursor: pointer;
text-align: end;
}
.profile h3 {
text-align: end;
font-weight: 600;
}
.profile p {
line-height: 1;
font-size: 14px;
opacity: 0.6;
}
.profile .img-box {
position: relative;
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
}
.profile .img-box img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
/* menu (the right one) */
.menu {
position: absolute;
z-index: 1;
top: calc(100% + 10px);
right: 16px;
width: 200px;
min-height: 100px;
background: #fff;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
opacity: 1;
visibility: visible;
transition: 300ms;
}
.menu::before {
content: '';
position: absolute;
top: -10px;
right: 14px;
width: 20px;
height: 20px;
background: #fff;
transform: rotate(45deg);
z-index: -1;
}
/* menu links */
.menu ul {
position: relative;
display: flex;
flex-direction: column;
z-index: 10;
background: #fff;
border-bottom: 1px solid rgb(217, 217, 217);
}
.menu ul li {
list-style: none;
}
.menu ul li:hover {
background: #eee;
}
.menu ul li a {
text-decoration: none;
color: #000;
display: flex;
align-items: center;
padding: 10px;
}
.menu button {
display: flex;
align-items: center;
padding: 10px;
}
.menu ul li a i {
font-size: 1.2em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment