@obosbbl/grunnmuren-tailwind 0.3.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/tailwind-base.cjs +14 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-tailwind",
3
- "version": "0.3.1",
3
+ "version": "0.4.2",
4
4
  "description": "Grunnmuren Tailwind preset",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -19,7 +19,7 @@
19
19
  "@tailwindcss/typography": "0.5.2"
20
20
  },
21
21
  "devDependencies": {
22
- "tailwindcss": "3.0.24"
22
+ "tailwindcss": "3.1.4"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "tailwindcss": "^3"
package/tailwind-base.cjs CHANGED
@@ -73,7 +73,7 @@ const button = plugin(function ({ addComponents }) {
73
73
  });
74
74
  });
75
75
 
76
- const checkbox = plugin(function ({ addComponents }) {
76
+ const checkbox = plugin(function ({ addComponents, theme }) {
77
77
  addComponents({
78
78
  '.checkbox': {
79
79
  '&::before': {
@@ -82,6 +82,7 @@ const checkbox = plugin(function ({ addComponents }) {
82
82
  height: '0.65em',
83
83
  transform: 'scale(0)',
84
84
  transition: '120ms transform ease-in-out',
85
+ backgroundColor: theme('colors.white'),
85
86
  'box-shadow': 'inset 1em 1em currentColor',
86
87
  'clip-path':
87
88
  'polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)',
@@ -157,17 +158,26 @@ const snackbar = plugin(function ({ addComponents, theme }) {
157
158
  });
158
159
  });
159
160
 
160
- const defaultOpts = { useLegacyFont: false, fontBasePath: '/fonts' };
161
+ const defaultOpts = {
162
+ useLegacyFont: false,
163
+ fontBasePath: '/fonts',
164
+ useLegacyContainerSize: false,
165
+ };
161
166
 
162
167
  module.exports = (userOptions) => {
163
168
  const opts = userOptions ? { ...defaultOpts, ...userOptions } : defaultOpts;
164
169
  let fontFamily = 'OBOSFont';
165
170
  let fonts = obosFonts;
171
+ let containerSize = '92rem';
166
172
  if (opts.useLegacyFont) {
167
173
  fontFamily = 'Gordita';
168
174
  fonts = gorditaFonts;
169
175
  }
170
176
 
177
+ if (opts.useLegacyContainerSize) {
178
+ containerSize = '82rem';
179
+ }
180
+
171
181
  return {
172
182
  plugins: [
173
183
  // TODO: Remove the aspect ratio plugin when Safari 14 usage is low enough
@@ -204,7 +214,7 @@ module.exports = (userOptions) => {
204
214
  paddingRight: '1rem',
205
215
  marginLeft: 'auto',
206
216
  marginRight: 'auto',
207
- maxWidth: '90rem',
217
+ maxWidth: containerSize,
208
218
  },
209
219
  '.container-prose': {
210
220
  width: '100%',
@@ -212,7 +222,7 @@ module.exports = (userOptions) => {
212
222
  paddingRight: '1rem',
213
223
  marginLeft: 'auto',
214
224
  marginRight: 'auto',
215
- maxWidth: '37rem',
225
+ maxWidth: '39rem',
216
226
  },
217
227
  // that thin blue line at the top
218
228
  '.topline::before': {