Skip to content

Instantly share code, notes, and snippets.

@tuliopc23
Created July 8, 2025 20:59
Show Gist options
  • Select an option

  • Save tuliopc23/339dea75c85aacafbcbe4a030962d762 to your computer and use it in GitHub Desktop.

Select an option

Save tuliopc23/339dea75c85aacafbcbe4a030962d762 to your computer and use it in GitHub Desktop.
Liquid Glass Notifications
<div class="bg-orbs">
<div class="orb"></div>
<div class="orb"></div>
<div class="orb"></div>
</div>
<div class="container">
<div class="header">
<h1>Liquid Glass</h1>
</div>
<div class="notifications-stack">
<div class="notification-card new">
<div class="app-icon">💬</div>
<div class="notification-body">
<div class="notification-content">
<div class="content-header">
<h3>New message from Sarah</h3>
<span class="timestamp">2 min ago</span>
</div>
<p>Hey! Are we still meeting for coffee tomorrow at 3 PM? Let me know!</p>
</div>
</div>
</div>
<div class="notification-card urgent">
<div class="app-icon">🔔</div>
<div class="notification-body">
<div class="notification-content">
<div class="content-header">
<h3>Meeting starting soon</h3>
<span class="timestamp">15 min ago</span>
</div>
<p>Team standup meeting begins in 15 minutes. Join the video call when ready.</p>
</div>
</div>
</div>
<div class="notification-card success">
<div class="app-icon">✅</div>
<div class="notification-body">
<div class="notification-content">
<div class="content-header">
<h3>Backup completed</h3>
<span class="timestamp">1 hour ago</span>
</div>
<p>Your daily backup has been completed. All files are safely stored in the cloud.</p>
</div>
</div>
</div>
<div class="notification-card">
<div class="app-icon">🎵</div>
<div class="notification-body">
<div class="notification-content">
<div class="content-header">
<h3>Weekly Discovery Mix</h3>
<span class="timestamp">2 hours ago</span>
</div>
<p>Your personalized playlist is ready with 30 new songs based on your listening history.</p>
</div>
</div>
</div>
<div class="notification-card">
<div class="app-icon">📧</div>
<div class="notification-body">
<div class="notification-content">
<div class="content-header">
<h3>Project update from Alex</h3>
<span class="timestamp">3 hours ago</span>
</div>
<p>The design mockups are ready for review. Please check them out when you have a moment.</p>
</div>
</div>
</div>
</div>
</div>
setTimeout(() => {
const firstCard = document.querySelector('.notification-card.new');
if (firstCard) {
firstCard.classList.remove('new');
}
}, 2500);
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
min-height: 100vh;
background-image: url("https://images.pexels.com/photos/8801154/pexels-photo-8801154.jpeg");
position: relative;
overflow-x: hidden;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
display: flex;
align-items: center;
justify-content: center;
}
.bg-orbs {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 0;
}
.orb {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
filter: blur(40px);
animation: float 8s ease-in-out infinite;
}
.orb:nth-child(1) {
width: 200px;
height: 200px;
top: 20%;
left: 10%;
animation-delay: 0s;
}
.orb:nth-child(2) {
width: 150px;
height: 150px;
top: 60%;
right: 15%;
animation-delay: 2s;
}
.orb:nth-child(3) {
width: 100px;
height: 100px;
top: 80%;
left: 60%;
animation-delay: 4s;
}
@keyframes float {
0%, 100% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-20px) rotate(180deg); }
}
.container {
position: relative;
z-index: 1;
padding: 60px 20px 40px;
max-width: 380px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 40px;
color: white;
}
.header h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 8px;
text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
.header p {
font-size: 1.1rem;
opacity: 0.9;
}
.notifications-stack {
display: flex;
flex-direction: column;
gap: 12px;
}
.notification-card {
position: relative;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px) saturate(100%);
-webkit-backdrop-filter: blur(40px) saturate(180%);
border: 0.5px solid rgba(255, 255, 255, 0.15);
border-radius: 30px;
padding: 16px;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
cursor: pointer;
overflow: hidden;
box-shadow:
0 4px 20px rgba(0, 0, 0, 0.15),
0 1px 2px rgba(255, 255, 255, 0.1) inset;
min-height: 70px;
display: flex;
align-items: center;
gap: 12px;
}
.notification-card::before {
content: '';
position: absolute;
top: -1px;
left: -1px;
right: -1px;
bottom: -1px;
background: linear-gradient(135deg,
rgba(255, 255, 255, 0.2) 0%,
rgba(255, 255, 255, 0.05) 30%,
transparent 50%,
rgba(255, 255, 255, 0.05) 70%,
rgba(255, 255, 255, 0.15) 100%);
border-radius: 21px;
filter: blur(0.5px);
z-index: -1;
opacity: 0.7;
transition: all 0.3s ease;
}
.notification-card::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg,
rgba(255, 255, 255, 0.12) 0%,
rgba(255, 255, 255, 0.04) 50%,
transparent 100%);
border-radius: 20px 20px 32px 32px;
pointer-events: none;
opacity: 0.8;
}
.notification-card:hover {
transform: translateY(-4px) scale(1.02);
background: rgba(255, 255, 255, 0.15);
box-shadow:
0 8px 25px rgba(0, 0, 0, 0.18),
0 2px 4px rgba(255, 255, 255, 0.12) inset;
}
.notification-card:hover::before {
opacity: 0.9;
}
.app-icon {
width: 28px;
height: 28px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
border: 0.5px solid rgba(255, 255, 255, 0.2);
box-shadow:
0 2px 6px rgba(0, 0, 0, 0.1),
0 1px 1px rgba(255, 255, 255, 0.2) inset;
flex-shrink: 0;
}
.notification-body {
flex: 1;
min-width: 0;
}
.content-header {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 8px;
margin-bottom: 4px;
}
.timestamp {
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.7);
font-weight: 400;
flex-shrink: 0;
}
.notification-content h3 {
color: white;
font-size: 0.95rem;
font-weight: 600;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0;
}
.notification-content p {
color: rgba(255, 255, 255, 0.85);
font-size: 0.85rem;
line-height: 1.4;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.notification-actions {
display: none;
}
.notification-card.urgent {
background: rgba(255, 99, 99, 0.1);
border-color: rgba(255, 99, 99, 0.2);
}
.notification-card.success {
background: rgba(99, 255, 132, 0.1);
border-color: rgba(99, 255, 132, 0.2);
}
@media (max-width: 768px) {
.container {
padding: 20px 16px;
}
.header h1 {
font-size: 2rem;
}
.notification-card {
padding: 16px;
border-radius: 16px;
}
}
.notification-card.new {
animation: pulse 2s ease-in-out;
}
@keyframes pulse {
0% { box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 0 rgba(255, 255, 255, 0.4); }
70% { box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 10px rgba(255, 255, 255, 0); }
100% { box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 0 rgba(255, 255, 255, 0); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment