Optimize header layout performance with flexbox mixins#6
Conversation
Codoki PR ReviewSummary: Fix flex order mapping, ensure legacy compatibility Issues (Medium)
Showing up to 2 medium issue(s). See inline suggestions for more details. Key Feedback (click to expand)
Confidence: 4/5 — Looks good; minor fixes (2 medium) React with 👍 or 👎 if you found this review useful. |
| } | ||
|
|
||
| @mixin order($val) { | ||
| -webkit-box-ordinal-group: $val; |
There was a problem hiding this comment.
🔷 Medium: Legacy WebKit/Gecko box-ordinal-group uses a 1-based index (default 1), while modern flexbox order is 0-based (default 0). Passing the same $val yields an off-by-one in older engines (e.g., @include order(3) results in legacy ordering as 2). Map legacy values to $val + 1 to keep ordering consistent across browsers.
| -webkit-box-align: $alignment; | ||
| -webkit-align-items: $alignment; | ||
| -ms-flex-align: $alignment; | ||
| -ms-align-items: $alignment; |
There was a problem hiding this comment.
🔷 Medium: -ms-align-items is not a valid property (IE10/11 use -ms-flex-align). Keeping it can cause warnings without effect. Removing it tightens compatibility without changing behavior.
No description provided.