Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polished Roadmap #397

Closed
10 of 14 tasks
bhough opened this issue Jan 30, 2019 · 8 comments
Closed
10 of 14 tasks

Polished Roadmap #397

bhough opened this issue Jan 30, 2019 · 8 comments
Labels

Comments

@bhough
Copy link
Contributor

bhough commented Jan 30, 2019

v4.0.0

New Modules

  • Important Helper - Add a helper for adding important flags to existing modules.
  • CSS Logical Properties - Add a mixin for leveraging logical properties with proper fallbacks.

Module Improvements

  • ellipsis - add support for multiline ellipsis.
  • fontFace - add local font file checking to avoid unnecessarily downloading remote font.
  • Color Modules - optimize HSL(A) color detection to avoid converting and recovering hsl values.
  • timingFunctions - separate timing functions into their own modules.
  • cssVar - allow default values to be passed when a value is not found for a css-variable

Other Improvements

  • Test Rewrite - Rewrite testing to use specific expect statements instead of snapshot tests.
  • Integration Testing - Adding integration testing with styled-components and emotion and in browser and non-browser environments.

Bug Fixes

  • fluidRange - currently does not work with REMs, we will be investigating why this is breaking and attempt to provide support for REMs/EMs.
  • triangle - restore the ability to leverage inherit.

Breaking Changes

  • Make presets optional - Several of our modules leverage large preset objects to provide commonly used values. The majority of users don't leverage these, yet everyone takes the bundle size hit for them. In v4, we will re-working those modules to take these as optional imports and providing a way for users to provide additional presets. This includes a variety of color modules and the math module.
  • stripUnit - After much discussion, we will be keeping getValueAndUnit and returning stripUnit to its previous functionality. This makes the functionality the same as the named method, simplifies typing (that we previously had to make very forgiving), and keeps the more commonly used method smaller. **Therefore, the return unit functionality in stripUnit will be deprecated in v4.
  • readableColor - strict mode will become the default behavior in v4 and will need to be explicitly turned off to use non-contrast-compliant return colors.

Other

We will be revamping the contributor experience. This will include simplifying the build, leveraging GitHub functionality to make it easier to contribute and make feature requests, starting a support Slack, among other things.

Updated as of 8/18/2020

@bhough bhough added the WIP label Jan 30, 2019
@bhough bhough pinned this issue Jan 30, 2019
@wtgtybhertgeghgtwtg
Copy link
Contributor

In regards to the third bullet point (and please let me know if I should raise this in another issue instead), would that include integrating it as a macro, as styled-components does?

@bhough bhough changed the title V4 Roadmap Roadmap Mar 9, 2019
@bhough bhough changed the title Roadmap Polished Roadmap Mar 9, 2019
@bhough
Copy link
Contributor Author

bhough commented Mar 11, 2019

@wtgtybhertgeghgtwtg It would be a separate ask, but certainly something we'd be open to doing.

@oliviertassinari
Copy link

Bundle size would be great. We have private color helpers on Material-UI side. People ask us to expose them. I was curious to see if we could drop them for polished: mui/material-ui#15540.

@bhough
Copy link
Contributor Author

bhough commented May 3, 2019

@oliviertassinari Reached out on that PR. Would love to work with you to allow you to use polished for this, especially if it is just a matter of working on bundle size.

@el1f
Copy link

el1f commented Nov 13, 2019

Regarding point 3: docs redesign
I was wondering whether that's still up for grabs? I'd love to take a spin at designing a new doc for this lib :)

@ricokahler
Copy link

There were a few discussions on bundle size here so I thought I would share.

I recently released color2k which is a color lib I built specifically to have a small bundle size (1.5kB).

The big secret there is to use canvas to parse colors to rgba. This removes the need for larger files like _nameToHex and streamlines conversions to other color types (e.g. always parse to rgba then to any other color format).

There's definitely some tradeoffs with approach, namely parsing speed and an extra node compatibility package but I think these tradeoffs are worth it. Hopes this piques your interest!


P.S. Thanks for polished! color2k wouldn't exist without it.

@oliviertassinari
Copy link

@ricokahler Smart! Would it support colors outside the the sRGB color space, for instance https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/?

@ricokahler
Copy link

@oliviertassinari Thanks! I answered your question over here 👆because it's off topic in this thread

@bhough bhough closed this as completed Sep 20, 2020
@bhough bhough unpinned this issue Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants