~alcinnz/haskell-stylist

9503b788ebd61a6fdf6b5213a3abd8df7c7f2dcb — Adrian Cochrane 4 years ago 93288be
Moved to personal git homeserver, copy ISSUES over from NZOSS.
A ISSUES/func-psudoclasses.md => ISSUES/func-psudoclasses.md +13 -0
@@ 0,0 1,13 @@
# Functional psuedoclasses
These would mostly need to be added to the interpretor.

* [ ]  :not()
* [ ]  :dir()
* [ ]  :is()
* [ ]  :lang()
* [ ]  :nth-child()
* [ ]  :nth-last-child()
* [ ]  :nth-of-type()
* [ ]  :nth-last-child()
* [ ]  :where()
* etc

A ISSUES/help-wanted/animation.md => ISSUES/help-wanted/animation.md +15 -0
@@ 0,0 1,15 @@
# Add animation infrastructure
This would require callers to seperate logic for desugaring CSS properties
(and resolving relative units) from parsing CSS tokens to a style tree! This
would also help implement calc(), and somewhat generically handle `inherit`.

Can be implemented as a PropertyParser decorator.

---

It occurs to me that this could be easily hand-tested by writing a commandline
program which displays computed values (relative to initial values) for a style
declaration.

That might even be useful program! Though ofcourse it shouldn't replace
automated testing.

A ISSUES/help-wanted/css-content.md => ISSUES/help-wanted/css-content.md +18 -0
@@ 0,0 1,18 @@
# CSS Text-preprocessing Properties
There should be a reusable `PropertyParser` that resolves content-generation CSS
properties, so that callers only need to deal with plain text.

* [ ]  content:
* [ ]  text-transform:
* [ ]  unicode-bidi:
* [ ]  white-space:
* [ ]  counter-reset:
* [ ]  counter-increment:
* [ ]  counter-set:
* [ ]  content: counter()
* [ ]  @counter-style
* Lists?
* Others?

It occurs to me that maybe I should upstream Rhapsode's counters implementation
to get this started.

A ISSUES/namespaces.md => ISSUES/namespaces.md +4 -0
@@ 0,0 1,4 @@
# @namespace
https://developer.mozilla.org/en-US/docs/Web/CSS/@namespace

This would also imply supporting namespace queries elsewhere as well.

A ISSUES/psuedoclass-lowering.md => ISSUES/psuedoclass-lowering.md +19 -0
@@ 0,0 1,19 @@
# Provide API to lower non-functional psuedoclasses
It may be simpler, though less featureful[1], to implement interactive
psuedoclasses as if they were psuedoelements. That way when the style
tree has been interacted, we can retrieve the altered styles rather than
reapply the full stylesheet.

Many other psuedoclasses are equivalent to other selectors, especially if the
caller doesn't implement certain interactions.

As such there should be a StyleSheet decorator that can be configure to perform
these tasks.

## Notes
1. Rewriting psuedoclasses to psuedoelements would not allow a browser to support
selectors like ":hover li" that are popularly used to create offline-interactive
pages without JavaScript.

However it is probably wise to discourage such patterns, as they do not
communicate necessary state to accessibility tools.

M README.md => README.md +5 -3
@@ 18,11 18,13 @@ If these ultimately call down into a `Data.CSS.Syntax.Style.QueryableStyleSheet`
`PropertyParser` allows to declaratively (via Haskell pattern matching) specify how to parse CSS properties, and how they're impacted by CSS inheritance. It has four methods: `longhand` and `shorthand` specify how to parse CSS properties, whilst `temp` and `inherit` specifies what the default values should be.

## Contributing
You can contributed code or register "issues" to Haskell Stylist by contacting me (Adrian Cochrane) via [mastodon](https://floss.social/@alcinnz/) or [email](mailto:adrian@openwork.nz). Or you can sign up for an account on the NZ OSS GitLab.
You can contributed code or register "issues" to Haskell Stylist by contacting me (Adrian Cochrane) via [mastodon](https://floss.social/@alcinnz/) or [email](mailto:adrian@openwork.nz)..

If you're contributing code you can link me to where you're hosting your git fork, or send [a patch file](https://git-send-email.io/). Or if you simply to ask for more features or fixes don't hesitate to contact me!
If you're contributing code you can link me to where you're hosting your git fork, or send [a patch file](https://git-send-email.io/). Or if you simply want to ask for more features or fixes don't hesitate to contact me!

Feel free to mirror this repo elsewhere! Just tell me about it so I can watch that mirror for contributions.

### Building
1. Install `ghc` and `cabal-install`. (Debian package names listed here)
2. From within the git repository, run `cabal install`. This'll compile Stylist and all it's other dependencies.
3. Run `cabal test` after every change you make.
\ No newline at end of file
3. Run `cabal test` after every change you make.