Code Monkey home page Code Monkey logo

Comments (6)

jeevandza avatar jeevandza commented on May 24, 2024

@makepnic I have tagged repo url, fyi https://github.com/jeevandza/next-js-tailwind-config

from next.js.

makepanic avatar makepanic commented on May 24, 2024

I think you might be using the incorrect animate class. E.g. animation-shimmer must be animate-shimmer.
E.g. https://tailwindcss.com/docs/animation#customizing-your-theme if you define a spin-slow animation you must use it as animate-spin-slow. There seems to be an issue tho that you're trying to use the shimmer animation which doesn't seem to be defined anywhere.

If i change it to animate-shimmer the class css rules are properly set:

20240306-095535

For the input part it seems like you want to bundle tailwind classes as a new classname? You can use plugins (i.e. addComponents) for that, see https://tailwindcss.com/docs/adding-custom-styles#writing-plugins . There's also the possibility of defining them in your css files and @apply some tailwind utilties. The extend property in the tailwind config might only extend existing tailwind classes/utilities

from next.js.

jeevandza avatar jeevandza commented on May 24, 2024

Ignore about the shimmer that was test code. So technically creating tailwind custom theme using tailwind classes in the config file is removed, we have to use plugin instead or have to define in css file then only it will work ?, but that would be tedious right ?. And also the added colours are not reflecting.

from next.js.

makepanic avatar makepanic commented on May 24, 2024

Ignore about the shimmer that was test code. So technically creating tailwind custom theme using tailwind classes in the config file is removed, we have to use plugin instead or have to define in css file then only it will work ?, but that would be tedious right ?.

Depends on what you feel is tedious. It's the idea of tailwind to not care about bundling various css rules under a class name. You can also create wrapping components or other solutions which were created to work with tailwind. This isn't a next topic tho.

And also the added colours are not reflecting.

I'm not sure if I follow you. It seems to work fine if i use e.g. bg-brown-500 to get #73523a which is coming from your tailwind config.

from next.js.

jeevandza avatar jeevandza commented on May 24, 2024

"bg-brown-500 to get #73523a" this did not work for me, its applying tailwind classes, anyway thanks for the assist. Im closing the ticket.

from next.js.

github-actions avatar github-actions commented on May 24, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.