Closed splashdust closed 2 months ago
Based on the included changeset, the following releases will be published as a result of this PR:
Note: If unpublished changesets where merged to main
after the first commit of this PR, this
list will include those changes in addition to the ones specific to this PR.
I have a feeling that we are making this too complicated and it will be tech debt... But it's at the same time soo good and creates an awesome DevEx! ☯️
Yes, it's a fine line! I think that we currently have a pretty good balance between complexity and value added, and we need to keep it that way. Let's discuss this further in light of the current feature set, and maybe we can refine a more final set of requirements, now that we have something concrete to look at.
As for this PR, most of the changes are just refactoring the original implementation to make it more maintainable and easier to understand. The new bit is pretty much just this: https://github.com/seb-oss/green/pull/1602/files#diff-d1a884735b6a1407454072cd84d9ba12577a8311d6a87f5be1b0a4f60dea2adcR107-R111
And these changes to how the final CSS is rendered: https://github.com/seb-oss/green/pull/1602/files#diff-d1a884735b6a1407454072cd84d9ba12577a8311d6a87f5be1b0a4f60dea2adcR168-R191
This PR adds support for specifying pseudo selectors like
:hover
,:focus
, etc, in Style Expression Properties.For example:
Sub-selectors are specified by prefixing a value sequence with
xxx:
, and selector/value sequences are terminated by;
The sub-selector will then be appended/merged with the base selector, ie:host(:xxx)
or.some-sel:xxx
. The;
is only mandatory when there are more than one sequence, meaning that this upgrade will be backwards-compatible with existing expressions.Here is a slightly more realistic example, changing the border and padding on hover: