Skip to main content
Version: 0.0.4

Effects Library

histuid includes a comprehensive library of CSS effects that you can use in your themes. All effects are defined in a shared effects.css file that can be imported into any theme.

The effects library includes:

  • Animations - Keyframe animations for pulsing, glowing, and attention effects
  • Gradients - Reusable gradient classes for fades and overlays

Interactive Demo

Use this interactive demo to preview animations and see how they look on the notification popup. Select an animation and target element to see it in action.

System Update Available

Software Center
2 minutes ago
A new system update is available. Click to install security patches and performance improvements.
Notification preview
Copy to your themeGTK4 CSS
.notification-popup.urgency-critical .notification-summary {
    animation: pulse-glow 2s ease-in-out infinite;
}
Live CSS EditorPreview Only
Customize the animation and preview changes live.

Using Effects in Your Theme

Importing the Library

Add this import at the top of your theme CSS file:

@import "effects.css";

Applying Animations

Apply animations using the CSS animation property:

/* Pulsing glow on critical notification titles */
.notification-popup.urgency-critical .notification-summary {
color: @error_color;
animation: pulse-error 2s ease-in-out infinite;
}

/* Sparkle effect on icons */
.notification-icon {
animation: sparkle-accent 2.5s ease-in-out infinite;
}

/* Floating shadow on the popup */
.notification-popup {
animation: shadow-float 3s ease-in-out infinite;
}

Animation Categories

Pulse & Glow Effects

Text and border glow animations with varying intensities and speeds.

AnimationDurationBest For
pulse-glow-subtle3sSubtle ambient effects
pulse-glow2sStandard text highlighting
pulse-glow-intense2sHigh-visibility text
pulse-glow-fast0.8sUrgent attention
pulse-glow-slow4sBackground ambient
border-glow2sContainer borders
border-glow-intense2sStrong border emphasis
ring-glow1.5sRing expansion effect

Shimmer & Sparkle Effects

Multi-point flickering effects that simulate glitter or sparkle.

AnimationDurationBest For
shimmer2sGentle light flickering
shimmer-fast0.8sRapid attention flash
sparkle2.5sGlitter effect on text
sparkle-intense2sStrong glitter effect
box-sparkle3sGlitter on containers

Shadow Effects

Dynamic shadow animations for depth and emphasis.

AnimationDurationBest For
shadow-breathe3sAmbient shadow pulsing
shadow-float2sFloating card effect
shadow-dramatic2sIntense shadow emphasis
shadow-drop2sDrop shadow animation
inner-glow2sInset glow effect

Attention Effects

High-visibility animations for urgent notifications.

AnimationDurationBest For
attention-pulse1.5sGeneral attention
attention-flash2sQuick flash effect
heartbeat1.5sHeartbeat-like pulses
text-heartbeat1.5sText heartbeat effect
urgent0.6sUrgent/critical alerts
text-urgent0.6sUrgent text emphasis

Border Animations

Pulsing and fading border effects.

AnimationDurationBest For
border-pulse2sPulsing border width
border-color-pulse2sBorder color pulsing
border-fade3sSubtle border fade

Color Variants

Pre-defined animations using standard theme colors (error, warning, success, accent).

Error (Red):

  • pulse-error, border-glow-error, sparkle-error

Warning (Yellow):

  • pulse-warning, border-glow-warning

Success (Green):

  • pulse-success, border-glow-success

Accent (Blue):

  • pulse-accent, border-glow-accent, sparkle-accent

Gradient Classes

The effects library includes reusable gradient classes for common visual patterns.

Fade Gradients

These gradients indicate truncated or cropped content:

ClassDescriptionUse Case
.gradient-fade-bottomFades to background at bottomCropped images, long text
.gradient-fade-topFades to background at topScroll indicators
.gradient-fade-leftFades to background on leftHorizontal scrolling
.gradient-fade-rightFades to background on rightHorizontal scrolling

Using Gradient Classes

Apply directly to overlay elements:

/* Custom image fade overlay */
.my-image-fade {
@extend .gradient-fade-bottom;
min-height: 24px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}

Or use the gradient values directly:

.notification-image-fade {
background-image: linear-gradient(
to bottom,
alpha(@window_bg_color, 0.0) 0%,
alpha(@window_bg_color, 0.5) 40%,
alpha(@window_bg_color, 0.85) 70%,
@window_bg_color 100%
);
}

Built-in Usage

The default theme uses .gradient-fade-bottom pattern for:

  • Cropped notification images - Shows fade overlay when tall images are cropped to max height

GTK4 CSS Limitations

Browser vs GTK4

This demo runs in a web browser which has more CSS capabilities than GTK4. The animations shown here closely approximate GTK4 behavior, but some subtle differences may exist.

GTK4's CSS support is more limited than web browsers:

  • No transform animations - rotate, scale, translate are not supported
  • No pseudo-elements - ::before and ::after are limited
  • No gradient position animations - Cannot animate gradient stops
  • No CSS filters - blur(), hue-rotate() not available

The animation library works within these constraints using:

  • text-shadow for text glow effects
  • box-shadow for container/border effects
  • opacity and border-color for visibility changes

Tips

  1. Don't overuse animations - One or two animated elements per notification is usually enough
  2. Match urgency to intensity - Use subtle animations for low urgency, intense for critical
  3. Consider accessibility - Some users may prefer reduced motion
  4. Test with real content - Animations look different with varying text lengths