coolify/tests/Feature/ButtonDepthInteractionTest.php
Andras Bacsai 3ae1eb9d10 feat(ui): add raised hover and pressed depth to standard buttons
Standard .button controls now use a compact 2px bottom edge, lift 1px on
hover, and press down with the depth removed. Highlighted buttons mix the
accent with black for a matching edge, and focus-visible keeps the accent
ring. Other button-like controls still use the lighter scale press.
2026-09-08 09:40:19 +02:00

19 lines
914 B
PHP

<?php
test('standard buttons use raised hover and pressed depth states', function () {
$styles = file_get_contents(resource_path('css/app.css'));
expect($styles)
->toContain('--button-depth-color: rgb(0 0 0 / 0.22);')
->toContain('--button-depth: 0 2px 0 var(--button-depth-color);')
->toContain('--button-depth-hover: 0 3px 0 var(--button-depth-color);')
->toContain('.button-highlighted:not(:disabled)')
->toContain('--button-depth-color: color-mix(in oklab, var(--color-coollabs) 52%, black);')
->toContain('.button:not(:disabled):hover')
->toContain('transform: translateY(-1px);')
->toContain('.button:not(:disabled):active')
->toContain('transform: translateY(2px);')
->not->toContain('transform: translateY(1px);')
->not->toContain('transform: translateY(3px);')
->toContain('box-shadow: none;');
});