@obosbbl/grunnmuren-tailwind 0.3.1 → 0.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tailwind-base.cjs +11 -2
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.0",
4
4
  "description": "Grunnmuren Tailwind preset",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
package/tailwind-base.cjs CHANGED
@@ -157,17 +157,26 @@ const snackbar = plugin(function ({ addComponents, theme }) {
157
157
  });
158
158
  });
159
159
 
160
- const defaultOpts = { useLegacyFont: false, fontBasePath: '/fonts' };
160
+ const defaultOpts = {
161
+ useLegacyFont: false,
162
+ fontBasePath: '/fonts',
163
+ useLegacyContainerSize: false,
164
+ };
161
165
 
162
166
  module.exports = (userOptions) => {
163
167
  const opts = userOptions ? { ...defaultOpts, ...userOptions } : defaultOpts;
164
168
  let fontFamily = 'OBOSFont';
165
169
  let fonts = obosFonts;
170
+ let containerSize = '90rem';
166
171
  if (opts.useLegacyFont) {
167
172
  fontFamily = 'Gordita';
168
173
  fonts = gorditaFonts;
169
174
  }
170
175
 
176
+ if (opts.useLegacyContainerSize) {
177
+ containerSize = '80rem';
178
+ }
179
+
171
180
  return {
172
181
  plugins: [
173
182
  // TODO: Remove the aspect ratio plugin when Safari 14 usage is low enough
@@ -204,7 +213,7 @@ module.exports = (userOptions) => {
204
213
  paddingRight: '1rem',
205
214
  marginLeft: 'auto',
206
215
  marginRight: 'auto',
207
- maxWidth: '90rem',
216
+ maxWidth: containerSize,
208
217
  },
209
218
  '.container-prose': {
210
219
  width: '100%',