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

Sanitizer removes CSS that exists #2259

Closed
octoper opened this issue May 5, 2019 · 8 comments · Fixed by #2260
Closed

Sanitizer removes CSS that exists #2259

octoper opened this issue May 5, 2019 · 8 comments · Fixed by #2260
Milestone

Comments

@octoper
Copy link

octoper commented May 5, 2019

Hello,

I'am using Tailwind CSS for my theme.
The AMP CSS Sanitizer dont recognize's CSS classes like this

<div class="bg-black w-16 lg:w-full hover:bg-blue"></div>

and removes them from CSS can you change that so it supports them??

@westonruter
Copy link
Member

Please share the CSS that is getting removed.

I'm surprised to see the colons in the class names.

@octoper
Copy link
Author

octoper commented May 5, 2019

This is my CSS class

.lg\:w-full {
    width: 100%;
}

@westonruter
Copy link
Member

Thanks. It could also be a problem with the PHP CSS parser. I'll investigate.

@westonruter
Copy link
Member

@vaggelisifantis I've found a fix. Please test the build attached to the PR here: #2260.

@westonruter westonruter added this to the v1.1.2 milestone May 5, 2019
@westonruter
Copy link
Member

I found a bug. Don't test yet.

@westonruter
Copy link
Member

@vaggelisifantis ok, bug fixed. Please test #2260.

@westonruter
Copy link
Member

@octoper can you test please?

@octoper
Copy link
Author

octoper commented May 7, 2019

@westonruter Yeah I've tested it and it's working. Thanks!!

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

Successfully merging a pull request may close this issue.

3 participants