@obosbbl/grunnmuren-tailwind 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tailwind-base.cjs +11 -3
package/package.json
CHANGED
package/tailwind-base.cjs
CHANGED
|
@@ -48,6 +48,8 @@ const obosFonts = [
|
|
|
48
48
|
];
|
|
49
49
|
|
|
50
50
|
const button = plugin(function ({ addComponents, theme }) {
|
|
51
|
+
const hoverLoadingBgColor = 'rgba(0, 0, 0, 0.1)';
|
|
52
|
+
|
|
51
53
|
addComponents({
|
|
52
54
|
'.button': {
|
|
53
55
|
// The Tailwind utilities we use for focus styling are kinda hard to "translate", so using the @apply utility here, even though mixing styles are meh...
|
|
@@ -82,16 +84,22 @@ const button = plugin(function ({ addComponents, theme }) {
|
|
|
82
84
|
left: '-2px',
|
|
83
85
|
right: '-2px',
|
|
84
86
|
bottom: '-2px',
|
|
85
|
-
borderRadius: '
|
|
87
|
+
borderRadius: 'inherit',
|
|
86
88
|
},
|
|
87
89
|
// adds a shade on the button when hovered
|
|
88
90
|
// ideally this would be solved by just darkening the button background,
|
|
89
91
|
// but that doesn't really work since some of the button variations have transparent backgrounds
|
|
90
92
|
'&:hover::after': {
|
|
91
|
-
backgroundColor:
|
|
92
|
-
borderRadius: '0.375rem',
|
|
93
|
+
backgroundColor: hoverLoadingBgColor,
|
|
93
94
|
transition: `all 200ms ${theme('transitionTimingFunction.DEFAULT')}`,
|
|
94
95
|
},
|
|
96
|
+
// We use aria-busy to indicate loading state
|
|
97
|
+
'&[aria-busy="true"] > *': {
|
|
98
|
+
visibility: 'hidden',
|
|
99
|
+
},
|
|
100
|
+
'&[aria-busy="true"]::after': {
|
|
101
|
+
backgroundColor: hoverLoadingBgColor,
|
|
102
|
+
},
|
|
95
103
|
},
|
|
96
104
|
});
|
|
97
105
|
});
|