Skip to content

Plugin not working (nextjs app) #30

Closed
@thesergiomiguel

Description

@thesergiomiguel

Installed the plugin on a nextjs app. It builds and runs without any complaints, but I don't think the styles are being applied correctly. As you can see from the screenshot, while the classes applied to select work, the default select {} rules exposed by this plugin do not (e.g.: all the background-* properties), so the caret is just hanging there completely to the right.

Screenshot 2020-12-22 at 16 29 40

Any ideas?

tailwind.config.js

module.exports = {
  purge: ['./pages/**/*.tsx', './components/**/*.tsx'],
  darkMode: false,
  theme: {
    extend: {},
  },
  variants: {
    extend: {},
  },
  plugins: [require('@tailwindcss/forms')],
}

dependencies in package.json

  "dependencies": {
    "@tailwindcss/forms": "^0.2.1",
    "autoprefixer": "^10.1.0",
    "next": "10.0.3",
    "postcss": "^8.2.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "tailwindcss": "^2.0.2"
  },

custom <Select />

function Select(props: React.SelectHTMLAttributes<HTMLSelectElement>) {
  return <select {...props} className="w-full p-2 border border-black border-solid border-opacity-10" />
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions