@obosbbl/grunnmuren-tailwind 0.3.0 → 0.4.1
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 +2 -2
- package/tailwind-base.cjs +15 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-tailwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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.
|
|
22
|
+
"tailwindcss": "3.1.4"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"tailwindcss": "^3"
|
package/tailwind-base.cjs
CHANGED
|
@@ -157,14 +157,26 @@ const snackbar = plugin(function ({ addComponents, theme }) {
|
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
const defaultOpts = {
|
|
161
|
+
useLegacyFont: false,
|
|
162
|
+
fontBasePath: '/fonts',
|
|
163
|
+
useLegacyContainerSize: false,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
module.exports = (userOptions) => {
|
|
167
|
+
const opts = userOptions ? { ...defaultOpts, ...userOptions } : defaultOpts;
|
|
161
168
|
let fontFamily = 'OBOSFont';
|
|
162
169
|
let fonts = obosFonts;
|
|
170
|
+
let containerSize = '92rem';
|
|
163
171
|
if (opts.useLegacyFont) {
|
|
164
172
|
fontFamily = 'Gordita';
|
|
165
173
|
fonts = gorditaFonts;
|
|
166
174
|
}
|
|
167
175
|
|
|
176
|
+
if (opts.useLegacyContainerSize) {
|
|
177
|
+
containerSize = '82rem';
|
|
178
|
+
}
|
|
179
|
+
|
|
168
180
|
return {
|
|
169
181
|
plugins: [
|
|
170
182
|
// TODO: Remove the aspect ratio plugin when Safari 14 usage is low enough
|
|
@@ -201,7 +213,7 @@ module.exports = (opts = { useLegacyFont: false, fontBasePath: '/fonts' }) => {
|
|
|
201
213
|
paddingRight: '1rem',
|
|
202
214
|
marginLeft: 'auto',
|
|
203
215
|
marginRight: 'auto',
|
|
204
|
-
maxWidth:
|
|
216
|
+
maxWidth: containerSize,
|
|
205
217
|
},
|
|
206
218
|
'.container-prose': {
|
|
207
219
|
width: '100%',
|
|
@@ -209,7 +221,7 @@ module.exports = (opts = { useLegacyFont: false, fontBasePath: '/fonts' }) => {
|
|
|
209
221
|
paddingRight: '1rem',
|
|
210
222
|
marginLeft: 'auto',
|
|
211
223
|
marginRight: 'auto',
|
|
212
|
-
maxWidth: '
|
|
224
|
+
maxWidth: '39rem',
|
|
213
225
|
},
|
|
214
226
|
// that thin blue line at the top
|
|
215
227
|
'.topline::before': {
|