How to use the tailwindcss function in tailwindcss

To help you get started, we’ve selected a few tailwindcss examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-static / react-static / examples / tailwindcss / static.config.js View on Github external
plugins: () => [
            postcssFlexbugsFixes,
            autoprefixer({
              browsers: [
                '>1%',
                'last 4 versions',
                'Firefox ESR',
                'not ie < 9', // React doesn't support IE8 anyway
              ],
              flexbox: 'no-2009',
            }),
            tailwindcss(path.resolve(__dirname, './tailwind.config.js')),
          ],
        },
github algolia / docsearch / docs / scripts / lib / css.js View on Github external
postcssPlugins(tailwindConfigFile) {
    const plugins = [
      postcssImport(),
      tailwind(tailwindConfigFile),
      postcssNested,
    ];

    // Add more plugins when building
    if (!this.isProduction()) {
      return plugins;
    }

    // Only keep classes used in files at the same level
    let pathLevel = path.dirname(path.relative('./src', tailwindConfigFile));
    if (pathLevel === '..') {
      pathLevel = '';
    }
    plugins.push(
      postcssPurge({
        content: [`./dist/${pathLevel}/*.html`],
github algolia / talksearch / scripts / build / css.js View on Github external
postcssPlugins(tailwindConfigFile) {
    const plugins = [
      postcssImport(),
      tailwind(tailwindConfigFile),
      postcssNested,
    ];

    // Add more plugins when building
    if (!this.isProduction()) {
      return plugins;
    }

    // Only keep classes used in files at the same level
    let pathLevel = path.dirname(path.relative('./src', tailwindConfigFile));
    if (pathLevel === '..') {
      pathLevel = '';
    }
    plugins.push(
      postcssPurge({
        content: [`./docs/${pathLevel}/*.html`],
github react-static / react-static / packages / react-static-example-tailwindcss / static.config.js View on Github external
plugins: () => [
            postcssFlexbugsFixes,
            autoprefixer({
              browsers: [
                '>1%',
                'last 4 versions',
                'Firefox ESR',
                'not ie < 9', // React doesn't support IE8 anyway
              ],
              flexbox: 'no-2009',
            }),
            tailwindcss(path.resolve(__dirname, './tailwind.config.js')),
          ],
        },
github taylorbryant / jekyll-starter-tailwind / gulpfile.babel.js View on Github external
task("processStyles", done => {
  browserSync.notify("Compiling styles...");

  return src(rawStylesheet)
    .pipe(postcss([atimport(), tailwindcss(tailwindConfig)]))
    .pipe(gulpif(devBuild, sourcemaps.init()))
    .pipe(
      gulpif(
        !devBuild,
        new purgecss({
          content: ["_site/**/*.html"],
          extractors: [
            {
              extractor: TailwindExtractor,
              extensions: ["html", "js"]
            }
          ]
        })
      )
    )
    .pipe(gulpif(!devBuild, postcss([autoprefixer(), cssnano()])))
github dvkndn / typed-tailwind / src / get-source / index.ts View on Github external
return new Promise((resolve, reject) => {
    const orgConfig = getConfigObj(configStr);
    if (typeof orgConfig === "string") { return reject(orgConfig); }
    const [optConfig, changes] = optimizeConfig(orgConfig);
    postcss([tailwindcss(optConfig)])
      .process("@tailwind utilities;", { from: undefined })
      .then(processResult(resolve, reject));
  });
}