kenhyuwa / litepie-datepicker

Litepie Datepicker is a date range picker component for Vue.js and Tailwind CSS, dependent to day.js.
https://litepie.com
MIT License
373 stars 75 forks source link

tailwind is `base` utility is creating conflicts in existing project. #18

Closed rut2 closed 3 years ago

rut2 commented 3 years ago

As litepie-datepicker is rely on tailwind, after successful integration of tailwind, it's conflicting with existing CSS that causes lots of design issues.

How can I integrate litepie without affecting existing design?

kenhyuwa commented 3 years ago

Tailwind CSS version? what's classes with conflicting your CSS?

rut2 commented 3 years ago

@kenhyuwa I am using "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.4", "@tailwindcss/postcss7-compat": "^2.0.4"

it's affecting all base tags like <h1> <h2> ... and font style as well.

this is my _date-picker.scss

` // // _date-picker.scss //

// tailwind @tailwind base; @tailwind components; @tailwind utilities;

`

kenhyuwa commented 3 years ago

in this production or development?

rut2 commented 3 years ago

It's in development. If I don't use @tailwind base; then everything works fine except litepie

kenhyuwa commented 3 years ago

can you share tailwind.config.js

rut2 commented 3 years ago

here it is


const path = require("path");
const colors = require("tailwindcss/colors");

module.exports = {
  important: "#tailwind",
  purge: [path.resolve(__dirname, "./node_modules/litepie-datepicker/**/*.js")],
  theme: {
    extend: {
      colors: {
        // Change with you want it
        "litepie-primary": colors.lightBlue, // color system for light mode
        "litepie-secondary": colors.coolGray // color system for dark mode
      }
    }
  },
  variants: {
    extend: {
      cursor: ["disabled"],
      textOpacity: ["disabled"],
      textColor: ["disabled"]
    }
  }
};

postcss.config.js

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {}
  }
};
kenhyuwa commented 3 years ago

do you use vue-cli/vite? try with purge: false.

rut2 commented 3 years ago

No, we are using basic vue-cli

Also purge: false is not working. Prefixing CSS class name might be the possible solution

kenhyuwa commented 3 years ago

so, are your problem is fix now?

rut2 commented 3 years ago

No actually, as litepie is not using any prefix, CSS classing is not working if I add prefix project. Still the problem is not resolved

kenhyuwa commented 3 years ago

I'm not sure with your problem. because, I also implement to existing project and still work.

kenhyuwa commented 3 years ago

please, reopen with spesific issues.