fresnel icon indicating copy to clipboard operation
fresnel copied to clipboard

Better structured Fresnel docs

Open alloy opened this issue 3 years ago • 2 comments

I think Fresnel is the type of project that could really benefit from better structured docs. Implementation wise it’s a pretty lean lib, but conceptually it does some complex things and the required negation of media queries (which is done for you with breakpoints but you have to do on your own for interactions) doesn’t help.

In any case, I recently found these docs to technical docs and think it could really help Fresnel instead of trying to cover it all in a single README.

alloy avatar Sep 02 '20 12:09 alloy

Note for documentation updates:

  • Add requirement that there's always a breakpoint of size 0 (maybe add a warning or error)
  • Add documentation around negation of all other rules when using orientation interactions

zephraph avatar Sep 02 '20 12:09 zephraph

Add documentation around negation of all other rules when using orientation interactions

It will be important to convey that the right way to think about rule implementations is:

  • we can only use display: none to hide elements that we do not want to show
  • so an interaction’s rule implementation must be written to match in all other cases than the one your rule cares about.

i.e. for an interaction rule that wants a container to be visible in landscape you want the implementation to match (and thus apply display: none) when the current media state is not landscape.

alloy avatar Sep 02 '20 12:09 alloy