-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pure selectors mark all children pure #72
base: master
Are you sure you want to change the base?
Conversation
47212eb
to
11d7986
Compare
11d7986
to
55d9b43
Compare
Let's solve them here
Otherwise it can be a problem for some developers |
You are absolutely right - but maybe you got me wrong.
That part is unchanged - same as on master. In this pr I only improved the mentioned cases because they are more common and easier to detect. To fix the unchanged case above we must change the entire logic how we detect pure selectors. For now please lets merge already this part as it is independent, it works and will already unblock these cases |
I don't sure we have a valid logic here, because
===
but the second is not pure Why do you think your examples are valid? |
Oh wow - it looks you are absolutely right - I need some time to analyse what's wrong here |
Feel free to ping me |
Because they are valid according to |
hm, I tried to find any docs about what is
Before merge, otherwise logic will be completed and can create dangerous problems, developers can start to write wrong things and after fix them some project can be broken |
9befc8c
to
6cea2d6
Compare
I added a test for this case which shows that
However
So we don't allow something which will be broken in future |
@alexander-akait lightning is currently working on something similar: |
@jantimon Sorry for the delay, I missed your answer, can you list the unsolved cases, I will help with them |
the only missing case would be this one:
can we first merge #74 to have better tests? |
@jantimon Let's add only test cases (more the better 😄 ) here and I will finish it tomorrow and we will make release |
follow up on #64
adds more valid cases for nested css:
.foo { span { a_value: some-value; } }
which is pure.foo { span { a { a_value: some-value; } } }
which is pure.foo, html { span { a_value: some-value; } }
which is not purea case which I could not solve (and would probably be a separate pr) is the following one:
html { .foo { a_value: some-value; } }
should be purehtml { a_value: some-value; .foo { a_value: some-value; } }
must stay non-pure