Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

trigger a custom event 'StyleFixProcessed' #6134

Merged
merged 2 commits into from
Dec 12, 2017
Merged

trigger a custom event 'StyleFixProcessed' #6134

merged 2 commits into from
Dec 12, 2017

Conversation

joyously
Copy link
Contributor

Add a custom event 'StyleFixProcessed' to indicate when the styles are fixed.
This is needed for situations that entail further processing, such as described in #6132

Add a custom event 'StyleFixProcessed' to indicate when the styles are fixed.
This is needed for situations that entail further processing, such as described in #6132
Split variable handling into two parts so fallback handling could be recursive.
Fixed fallback whitespace and nested variable handling.
Parsing now handles more cases with parentheses.
Addresses #6132 by using new custom event to get the last value of variables after they are all processed (which meant a little bit of duplicated code for the second pass).
@joyously joyously mentioned this pull request Dec 12, 2017
@LeaVerou
Copy link
Owner

What about when there are multiple stylesheets, and multiple StyleFix rules? Do you fire one or more events? If one, does it fire correctly at the end?

Also, it seems you accidentally included some other changes in this PR?

@joyously
Copy link
Contributor Author

The event is for when all of the process function is finished, which is after handling the multiple stylesheets and rules.
And the other changes are intentional. The event is needed for the fallback fix that I included.

@LeaVerou LeaVerou merged commit abb8ba2 into LeaVerou:gh-pages Dec 12, 2017
@LeaVerou
Copy link
Owner

Merged, thanks.
Should I close the other PR then?

@joyously
Copy link
Contributor Author

Yes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants