Just-In-Time: The Next Generation of Tailwind CSS

Author : usitvhd
Publish Date : 2021-03-24 17:55:23


Just-In-Time: The Next Generation of Tailwind CSS

One of the hardest constraints we've had to deal with as we've improved Tailwind CSS over the years is the generated file size in development. With enough customizations to your config file, the generated CSS can reach 10mb or more, and there's only so much CSS that build tools and even the browser itself will comfortably tolerate.

For that reason, you've always had to be careful about expensive changes to your config file like adding too many extra breakpoints or enabling extra variants like disabled or focus-visible.

Today I'm super excited to share a new project we've been working on that makes these considerations a thing of the past: a just-in-time compiler for Tailwind CSS.

@tailwindcss/jit is a new experimental library that compiles all of your CSS on-demand as you author your template files, instead of generating your entire stylesheet up front.

This comes with a lot of advantages:

http://www.maltapianos.com/advert/ncaaw-march-madness-2021-georgia-vs-oregon-live-stream-womens-basketball-free/


http://www.maltapianos.com/advert/ncaaw-march-madness-wright-state-vs-missouri-st-live-stream-womens-basketball-free/


http://www.maltapianos.com/advert/ncaaw-march-madness-indiana-vs-belmont-live-stream-womens-basketball-free/


http://www.maltapianos.com/advert/womens-march-madness-free-louisville-vs-northwestern-live-stream-womens-basketball-free/


http://www.maltapianos.com/advert/march-madness-2021-free-arizona-vs-byu-live-stream-womens-basketball-free/


http://www.maltapianos.com/advert/watch-march-madness-free-texas-am-vs-iowa-state-live-stream-womens-basketball-free/

http://www.maltapianos.com/advert/watch-march-madness-2021-live-free-ucla-vs-texas-live-stream-womens-basketball-free/

http://www.maltapianos.com/advert/female-fight-serrano-vs-bermudez-live-stream-full-fight-boxing-free/


http://www.maltapianos.com/advert/watchfree-ncaaw-march-madness-2021-live-stream-womens-basketball-free/


https://blog.goo.ne.jp/livh/e/e1fb7a08404e51bf70df3fcd5bce1ab4


https://paiza.io/projects/03hzVLX4YJOA6l3bQbsFFg

https://www.deviantart.com/htfrttr/journal/Just-In-Time-The-Next-Generation-of-Tailwind-CSS-874226377


https://caribbeanfever.com/photo/albums/tailwind-css

    Lightning fast build times. Tailwind can take 3–8s to initially compile using our CLI, and upwards of 30–45s in webpack projects because webpack struggles with large CSS files. This library can compile even the biggest projects in about 800ms (with incremental rebuilds as fast as 3ms), no matter what build tool you're using.
    Every variant is enabled out of the box. Variants like focus-visible, active, disabled, and others are not normally enabled by default due to file-size considerations. Since this library generates styles on demand, you can use any variant you want, whenever you want. You can even stack them like sm:hover:active:disabled:opacity-75. Never configure your variants again.
    Generate arbitrary styles without writing custom CSS. Ever needed some ultra-specific value that wasn't part of your design system, like top: -113px for a quirky background image? Since styles are generated on demand, you can just generate a utility for this as needed using square bracket notation like top-[-113px]. Works with variants too, like md:top-[-113px].
    Your CSS is identical in development and production. Since styles are generated as they are needed, you don't need to purge unused styles for production, which means you see the exact same CSS in all environments. Never worry about accidentally purging an important style in production again.
    Better browser performance in development. Since development builds are as small as production builds, the browser doesn't have to parse and manage multiple megabytes of pre-generated CSS. In projects with heavily extended configurations this makes dev tools a lot more responsive.

Try it today by installing @tailwindcss/jit and swapping it into your PostCSS configuration:

npm install -D @tailwindcss/jit tailwindcss postcss autoprefixer

// postcss.config.js
module.exports = {
  plugins: {
    '@tailwindcss/jit': {},
    autoprefixer: {},
  }
}

We're shipping it as a separate library for now, but once we've worked out all the kinks we're going to roll it right back into tailwindcss behind a configuration option, and we're aiming to make it the default in Tailwind CSS v3.0 later this year.

Learn more about the project on GitHub, then install it, play with it, bend it, break it, and let us know what you think!



Category : general

Congress reconvenes to certify Bidens win after rioters breach Capitol

Congress reconvenes to certify Bidens win after rioters breach Capitol

- Congress reconvenes to certify Bidens win after rioters breach Capitol


Why Do People Take Dell DES-6321 Certification?

Why Do People Take Dell DES-6321 Certification?

- Have you ever pondered about the opening title? What would be your answer? By specializing in what enlivens


Cisco 300-635 Exam Dumps & Cisco Certified DevNet Professional, Cisco Certified DevNet Specialist, Cisco Certified Network Professional Data Center, Cisco Specialist PDF Dumps Certification

Cisco 300-635 Exam Dumps & Cisco Certified DevNet Professional, Cisco Certified DevNet Specialist, Cisco Certified Network Professional Data Center, Cisco Specialist PDF Dumps Certification

- 300-635 exam | 300-635 exam dumps | Cisco 300-635 exam | 300-635 practice exam | 300-635 actual exam | 300-635 braindumps | 300-635 questions & answers | 300-635 pdf dumps


Get Absolute Success in the 1Z0-1071 Exam at First Attempt:

Get Absolute Success in the 1Z0-1071 Exam at First Attempt:

- Everyone wants to pass the exam in first try. Visit CertsAdvice website for an easy preparation of your exam