purescript-contrib / purescript-css

A clean, type-safe library for describing, manipulating and rendering CSS
Apache License 2.0
106 stars 40 forks source link

Support for calc expressions. Addresses #55. #140

Closed nsaunders closed 2 years ago

nsaunders commented 2 years ago

Description of the change This change adds support for [calc expressions](https://developer.mozilla.org/en-US/docs/Web/CSS/calc()) (see #55). This is pretty much a direct port from Clay, which appears to be the original basis for this library. In the process of implementing this feature, I've also aligned the size data types with Clay, which is obviously a significant breaking change but hopefully a worthwhile one...

For reference, here are the relevant modules in Clay for comparison:

  1. src/Size.hs
  2. src/Border.hs
  3. src/Gradient.hs
  4. src/Media.hs

Checklist:

jamesdbrock commented 2 years ago

Thanks for this PR!

jamesdbrock commented 2 years ago

I don't know anything about this library and I'm interested in your comment that Clay appears to be the original basis for this library. If that's true then I think we should add that information to the README for the library, to provide a reference point for new users.

thomashoneyman commented 2 years ago

@nsaunders We're looking for maintainers to help with purescript-css (reviewing PRs and/or contributing). This is a great PR -- would you be interested in being added as a collaborator to this repository?

nsaunders commented 2 years ago

@thomashoneyman thanks for the comment... I'm glad I was able to provide some value here and would be happy to help out more in the future. 👍

thomashoneyman commented 2 years ago

Great! I've added you as a collaborator to this repository with maintainer's access. (cc: @jamesdbrock)