tachyons icon indicating copy to clipboard operation
tachyons copied to clipboard

Can I only apply tachyons for some specific UI components?

Open ZhouHansen opened this issue 9 years ago • 3 comments

I developed a website without using tachyons, now I use tachyons in my new work on it, then style of old stuff went wrong. Can I only apply tachyons for some specific UI components?

ZhouHansen avatar Nov 27 '17 02:11 ZhouHansen

If you link the tachyons CSS file after your other CSS files there is the possibility that the tachyons overwrites some of your previous styling. Try linking the tachyons file first then any other CSS files. Otherwise, without knowing more about your project/code it's hard to say specifically how to do what you want.

JoshNavi avatar Nov 29 '17 17:11 JoshNavi

Are you linking to it via the CDN or building it locally? If you're building it locally you could try commenting out the following:

@import './_normalize'

In my case, this was where most of the clashes were.

robjwood avatar Nov 29 '17 18:11 robjwood

You can also try running npm run mutations if you are using the tachyons build pipeline. That should show where classes are. Otherwise you can use the tachyons generator and generate your own classes that have a prefix so there are no naming clashes.

https://github.com/tachyons-css/tachyons-generator

mrmrs avatar Jan 06 '18 11:01 mrmrs