-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow all pseudo class and element from CSS3 #4
Comments
Can confirm this is still an issue. Modern clearfix is being stripped out (i.e. using :after). Additionally, it is stripping out final ; in all CSS statements, which makes no sense? It's standard to have it. |
i am also having this issue with :after |
The pseudo-classes/pseudo-elements supported are hardcoded into HtmlPurifier, so we can't easily change them. Trying to get them added to the upstream HtmlPurifier is an option, but just the pseudo-elements is probably not enough as I would bet the The semicolon issue is a setting of the CSS Tidy library, I think... we can probably fix that so it stops doing that. |
it seems the part of code doing the nasty is the css minifier https://github.com/omeka/plugin-CSSEditor/blob/master/CSSEditorPlugin.php#L33 if you check that code is 9 years old, it is strapping moder standard CSS2 and CSS3 https://github.com/omeka/plugin-CSSEditor/blob/master/libraries/CSSTidy/class.csstidy_optimise.php would be a good idea to update the library maybe most problems could be solved. |
I've been trying to fix my search button icon, but unless I'm granted access to the backend, I need to be able to use both :after and content:"". I've also noticed that the CSS editor in Omeka Classic does not like @media queries. Luckily so far, what I've needed to adjust is specified with "-mobile" somewhere in the #id, so I've been able to work around it. Why can't the CSS Editor in Classic work the same as in S? S's CSS Editor is amazing with leaving the code alone! I was able to make notes and change anything I wanted as long as I got my selectors and CSS right. S's HTML blocks were also great (but that's not pertinent to this conversation...) |
Slight update here that we did in fact modify CSS Editor to support more pseudoclasses/elements: the supported list is now The important restriction there though is that Modifying the whole way the plugin works to not filter the styles is a little problematic from a standpoint of expectations of existing users, but it could potentially be an opt-in setting or mode. |
Could it be possible to allow all the pseudo-class and pseudo-element.
I see that only 'first-child', 'link', 'visited', 'active', 'hover','focus' (application/libraries/htmlpurifier/HTMLPurifier/Filter/ExtractStyleBlocks.php), but maybe CSS Editor could redefine that and authorize all of them as listed in https://www.w3schools.com/css/css_pseudo_classes.asp
Thanks for your answer!
The text was updated successfully, but these errors were encountered: