-
Notifications
You must be signed in to change notification settings - Fork 2
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
, andbottom
must have no effect (should be ignored by the layout engine).
Actual behavior:
- In JSAR Runtime, applying
top
,left
,right
, orbottom
to 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: static
and non-zerotop
/left
values. - 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
position
isstatic
, thetop
,left
,right
, andbottom
properties are ignored during layout calculation.
Web标准参考:
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working