Skip to content
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

ul inside p tag cause p tag to automatically close #9

Open
wanton7 opened this issue Jan 14, 2019 · 0 comments
Open

ul inside p tag cause p tag to automatically close #9

wanton7 opened this issue Jan 14, 2019 · 0 comments

Comments

@wanton7
Copy link

wanton7 commented Jan 14, 2019

There is ul tag inside p tag at src/components/app/index.marko. I was noticing visible element padding change after initial rendering in browser. Found the cause, it was because ul is block-level element and causes p to automatically close. It means that browser will render ul outside p tag even if it's inside it in HTML markup. It seems that JavaScript rendering will allow ul inside p and when JavaScript render code runs it will move ul inside p tag.
More info https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p and https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements

            <p>
                <b>Checked</b>:
                <ul>
                    <for(key,value in state.checked)>
                        <li if(value)>
                            ${key}
                        </li>
                    </for>
                </ul>
            </p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant