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

HTMLElement.outerHTML miss style.aspectRatio #1147

Open
infeng opened this issue Oct 27, 2023 · 2 comments · May be fixed by #1537
Open

HTMLElement.outerHTML miss style.aspectRatio #1147

infeng opened this issue Oct 27, 2023 · 2 comments · May be fixed by #1537
Labels
bug Something isn't working easy fix good first issue Good for newcomers

Comments

@infeng
Copy link

infeng commented Oct 27, 2023

Describe the bug
I set style.aspectRatio on HTMLElement, but HTMLElment.outerHTML can not contain aspectRatio

To Reproduce
Steps to reproduce the behavior:

const { Window } = require('happy-dom');

const window = new Window({
	url: 'https://localhost:8080',
	width: 1024,
	height: 768
});

const div = window.document.createElement('div');
div.style.aspectRatio = '100/200';
div.style.width = '100%';

console.log(div.outerHTML);

actual output: <div style="width: 100%;"></div>

Expected behavior
expect output: <div style="aspect-ratio: 100 / 200; width: 100%;"></div>

Device:

  • OS: mac
  • Browser node
  • Version 16.20.1

Additional context
Add any other context about the problem here.

@infeng infeng added the bug Something isn't working label Oct 27, 2023
@capricorn86
Copy link
Owner

Thank you for reporting @infeng! 🙂

It seems like we are missing support for aspectRatio in CSSStyleDeclaration and aspect-ratio CSSStyleDeclarationPropertyManager

@yinm
Copy link

yinm commented Sep 7, 2024

Can I try it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy fix good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants