chinchang / web-maker

A blazing fast & offline frontend playground
https://webmaker.app
MIT License
2.55k stars 314 forks source link

self closing tags not working #474

Closed chhavi-khandelwal closed 2 years ago

chhavi-khandelwal commented 2 years ago

Meta info

does not behave as
. their position differs when they are absolutely positioned.

chinchang commented 2 years ago

Didn't get it exactly. What are absolutely positioned? Screenshot please :) PS: Good to see you still using it. :)

chhavi-khandelwal commented 2 years ago
chinchang commented 2 years ago

Ah I see. Well, 2 things here:

  1. DIV isn't a self-closing element by standard
  2. Web Maker simply puts your written HTML in the DOM, the final DOM created is how browsers do it. And from what I see, <div /> is the same as <div> now. That is self-closing div is enclosing the tags after it. This is a browser behavior change it seems in the latest version of Chrome.
chhavi-khandelwal commented 2 years ago

aah! Thanks! Didn't know that.