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

How to allow css like ::-webkit-scrollbar ? #322

Closed
sikkamukul opened this issue Jan 4, 2022 · 6 comments
Closed

How to allow css like ::-webkit-scrollbar ? #322

sikkamukul opened this issue Jan 4, 2022 · 6 comments

Comments

@sikkamukul
Copy link

sikkamukul commented Jan 4, 2022

Attaching the sample code :-
::-webkit-scrollbar-thumb {
background: #888
}
Is being removed on sanitization from style tag
Kindly help to retain it after sanitization

@mganss
Copy link
Owner

mganss commented Jan 4, 2022

Unfortunately, this currently doesn't work due to an issue within AngleSharp.Css. See AngleSharp/AngleSharp.Css#98

Perhaps you can work around the issue by modifying your use case. Do you really want to allow users to input whole style sheets containing vendor specific selectors?

@sikkamukul
Copy link
Author

Yes, this use case allows users to enter psuedo elements in css style. Any workaround you would suggest for the same?

@mganss
Copy link
Owner

mganss commented Jan 4, 2022

No, can't think of a workaround 🤷🏻 Hopefully, this gets addressed by AngleSharp.Css soon.

@pragatibaheti
Copy link

Related doubt. Also, does it consider nested CSS classes (scss) in style tags while sanitization?

.some-class {
  &.another-class {}
}

@mganss
Copy link
Owner

mganss commented Jan 5, 2022

@pragatibaheti No, this isn't even supported by any browser: https://caniuse.com/css-nesting

mganss added a commit that referenced this issue Jan 6, 2022
Add test for #322
Remove beta label on package version
@mganss
Copy link
Owner

mganss commented Jan 6, 2022

Fixed in 7.0.473 (through AngleSharp 0.16.3)

@mganss mganss closed this as completed Jan 6, 2022
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

3 participants