Add shadow alias for elevation
@madeleineostoja I've gone with the naive approach for #64 here π
I thought it might be cool to provide some kind of "alias" map to formatModule, that way things can easily be aliased and you don't need to worry about duplication. For this naive solution, any change to "elevation" would require "shadow" to be updated too. I'm happy to explore that some more if you think that's a better way forward ππΌ
Approach 1: https://github.com/heybokeh/pollen/pull/65/commits/451c93e796f8133ae182c1e56ac55bd20549fb24 (naive) Approach 2: https://github.com/heybokeh/pollen/pull/65/commits/40cdc51620c51394e6eb0fafa60c7f7e3e608cb1 (more flexible/scalable)
Wow express! Thanks for this! I'm not even 100% sure on replacing elevation with shadow anymore after reading some more comments, but this is great. What's your take re: the names?
If we were to replace elevation with shadow then the basic approach makes more sense. If Pollen was to support true aliases then the other approach is a solid start. I feel like that's something that could be exposed via config as well, though I'm not sure on the utility of aliases, probably just muddies the waters for consumers of a design system (pollen's defaults or a custom one)
What's your take re: the names?
IMO shadow is more obvious than elevation but since that would be a breaking change I can see the dilemma π
Yeah I think it is probably a good change. Someone mentioned that elevation makes a lot of semantic sense (ie: conveys layers rather than just misc shadow effects), but idk. I might just leave it open for now and see if anyone else wants to weigh in. At the end of the day can always merge and just strip one or the other out next major version, in the meantime itβs just whatever we put in the docs