Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Can I generate tailwind css in another way?

I would like to generate all the grid related css to a file with a few modifications like prefix and media queries using the tailwind.config.js file, without having to have them specified in a html,js,framework file?

Is that possible?

As I can see it now purge/safelist with a regex is the option?

like

module.exports = {
  purge: {
    enabled: true,
    options: {
      safelist: ['/place-/g', '/justify-/g']
    }
  }
}

Thankful for any help on this.

Please note, I'm not into in setting up a "fake html page" with classes, as my use case might grow overtime.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If I understand your question correctly, think you're just missing the content criteria & the standard key for the safelist object?

  purge: {
        content: ["./src/**/*.{html,js,svelte,ts}",],
        enabled: true,
        options: {
            safelist: {
                standard: [/^grid-col/, /^grid-row/]
            }
        }
    },

This may be useful to you: https://purgecss.com/safelisting.html#in-the-css-directly

--

If you just need tailwind grids, perhaps an alternative like this may help: https://github.com/VeronQ/tailwind-grid

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!