Git Product home page Git Product logo

flair's Introduction

Donate to the ACLU | Shutdown ICE


Hi there 👋😄,

My name is Rico Kahler (he/him) and I build consumer-facing websites and apps as well as developer-facing tools.

I care deeply about UX, DX, performance, a11y, and SEO. I specialize in the tooling + React space and also work with serverless architectures and infrastructures using platforms like Vercel and frameworks like Serverless.

Most of my open source these days revolves around Next.js and Sanity.

Checkout my projects 👇 or say hi if you feel like it.

💛 JavaScript

✔️ Next.js

🌶 Sanity

💻 Apps

⚛️ React

  • hacker-ui — a work-in-progress component library
  • flair — a work-in-progress CSS-in-JS lib for React
  • hocify — converts hooks to HOCs for compatibility with class-based components.
  • react-mounting-transition — helps you add transitions to components you dynamically mount to the DOM

flair's People

Contributors

julespatry avatar renovate-bot avatar renovate[bot] avatar ricokahler avatar

Stargazers

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

Watchers

 avatar  avatar

flair's Issues

Roadmap

This is a preliminary list of todo list items and ideas I've had. This list is not exhaustive and I'll be adding to this over time. Please feel free to comment or +1 with any small feature requests. (Though you may want to open an issue for bigger feature requests).

A note on timelines: currently, there is no timeline for a stable 1.0 release. I can only see that happening with increased usage and different scenarios. In particular, this lib is being concurrently built with my component library, Hacker UI. When that project is stable, this project will also be stable.

  • atomic css-in-js (big)
  • [docs] A pretty website
  • [feature] Ability to reference current component class names. e.g. styles from style function args (to access class names for selectors)
  • [feature] object expressions like linaria
  • [feature] gatsby support via a react-style-system gatsby plugin
  • [feature] next.js support
  • [feature] support re-exports for libs (i.e. allow importing react-style-system from somewhere else)
  • [bug] transformCssTemplateLiteral: don't wrap staticVar expressions in template literal strings (just inline it)
  • [bug] when babel transforms with a @babel/preset-env env that transpiles template literal strings, it removes spaces and strings in between expressions
  • [improvement] automatic detection of whether an expression can be automatically staticVared.
  • [improvement] better error messages on "failed to execute"
  • [improvement] upgrade to stylis 4

A big feature that I want to add (and will become quite an essential feature) is the ability to compile to atomic css-in-js. I have another repo that implements this here atomic-css-in-js

General feedback

Hiya! I tried out the lib here:
https://codesandbox.io/s/empty-moon-eo93i?file=/src/App.js

Here's some feedback, I only skirted though the docs (sorry! 🙏 ) so please forgive me if some of these are already addressed. For some context, I have only used styled-components-liked solutions and am not familiar with material-ui.

  • I noticed that react-style-system requires a bit of setup to get going. ThemeProvider and ColorContextProvider seem to be required. I wonder if these can be optional until users need them; it'll make trying out easier.

  • It wasn't clear why ColorContextProvider is separated from ThemeProvider. Could they be combined?

  • I found it a bit awkward to specify the root component's element type as the second argument of useStyles. I'm sure there's a technical limitation at play here, but I'd find something like this more intuitive:

const useStyles = createStyles(({ css, theme }) => ({
  card: css` padding: 1rem; `,
  title: css` color: blue; `
}))

const Card = ({ children }) => {
  const { card, title } = useStyles()
  return (
    <div className={card}>
      <h1 className={title}>{ children }</h1>
    </div>
  )
}

Or at least something like

const Card = ({ children }) => {
  const { Root, styles } = useStyles()
  return (
    <Root type="main">
      <h1 className={style.title}>{ children }</h1>
    </Root>
  )
}

Curious to hear your thought, it's a cool lib! 👍

Upgrade to Stylis 4

thysultan has recently dropped stylis 4 which has a bunch of new feature including the ability to get to the AST of the stylis language.

This is kind of awesome because this lib can use that AST to do more direct and less buggy transformations for SSR mode (bye bye regex lol).

As an added bonus, stylis 4 has a significantly smaller bundle which would make the standalone bundle go down to about ~5kB. That would make us smaller than JSS and emotion!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @babel/plugin-proposal-class-properties Unavailable
npm @babel/polyfill Unavailable
npm @types/classnames Unavailable
npm babel-eslint Available
npm gatsby-image Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency eslint to v7.32.0
  • Update testing-library monorepo (@testing-library/jest-dom, @testing-library/react, @testing-library/user-event)
  • Update dependency eslint to v9
  • Update dependency jest to v29
  • Update gatsby monorepo (major) (gatsby-image, gatsby-plugin-manifest, gatsby-plugin-offline, gatsby-plugin-react-helmet, gatsby-plugin-sharp, gatsby-source-filesystem, gatsby-transformer-sharp)
  • Update testing-library monorepo (major) (@testing-library/jest-dom, @testing-library/react, @testing-library/user-event)
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • Update babel monorepo (@babel/core, @babel/generator, @babel/plugin-proposal-class-properties, @babel/plugin-transform-runtime, @babel/polyfill, @babel/preset-env, @babel/preset-react, @babel/preset-typescript, @babel/runtime, @babel/template, @babel/traverse, @babel/types)
  • Update gatsby monorepo (gatsby-image, gatsby-plugin-manifest, gatsby-plugin-offline, gatsby-plugin-react-helmet, gatsby-plugin-sharp, gatsby-source-filesystem, gatsby-transformer-sharp)
  • Update typescript-eslint monorepo to v3.10.1 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v2
  • actions/setup-node v1
.github/workflows/check-dependencies.yml
  • actions/checkout v2
  • actions/setup-node v1
.github/workflows/compressed-size.yml
  • actions/checkout v2
  • preactjs/compressed-size-action v2
.github/workflows/run-tests.yml
  • actions/checkout v2
  • actions/setup-node v1
npm
example-sites/create-react-app/package.json
  • @testing-library/jest-dom 5.11.0
  • @testing-library/react 10.4.3
  • @testing-library/user-event 12.0.11
  • react 16.13.1
  • react-dom 16.13.1
  • react-scripts 3.4.1
example-sites/gatsby/package.json
  • gatsby 2.23.11
  • gatsby-image 2.4.9
  • gatsby-plugin-manifest 2.4.14
  • gatsby-plugin-offline 3.2.13
  • gatsby-plugin-react-helmet 3.3.6
  • gatsby-plugin-sharp 2.6.14
  • gatsby-source-filesystem 2.3.14
  • gatsby-transformer-sharp 2.5.7
  • polished 3.6.5
  • prop-types 15.7.2
  • react 16.13.1
  • react-dom 16.13.1
  • react-helmet 6.1.0
  • canvas 2.6.1
  • prettier 2.0.5
package.json
  • @babel/core 7.9.6
  • @babel/generator 7.9.6
  • @babel/plugin-proposal-class-properties 7.8.3
  • @babel/plugin-transform-runtime 7.9.6
  • @babel/polyfill 7.8.7
  • @babel/preset-env 7.9.6
  • @babel/preset-react 7.9.4
  • @babel/preset-typescript 7.9.0
  • @babel/runtime 7.9.6
  • @babel/template 7.8.6
  • @babel/traverse 7.9.6
  • @babel/types 7.9.6
  • @color2k/compat 1.0.0-rc.5
  • @rollup/plugin-babel 5.0.4
  • @rollup/plugin-node-resolve 8.1.0
  • @types/babel__core 7.1.9
  • @types/babel__traverse 7.0.12
  • @types/classnames 2.2.10
  • @types/common-tags 1.8.0
  • @types/node 13.13.12
  • @types/react 16.9.41
  • @types/require-from-string 1.2.0
  • @types/webpack 4.41.18
  • @typescript-eslint/eslint-plugin 3.4.0
  • @typescript-eslint/parser 3.4.0
  • babel-eslint 10.1.0
  • babel-plugin-module-resolver 4.0.0
  • canvas 2.6.1
  • classnames 2.2.6
  • color2k 1.0.0-rc.5
  • common-tags 1.8.0
  • eslint 7.3.1
  • eslint-config-react-app 5.2.1
  • eslint-plugin-flowtype 5.1.3
  • eslint-plugin-import 2.21.2
  • eslint-plugin-jsx-a11y 6.3.1
  • eslint-plugin-react 7.20.0
  • eslint-plugin-react-hooks 4.0.4
  • folder-hash 3.3.2
  • jest 26.1.0
  • jsdom 16.2.2
  • pirates 4.0.1
  • prettier 2.0.5
  • react 16.13.1
  • react-dom 16.13.1
  • react-test-renderer 16.13.1
  • require-from-string 2.0.2
  • rollup 2.18.0
  • semver 7.3.2
  • typescript 3.9.5
  • uid 1.0.0
  • webpack 4.43.0
  • @babel/preset-typescript ^7.0.0
  • @babel/preset-env ^7.0.0
  • @babel/preset-react ^7.0.0
  • @babel/plugin-proposal-class-properties ^7.0.0
  • @types/react ^16.8.0
  • react ^16.8.0
packages/babel-plugin-plugin/package.json
  • @babel/traverse 7.9.6
  • @babel/types 7.9.6
  • @types/node 13.13.12
packages/collect/package.json
  • @babel/core 7.9.6
  • @babel/polyfill 7.8.7
  • @babel/generator 7.9.6
  • @babel/plugin-proposal-class-properties 7.8.3
  • @babel/template 7.8.6
  • @babel/traverse 7.9.6
  • @babel/types 7.9.6
  • babel-plugin-module-resolver 4.0.0
  • @types/common-tags 1.8.0
  • @types/node 13.13.12
  • common-tags 1.8.0
  • pirates 4.0.1
  • require-from-string 2.0.2
  • @types/require-from-string 1.2.0
  • @babel/preset-typescript ^7.0.0
  • @babel/preset-env ^7.0.0
  • @babel/preset-react ^7.0.0
  • @babel/plugin-proposal-class-properties ^7.0.0
packages/common/package.json
packages/core/package.json
  • color2k 1.0.0-rc.5
  • @babel/runtime 7.9.6
  • @types/react ^16.8.0
  • react ^16.8.0
packages/flair/package.json
packages/loader/package.json
packages/ssr/package.json
  • @types/classnames 2.2.10
  • classnames 2.2.6
  • @babel/runtime 7.9.6
  • @types/react ^16.8.0
  • react ^16.8.0
packages/standalone/package.json
  • @types/classnames 2.2.10
  • classnames 2.2.6
  • uid 1.0.0
  • @babel/runtime 7.9.6
  • @types/react ^16.8.0
  • react ^16.8.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.