GithubHelp home page GithubHelp logo

Comments (11)

craigcartmell avatar craigcartmell commented on August 20, 2024 4

Is this also what's causing e.g. primary, secondary, danger etc from being removed from bg-* styles? I can see it's still generatingtext-primary for example, just not bg-primary.

from tailwind-rn.

vadimdemedes avatar vadimdemedes commented on August 20, 2024 3

Actually, it could allow bg-* classes, but filter out unsupported ones, but I think it will be a super ugly regex to have.

from tailwind-rn.

vadimdemedes avatar vadimdemedes commented on August 20, 2024 2

Going to repurpose this into a generic issue on supporting custom Tailwind configs. I've started working on this, because it's clearly a much needed feature for the community.

from tailwind-rn.

tvarwig avatar tvarwig commented on August 20, 2024 1

@vadimdemedes your custom-config branch did create a custom bg-xx class great

from tailwind-rn.

karolsw3 avatar karolsw3 commented on August 20, 2024

You're right. I've checked that and it works now.

from tailwind-rn.

vadimdemedes avatar vadimdemedes commented on August 20, 2024

It can't be /^bg-/, because then it would include classes that are not supported in React Native, like bg-repeat.

As a workaround, I'd suggest using gray naming for now.

from tailwind-rn.

vadimdemedes avatar vadimdemedes commented on August 20, 2024

Pushed #43 to support full customization of your Tailwind build. Try it out and let me know if it works or not!

from tailwind-rn.

MaganAnkur avatar MaganAnkur commented on August 20, 2024

@vadimdemedes i recently installed the library but still could not get custom bg-xx
Note: border and text are working as expected, issue is only with bg

from tailwind-rn.

tvarwig avatar tvarwig commented on August 20, 2024

@MaganAnkur did you use the custom-config branch? I added primary color to my config and bg-primary was added to the styles.json file

from tailwind-rn.

aswinmohanme avatar aswinmohanme commented on August 20, 2024

custom-config branch works for generating bg-* classes

from tailwind-rn.

vadimdemedes avatar vadimdemedes commented on August 20, 2024

Closing, tailwind-rn supports custom config out of the box now.

from tailwind-rn.

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.