-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error – textSizes vs. fontSize #6
Comments
Hi! v1.0 is out :D Any news on this? Thanks! |
I've open a PR that addresses this: |
@bradlc any chance of getting this PR merged? Seems like a useful plugin. |
This would be really handle to merge... Pretty please, @bradlc 🥺 |
+1 |
Fantastic plugin! Also hoping for some maintenance updates for more recent version of Tailwind along the lines of this PR :) |
I wonder if this is need still, now that we pretty have pretty wide clamp support. |
@jeremydouglas I was about to fork this repo as it is clearly unmaintained (tried to email the owner repeatedly, no answer) when I saw your comment, thanks a lot for the hint!
|
I haven't used it with Tailwind, but I image you would just set the font-size in your config to a clamp() value. I would do a fallback if you want to support IE and opera mini. |
Agreed, that should work. I also realized that I want different clamping values depending on the device, so ended up disabling the default font-size handling in tailwind and defining alternative for the classes. Here is what it looks like for whomever might be interested to have fluid fonts with tailwind: First some SCSS to help with the calculations:
Then the actual classes (the actual numbers might not make sense):
The SCSS is far from perfect, the problem is too constrained by providing all of $min, $max and $device-width; the poly-fluid-sizing mixin mentioned in issue #5 looks like the best way to go, it is just a bit on the heavy side and I haven't tried it yet. |
Hey guys, Using the new clamp feature is allows to set font-sizes like this:
Maybe we could make use of this smaller clamp function? |
Appreciate it's early doors with Tailwind 1.0.0-beta.3!
The new key for
textSizes
in Tailwind 1.0.0-beta.3 isfontSize
, which seems to cause it to error now:TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at /Users/andyfitch/Code/flatsites/all-dogs-new-tricks/node_modules/tailwindcss-fluid/dist/index.js:1:1293 at Array.forEach (<anonymous>) at /Users/andyfitch/Code/flatsites/all-dogs-new-tricks/node_modules/tailwindcss-fluid/dist/index.js:1:1240 at plugins.forEach.plugin (/Users/andyfitch/Code/flatsites/all-dogs-new-tricks/node_modules/tailwindcss/lib/util/processPlugins.js:45:5) at Array.forEach (<anonymous>) at _default (/Users/andyfitch/Code/flatsites/all-dogs-new-tricks/node_modules/tailwindcss/lib/util/processPlugins.js:44:11) at /Users/andyfitch/Code/flatsites/all-dogs-new-tricks/node_modules/tailwindcss/lib/processTailwindFeatures.js:33:58 at LazyResult.run (/usr/local/lib/node_modules/postcss-cli/node_modules/postcss/lib/lazy-result.js:295:14) at LazyResult.asyncTick (/usr/local/lib/node_modules/postcss-cli/node_modules/postcss/lib/lazy-result.js:208:26) npm ERR! code ELIFECYCLE
The text was updated successfully, but these errors were encountered: