coolify/tests/Feature/ButtonDepthInteractionTest.php
Andras Bacsai 7f25af3785 feat(ui): capitalize button labels and speed depth transitions
Standard buttons now capitalize each word in their labels. Movement and
depth-shadow changes use an 80ms duration while color transitions stay
at 120ms.
2026-09-08 10:14:03 +02:00

23 lines
1.2 KiB
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('.dark .button:not(.button-highlighted):not([isHighlighted]):not(:disabled)')
->toContain('--button-depth-color: rgb(255 255 255 / 0.08);')
->not->toContain('.dark .button.button-highlighted:not(:disabled)')
->toContain('.button:not(:disabled):hover')
->toContain('transform: translateY(-1px);')
->toContain('transition-duration: 120ms, 120ms, 120ms, 80ms, 80ms;')
->toContain('.button:not(:disabled):active')
->toContain('transform: translateY(2px);')
->not->toContain('transform: translateY(1px);')
->not->toContain('transform: translateY(3px);')
->toContain('box-shadow: none;');
});