From 918fbecf3e8d3a7aedde89753fc8d25a71fc462f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Aug 2025 10:39:27 +0300 Subject: [PATCH] fix button pressed state --- src/components/button.style.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/button.style.js b/src/components/button.style.js index 887ff91b5..5b3f941ed 100644 --- a/src/components/button.style.js +++ b/src/components/button.style.js @@ -10,7 +10,7 @@ export default { // normal: '' // normal state is implicitly added, it is always included toggled: '.toggled', focused: ':focus-within', - pressed: ':focus:active', + pressed: ':active', hover: ':is(:hover, :focus-visible):not(:disabled)', disabled: ':disabled' }, @@ -18,7 +18,8 @@ export default { variants: { // Variants save on computation time since adding new variant just adds one more "set". // normal: '', // you can override normal variant, it will be appenended to the main class - danger: '.danger' + danger: '.-danger', + transparent: '.-transparent' // Overall the compuation difficulty is N*((1/6)M^3+M) where M is number of distinct states and N is number of variants. // This (currently) is further multipled by number of places where component can exist. },