Giter Club home page Giter Club logo

Comments (8)

YashVadhadiya avatar YashVadhadiya commented on July 16, 2024

Try this.

<html>
  <body>
    <div class="component"></div>
  </body>
</html>

following CSS

.component { color: black; } button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }

Passing the above HTML and CSS through the CLI
The resulting CSS is as followed

.component { color: black; } [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }

The generated CSS should be

.component { color: black; }

I found this here.

from tailwindcss-forms.

fulljames avatar fulljames commented on July 16, 2024

I was experiencing this on a [type=password] while compiling CSS for a Shopify theme - turned out the content rules weren't looking correctly into sub-folders so it was skipping the file.

from tailwindcss-forms.

alexbu92 avatar alexbu92 commented on July 16, 2024

@fulljames how did you solve this?

from tailwindcss-forms.

fulljames avatar fulljames commented on July 16, 2024

@fulljames how did you solve this?

I tweaked the content section of the purge settings tailwind.config.js, e.g. changing './templates/*.liquid' to './templates/**/*.liquid' to look into sub-directories.

  purge: {
    enabled: true,
    content: [
      './layout/*.liquid',
      './templates/**/*.liquid',
      './sections/*.liquid',
      './snippets/*.liquid',
    ],
  },

from tailwindcss-forms.

dzajic avatar dzajic commented on July 16, 2024

@fulljames how did you solve this?

I tweaked the content section of the purge settings tailwind.config.js, e.g. changing './templates/*.liquid' to './templates/**/*.liquid' to look into sub-directories.

  purge: {
    enabled: true,
    content: [
      './layout/*.liquid',
      './templates/**/*.liquid',
      './sections/*.liquid',
      './snippets/*.liquid',
    ],
  },

@fulljames We're already doing this and are still experiencing the issue with a password field not getting the same styles applied as other input types. 😕

from tailwindcss-forms.

ayrton avatar ayrton commented on July 16, 2024

@fulljames how did you solve this?

I tweaked the content section of the purge settings tailwind.config.js, e.g. changing './templates/*.liquid' to './templates/**/*.liquid' to look into sub-directories.

purge: {

enabled: true,
content: [
  './layout/*.liquid',
  './templates/**/*.liquid',
  './sections/*.liquid',
  './snippets/*.liquid',
],

},

@fulljames We're already doing this and are still experiencing the issue with a password field not getting the same styles applied as other input types. 😕

Did you try adding "type" to the allowlist? (See snippet of the description above)

from tailwindcss-forms.

dzajic avatar dzajic commented on July 16, 2024

We've decided to go and update all our dependencies first (a bit of a nightmare). Once we achieve that, we'll see where we stand (it could be a while), but we'll try the allowlist if we need to.
For now, this isn't a major problem as it only affects one infrequently used form in our back office web app.

from tailwindcss-forms.

RobinMalfait avatar RobinMalfait commented on July 16, 2024

Hey! Thank you for your bug report!
Much appreciated! 🙏

Make sure that you provide all the paths to your files/content in purge: [] or purge: { content: [] }, otherwise purge will indeed purge these styles.
https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css

from tailwindcss-forms.

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.