-
Notifications
You must be signed in to change notification settings - Fork 3
Labels
bugSomething isn't workingSomething isn't working
Description
According to the CSS standard (MDN Reference), when an element uses position: static, the properties top, left, right, and bottom should be ignored. However, in the current implementation of JSAR Runtime, these properties are still effective and alter layout for elements with position: static.
Expected behavior:
- For elements with
position: static, the propertiestop,left,right, andbottommust have no effect (should be ignored by the layout engine).
Actual behavior:
- In JSAR Runtime, applying
top,left,right, orbottomto a statically positioned element affects its rendered position, which is a deviation from the web standard.
References:
Steps to reproduce:
- Create a simple HTML file with an element styled as
position: staticand non-zerotop/leftvalues. - Observe that the element is offset in JSAR but not in standard browsers.
Impact:
- This results in layout incompatibility with web standards and other browsers (Chromium, Gecko, etc.).
Suggestion:
- Update the layout engine so that when an element's
positionisstatic, thetop,left,right, andbottomproperties are ignored during layout calculation.
Web标准参考:
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working