Skip to content

Clean up CSSNumericValue.equals and remove assumption in last step. #452

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

Merged
merged 1 commit into from
Oct 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -767,15 +767,15 @@ The following are the arithmetic operations you can perform on dimensions:

2. Let |thisAndValues| be |this| prepended to |values|.

3. If all |item|s of |thisAndValues| do not belong to the same class return false. Example: all items in |thisAndValues| must be {{CSSUnitValue}}.
3. If all |item|s in |thisAndValues| do not belong to the same class return false. Example: all items in |thisAndValues| must be of type {{CSSUnitValue}}.

4. If all |item|s in |thisAndValues| are {{CSSUnitValue}s and have the same {{CSSUnitValue/unit}} and {{CSSUnitValue/value}} return true.
4. If all |item|s in |thisAndValues| are of type {{CSSUnitValue}} and have the same {{CSSUnitValue/unit}} and {{CSSUnitValue/value}} return true.

5. If all |item|s in |thisAndValues| are {{CSSMathValue}}s :
5. If all |item|s in |thisAndValues| are of type {{CSSMathValue}}:
1. If |thisAndValues| are all either {{CSSMathSum}}, {{CSSMathProduct}}, {{CSSMathMin}} or {{CSSMathMax}}, iterate over the {{CSSNumericArray}}s on |thisAndValues|,
1. For each {{CSSNumericValue}} in each of the {{CSSNumericArray}}s go back to step 1 to check that the {{CSSUnitValue}}s on all items in |thisAndValues| are equal.
2. If |thisAndValues| are all either {{CSSMathNegate}} or {{CSSMathInvert}}:
1. Go back to step 1 to check that the {{CSSUnitValue}} on all items in |thisAndValues| are equal.
1. Go back to step 1 to check that the {{CSSNumericValue}} on all items in |thisAndValues| are equal.
</div>


Expand Down