Coder Social home page Coder Social logo

tailwindcss-setup-examples's People

Contributors

adamwathan avatar atinux avatar benfurfie avatar casprine avatar emilbryggare avatar jimt avatar mhanberg avatar mikemcbride avatar mtvbrianking avatar wesbos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tailwindcss-setup-examples's Issues

tailwindcss + next.js + emotion.js example

Hi!

I love explanation in the tailwindcss + next example! :)

Can we add emotion.js to that example? I think the community would benefit from an explanation about the setup.

Let me know your thoughts. :)

Update svelte example

As far as I know there is no more need to import @fullhuman/postcss-purgecss and we should use purge option in tailwind config. The docs should be updated I guess.

create-react-app

Hi @adamwathan,

I've created a fork a few months ago of the react-scripts to add TailwindCSS and PurgeCSS: https://github.com/DemianD/create-react-app-tailwindcss

To install a new create-react-app, you should run this command:

npx create-react-app --scripts-version=react-scripts-tailwindcss my-app

Currently, it doesn't support the new TailwindCSS version.
I'll add this in 2 weeks (currently studying for my finals)

I'm not sure how I can contribute to this repository.

We may fork create-react-app under the tailwindCSS organisation, add TailwindCSS (and PurgeCSS) and publish it to npm. (https://facebook.github.io/create-react-app/docs/alternatives-to-ejecting)

Using Tailwind CSS with CRA

For a recent project, I created a fork of React Scripts and fetches from a tailwind css template pushed to npm.

It can be used with:

npm init react-app folder-name --scripts-version=@agney/rs-tailwind --template=tailwind

Requires @next for now, since some fixes for template are not on major release
With the release of 3.3.0, this is now directly supported.

I was wondering if the repositories could be moved here for better maintanence and visiblity.

Easy Symfony setup.

To use Tailwind with Symfony you can use the PostCSS setup instructions and near the bottom of webpack.config.js put:

.enablePostCssLoader()

It took me less than 5 minutes and the Symfony webpack settings already know where your assets are located and webpack takes care of everything.

Svelte setup example not working

First issue: Running "dev": "run-p start:dev autobuild watch:build" results in ERROR: Task not found: "watch:build". Changing watch:build to --watch:build fixes this.

Second issue: To see the result of applying tailwind classes live in the browser, everything needs to be rebuilt by running the build script—I assume that's not the intended behavior.

Add express + pug example

Would be great to have a production ready example of how to setup TailwindCSS using only express and pug. ie;

$ yarn dlx express-generator --view=pug tailwind-example
$ cd tailwind-example
$ yarn add tailwindcss --dev
...etc

Part of Jekyll template ending up in the style.css file

I am using the Jeykll stater and noticed that whilst I have serving my project part of my template was ending up in _site/css/style.css. Any idea why this may be happening?

style.css

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta charset="utf-8">
  <link rel="stylesheet" href="/css/site.css">
  <link rel="icon" href="/assets/favicon.ico">
</head>
<html>
  <body class="w-full h-full p-0 m-0">
    <div class="flex w-full h-full">
      <aside class="flex-none w-1/6 h-full px-8 py-10 overflow-y-auto shadow-md">
        <div class="border-bottom">
          <span class="-mb-3 text-gray-50 h6">Project</span>
          <h1 class="mb-10 display-3">Atom</h1>
        </div>

        <nav class="">
          <ul>
            <li class="mb-1 hover:bg-violet-10">
              <a href="/">Home</a>
            </li>
            <li class="mb-1 hover:bg-violet-10">
              <a href="/spacing-and-sizing">Spacing & Sizing</a>
            </li>
            <li class="mb-1 hover:bg-violet-10">
              <a href="/typography">Typography</a>
            </li>
          </ul>
        </nav>
        
      </aside>
      <section class="flex-grow h-full py-10 overflow-y-auto">
        @import url('https://fonts.googleapis.com/css?family=Roboto+Slab|Roboto:300,300i,400,400i,500,500i,700,700i&display=swap');

@import url("https://use.typekit.net/ltq4kgq.css");

/* Front matter is necessary for Jekyll */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

Hot reload doesn't work in Sapper

Making changes in tailwind.css correctly updates the index.css file, but you have to refresh the browser to see the effect. Is this by design or a bug?

An entire global style against Next's default CSS-in-JS

By making all the styles pages/_app.js available globally, the browser then must download and cache the entire file the first time. Is it different from the Next's default CSS-in-JS where a component has it's own CSS and it only loads when the component it's mounted.

How the difference between them would be? Is it worth?

Sourcemaps not working

Tested by cloning and running the Next.js example.

Screen Shot 2020-02-18 at 13 14 28

Clicking through to utilities.css:1 shows:

Screen Shot 2020-02-18 at 13 14 48

Is there a way to see Tailwind's CSS declarations in a source map for local dev and debugging?

Update Jekyll to use built-in PurgeCSS

Since v1.4.0 has started to include PurgeCSS in Tailwind, is it possible to use the built-in PurgeCSS with Jekyll and update the setup-example files?

I have yet to get this working on my own site otherwise I would happily contribute.

request - static version (nunjucks)

Would love to see a static html build using something like nunjucks.

I've got a very basic parcel version but it's not scaling that well as i;m only using include. Something like nunjucks with partials, macros would be amazing.

i'll see if i've got time in the next few weeks to put something together. Putting this out there in case anyone has it already.

initial thought were tailwind, webpack, nunjucks and perhaps storybook for the icing on the cake

The tailwindcss example is very wrong now

If I have time I'll update it, but I'm busy on some deadlines right now and don't have the time to do it. Specifically, on the tailwindcss web page, there are details about nextjs 9 vs 10. https://tailwindcss.com/docs/guides/nextjs

The example shows for nextjs 9.2.2. 9.5.5 had lots of problems with css and if you install the compat patch, you get a high serverity warning. Further, you can remove the patch by taking tailwind out of the dependencies section of package.json, but still a hot mess.

This example really needs to be updated to NextJS 10.

https://github.com/tailwindlabs/tailwindcss-setup-examples/tree/master/examples/nextjs

Update Next.js example to include a use in a component-level CSS module

Next.js allows for component-level CSS via CSS modules as documented here.

Can the next.js example be updated to include an example of this?

For example, I tried to use:

.header {
  @apply text-lg;
}

in a CSS module and got the following error:

Syntax error: `@apply` cannot be used with `.rows-span-3` because `.rows-span-3` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.rows-span-3` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.

Many thanks!

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.