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

Save selection keeps not selected html elements as display: none #1613

Open
condemil opened this issue Nov 6, 2024 · 2 comments
Open

Save selection keeps not selected html elements as display: none #1613

condemil opened this issue Nov 6, 2024 · 2 comments

Comments

@condemil
Copy link

condemil commented Nov 6, 2024

Is your feature request related to a problem? Please describe.

When I use "Save selection" I see that the saved html file have many html elements with style="display:none !important". I have "remove hidden contents" option enabled. I suppose it's an intended behavior.

Describe the solution you'd like

It would be nice to have an option to save as small html file as possible without other html elements around selected html tag. If it's possible it will be great to avoid saving unused css as well.

Describe alternatives you've considered (optional)

Additional context (optional)

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Nov 10, 2024

It's indeed the intended behavior in order to make sure the stylesheets will continue to work. SingleFile would have to rewrite the CSS selectors in order to make sure the feature you're suggesting would work reliably.

@condemil
Copy link
Author

condemil commented Nov 11, 2024

As a start it would be nice to remove all siblings under the html tree and leave only one branch to the selected element. This shouldn't require any stylesheet updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants