01507: CSS warnings responsive skin

Summary: CSS warnings responsive skin
Created: 2024-05-16 04:36
Status: InProgress
Category: CoreCandidate
From: Petko
Assigned:
Priority: 51
Version:
OS:

Description: From gnuzoo: The PmWiki HomePage and most other pages create several error messages:

Can PmWiki be run through the W3C HTML & CSS Validators to eliminate these errors? --gnuzoo

  • The google analytics and ads scripts unreachable may be blocked by an ad blocker or by a DNS blacklist. If so, this is the expected behavior, and not a problem.
  • The CSS warnings are usually not a problem, they may be unrecognized on your browser on your operating system, in this case they are simply ignored. This is by design. However, they may be recognized by other browsers on other operating systems, or older browsers. Before the @keyframes feature was standardized, browsers used their proprietary implementations with prefixes, so other browsers would ignore those they don't recognize. Nevertheless, specifically @keyframes is available cross-browser since around 2015, so I've removed the old proprietary declarations.
  • I've updated the BootstrapIcons extension to only inject the CSS when needed instead of always - so it will not show on the homepage. However, when loaded, it still has a rule that will be reported as it only applies to a different browser. Again, this is the expected behavior, and not a problem.
  • The messages "Ruleset ignored due to bad selector" may possibly be an error, but I don't see them. On what page it happens? --Petko

> On what page it happens?
It happens on https://www.pmwiki.org/ - the PmWiki HomePage. It happens on every PmWiki page, although I have not looked at every one of them.
I also noticed that when I turned off my ad blocker the number of errors went from 2 to 30 -- gnuzoo

On what page did you take the screenshot? The "Ruleset ignored due to bad selector" warning may be something added to $HTMLStylesFmt which may be in the core or from a recipe. I could try and debug it but I cannot see it on the homepage or any other page I visited. --Petko

Here is the PmWiki HomePage errors with all my addons turned off and cache completely cleared. --gnuzoo

I have annotated your screenshot. Most of these warnings come from things external to PmWiki, 2 lines look line inline CSS errors but there is no such inline CSS so it may again be external, and one may work exactly as expected. --Petko

Well someone is to blame for them. Are you saying that PmWiki allows 3rd party websites to inject errors? Seems something should be done about this. They are errors. They are on the PmWiki website, even if they are not caused by PmWiki. --gnuzoo

Yes, I am saying that PmWiki allows wiki administrators the freedom to do things you and I may disagree with, like include stuff from 3rd party websites which may inject errors, annoy the visitors, and violate the privacy of the visitors. This freedom is intended, it is so by design, and if you want feel free to think I am to blame. If it were me, I'd remove all trackers and ads. But this is Pm's website, he is administering the server and paying for the web hosting, and he has enabled the ads and trackers to try to make some money and offset some of costs. --Petko

I might think that google having such vast resources might come up with code that would be error free. No, I am not blaming you. If anything you are a saint for putting up with my comments. :) --gnuzoo