critters
goober
critters | goober | |
---|---|---|
7 | 5 | |
3,374 | 3,034 | |
0.4% | - | |
6.6 | 3.2 | |
2 months ago | 9 days ago | |
JavaScript | JavaScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
critters
-
Show HN: Jampack β Optimizes static websites as a post-processing step
I'm interested in the notion of identifying "critical" CSS that should be inlined rather than live in its own stylesheet.
I was hoping there was some principled way of identifying critical and non-critical CSS (e.g. user interaction effects like :hover would always be considered non-critical), but it looks like the library it's using just tries to render your page and do a best-effort detection on which rules are considered critical, which is a little unsatisfying: https://github.com/GoogleChromeLabs/critters
-
Optimize CSS with SAT Solving
https://github.com/GoogleChromeLabs/critters Might be a good starting point. Itβs designed to inline the css afterward so itβs more focused on extracting used css than removing unused.
-
Critical CSS and Next.js App Directory
With the Pages dir, we had experimental support for critters. That was good enough for me
-
Remove CSS Styles and Apply Styles to All Elements
Critters does something similar but it is intended to inline only the CSS that is visible upon the page load (top of the page). There is also a Vite plugin that inlines everything that is possible to inline
-
Optimizing CSS Performance in Nuxt with Critters
// nuxt.config.js import { defineNuxtConfig } from 'nuxt' export default defineNuxtConfig({ modules: ['@nuxtjs/critters'], critters: { // Options passed directly to critters: https://github.com/GoogleChromeLabs/critters#critters-2 config: { // Default: 'media' preload: 'swap', }, }, })
-
Critical CSS? Not So Fast
I find critters[0] quite easy to work with and well worth implementing on my nextjs or Astro projects.
I build a lot of landing pages so there are very few multi page visits.
[0] https://github.com/GoogleChromeLabs/critters
-
Vue Webpack - possible to extract some CSS but not all?
Doesn't critters do this already? https://github.com/GoogleChromeLabs/critters I could be wrong though
goober
-
A new paradigm
Then, there's goober, a minimalistic framework-agnostic css-in-js component library. You'll probably find more examples of modern yet frugal tools and libraries.
-
Zero runtime CSS-in-JS : Is this where great DX meets top-notch Web Performance? (sharing our experience)
Consider adding Goober too to the mix.
- Show HN: Goober.rocks
-
The tiniest CSS-in-JS solution for your open-source React components
The entirety of react-colorful costs about 2 KB, but installing emotion would make the size of the package almost 7 times bigger. Of course, there are tiny CSS-in-JS libraries like goober that cost about 1KB, but we didn't feel like we need the entire library since our styles are not dynamic.
-
Hey sub! I finally completed my upload component that I posted quite a while ago. (Link to the prev post in comments). Published it on NPM under react-upload-box. Check comments for complete description. Feedbacks are welcome.
Could also swap out that huge styled-components dep for something like goober
What are some alternatives?
compression-webpack-plugin - Prepare compressed versions of assets to serve them with Content-Encoding
styled-components - Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress π
critters - CSS optimization using critters for Nuxt
vue-emotion - Seamlessly use emotion (CSS-in-JS) with Vue.js
webpack-assets-manifest - This webpack plugin will generate a JSON file that matches the original filename with the hashed version.
react-upload-box - A minimal Upload component for React.
mangle-css-class-webpack-plugin - Minifies and obfuscates the class names in your existing JavaScript, CSS, and HTML without any modern css modules.
SauceKudasai - Get Anime info by image or URL (uses trace.moe and Anilist for animeinfo)
critical - Extract & Inline Critical-path CSS in HTML pages
Microbundle - π¦ Zero-configuration bundler for tiny modules.
penthouse - Generate critical css for your web pages
tobii - An accessible, open-source lightbox with no dependencies