Path: blob/main/src/vs/sessions/contrib/aquarium/browser/media/aquarium.css
13406 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45/* Agents aquarium. All decorative layers use pointer-events:none; mouse6* handling is done at the workbench main container level. See aquariumOverlay.ts. */78/* --- Water --- */910/* Make the chat bar a positioning context for the water layer (its first11* child) and keep its real children above the decorative water — without12* explicit z-index, positioned siblings paint after non-positioned ones. */13.monaco-workbench .part.chatbar {14position: relative;15}16.monaco-workbench .part.chatbar > .title,17.monaco-workbench .part.chatbar > .content {18position: relative;19z-index: 1;20}2122.agents-aquarium-water {23position: absolute;24inset: 0;25pointer-events: none;26overflow: hidden;27z-index: 0;28border-radius: 12px;29opacity: 0;30transition: opacity 320ms ease-out;31/* Linear (not radial) — bands far less than radial alpha gradients. */32background: linear-gradient(160deg,33rgba(36, 191, 165, 0.06) 0%,34rgba(0, 122, 204, 0.05) 55%,35rgba(188, 63, 188, 0.05) 100%);36}3738.agents-aquarium-water.visible {39opacity: 1;40}4142/* Two soft drifting accent glows. We use radial-gradient softness inside43* each pseudo (not `filter: blur()`) so the parent's `overflow: hidden`44* doesn't clip the blur radius and leave a hard edge. Circles are sized45* larger than visible so the falloff has somewhere to fade into. */46.agents-aquarium-water::before,47.agents-aquarium-water::after {48content: '';49position: absolute;50width: 140%;51aspect-ratio: 1;52border-radius: 50%;53pointer-events: none;54will-change: transform;55}5657.agents-aquarium-water::before {58top: -70%;59left: -50%;60background: radial-gradient(closest-side, rgba(36, 191, 165, 0.10), rgba(36, 191, 165, 0.05) 35%, transparent 75%);61animation: agents-aquarium-float-a 18s ease-in-out infinite alternate;62}6364.agents-aquarium-water::after {65bottom: -70%;66right: -50%;67background: radial-gradient(closest-side, rgba(0, 122, 204, 0.10), rgba(0, 122, 204, 0.05) 35%, transparent 75%);68animation: agents-aquarium-float-b 22s ease-in-out infinite alternate;69}7071/* translate3d so the GPU composites instead of re-rasterizing each frame. */72@keyframes agents-aquarium-float-a {730% {74transform: translate3d(0, 0, 0) scale(1);75}7650% {77transform: translate3d(8%, 6%, 0) scale(1.05);78}79100% {80transform: translate3d(-5%, 10%, 0) scale(0.97);81}82}8384@keyframes agents-aquarium-float-b {850% {86transform: translate3d(0, 0, 0) scale(1);87}8850% {89transform: translate3d(-6%, -8%, 0) scale(1.03);90}91100% {92transform: translate3d(5%, -4%, 0) scale(1.07);93}94}9596/* --- Fish --- */9798.agents-aquarium-fish-layer,99.agents-aquarium-food-layer {100position: absolute;101inset: 0;102pointer-events: none;103}104105/* No drop-shadow / blur filter: those force a software rasterization pass106* per fish per frame (~10x paint cost at 50 fish). */107.agents-aquarium-fish {108position: absolute;109top: 0;110left: 0;111will-change: transform, opacity;112pointer-events: none;113opacity: 0;114transition: opacity 360ms ease-out;115}116117/* JS sets per-fish transition-delay before adding `.visible` for staggered118* entry; the exit handler drives the fade-out via inline styles. */119.agents-aquarium-fish.visible {120opacity: 1;121}122123/* No transition on the inner: facing is eased in JS each frame via124* Fish.applyTransform so it stays in sync with the swim direction. */125.agents-aquarium-fish-inner {126width: 100%;127height: 100%;128transform-origin: center;129}130131.agents-aquarium-fish svg {132width: 100%;133height: 100%;134display: block;135overflow: visible;136}137138/* Each strip is a clipped vertical slice of the VS Code logo; staggered139* translateY produces a sine wave traveling along the body (the swim).140* Front strips (--agents-aquarium-strip-index ~ 0) keep the species color;141* back strips mix toward white for depth shading. 720ms / 8 strips = 90ms142* phase delay; negative delay starts each strip mid-cycle. */143.agents-aquarium-fish-strip {144color: color-mix(in srgb, currentColor, white calc(var(--agents-aquarium-strip-index, 0) * 4%));145animation: agents-aquarium-body-wave 720ms linear infinite;146animation-delay: calc(var(--agents-aquarium-strip-index, 0) * -90ms);147}148149/* 5-keyframe sine approximation; linear timing lands closer to a true150* sinusoid than 2-keyframe ease-in-out (which over-emphasizes extremes). */151@keyframes agents-aquarium-body-wave {1520% {153transform: translateY(0);154}15525% {156transform: translateY(3.5px);157}15850% {159transform: translateY(0);160}16175% {162transform: translateY(-3.5px);163}164100% {165transform: translateY(0);166}167}168169/* --- Food pellets --- */170171.agents-aquarium-food {172position: absolute;173top: 0;174left: 0;175width: 6px;176height: 6px;177margin: -3px 0 0 -3px;178border-radius: 50%;179background: radial-gradient(circle at 35% 35%, #ffd56a, #c98a17 80%);180box-shadow: 0 0 4px rgba(255, 200, 80, 0.6);181pointer-events: none;182will-change: transform;183}184185/* --- Toggle button (anchored to the chat bar) --- */186187.agents-aquarium-toggle {188position: absolute;189top: 12px;190right: 14px;191z-index: 100;192width: 24px;193height: 24px;194border-radius: 50%;195border: 1px solid transparent;196background: transparent;197color: var(--vscode-foreground, #cccccc);198display: inline-flex;199align-items: center;200justify-content: center;201padding: 0;202cursor: pointer;203opacity: 0.5;204transition: opacity 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;205}206207.agents-aquarium-toggle:hover {208opacity: 1;209background: var(--vscode-toolbar-hoverBackground, rgba(255, 255, 255, 0.08));210}211212/* `.monaco-workbench` prefix to match the workbench's own `button:focus`213* rule so we win the cascade without resorting to !important. */214.monaco-workbench button.agents-aquarium-toggle:focus {215outline: none;216}217.monaco-workbench button.agents-aquarium-toggle:focus-visible {218opacity: 1;219outline: 1px solid var(--vscode-focusBorder);220outline-offset: 2px;221}222223.agents-aquarium-toggle.active {224opacity: 1;225color: var(--vscode-icon-foreground, var(--vscode-foreground, #cccccc));226}227.agents-aquarium-toggle .codicon {228font-size: 14px;229}230231/* Off-state icon: the agents window logo (same asset as the mobile chat232* shell's workspace picker). Theme-swapped under `.vs` / `.hc-light`. */233.agents-aquarium-toggle-logo {234display: inline-block;235width: 14px;236height: 14px;237background: url('../../../../browser/media/sessions-logo-light.svg') center / contain no-repeat;238transform-origin: 50% 50%;239/* Brief attention-grabbing wiggle every 12s. Keyframes hold the rest240* pose for ~93% of the cycle and only animate during the first ~7%. */241animation: agents-aquarium-toggle-wiggle 12s ease-in-out infinite;242}243244.vs .agents-aquarium-toggle-logo,245.hc-light .agents-aquarium-toggle-logo {246background-image: url('../../../../browser/media/sessions-logo-dark.svg');247}248249/* No need to nag once the user is engaging with the button. */250.agents-aquarium-toggle:hover .agents-aquarium-toggle-logo,251.agents-aquarium-toggle:focus-visible .agents-aquarium-toggle-logo {252animation: none;253}254255@keyframes agents-aquarium-toggle-wiggle {2560% {257transform: rotate(0deg) scale(1);258}2591.5% {260transform: rotate(-12deg) scale(1.08);261}2623% {263transform: rotate(10deg) scale(1.08);264}2654.5% {266transform: rotate(-8deg) scale(1.05);267}2686% {269transform: rotate(6deg) scale(1.03);270}2717% {272transform: rotate(0deg) scale(1);273}274100% {275transform: rotate(0deg) scale(1);276}277}278279/* --- Reduced motion --- */280281@media (prefers-reduced-motion: reduce) {282.agents-aquarium-fish-strip,283.agents-aquarium-water::before,284.agents-aquarium-water::after,285.agents-aquarium-toggle-logo {286animation: none;287}288289.agents-aquarium-water,290.agents-aquarium-fish {291transition: none;292}293}294295296