@obosbbl/grunnmuren-tailwind 0.5.1 → 0.7.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 +5 -4
- package/tailwind-base.cjs +23 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-tailwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Grunnmuren Tailwind preset",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
"tailwind-base.cjs"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@tailwindcss/aspect-ratio": "0.4.
|
|
19
|
-
"@tailwindcss/typography": "0.5.
|
|
18
|
+
"@tailwindcss/aspect-ratio": "0.4.2",
|
|
19
|
+
"@tailwindcss/typography": "0.5.7"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"tailwindcss": "3.1.8"
|
|
22
|
+
"tailwindcss": "3.1.8",
|
|
23
|
+
"postcss": "8.4.16"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"tailwindcss": "^3"
|
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
|
});
|
|
@@ -304,14 +312,23 @@ module.exports = (userOptions) => {
|
|
|
304
312
|
zIndex: '100',
|
|
305
313
|
},
|
|
306
314
|
/**
|
|
307
|
-
*
|
|
308
|
-
* Protip: Use this together with navbar, footer and `bg-blue` class on the body.
|
|
315
|
+
* @deprecated use page-layout and page-layout-main instead
|
|
309
316
|
*/
|
|
310
317
|
'.pagemain': {
|
|
311
318
|
backgroundColor: '#fff',
|
|
312
|
-
borderRadius: '
|
|
319
|
+
borderRadius: '1.5rem',
|
|
313
320
|
overflow: 'hidden',
|
|
314
321
|
},
|
|
322
|
+
|
|
323
|
+
'.page-layout': {
|
|
324
|
+
display: 'flex',
|
|
325
|
+
flexDirection: 'column',
|
|
326
|
+
minHeight: '100vh',
|
|
327
|
+
},
|
|
328
|
+
'.page-layout-main': {
|
|
329
|
+
backgroundColor: '#fff',
|
|
330
|
+
flexGrow: '1',
|
|
331
|
+
},
|
|
315
332
|
});
|
|
316
333
|
addUtilities({
|
|
317
334
|
// imitates a bold font, but doesn't cause layout due to element width change like with font-weight
|