pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
565 stars 304 forks source link

With `PST` 0.15.2, “Unknown "text-decoration-skip" property. Declaration abandoned.” warnings related to `_links.scss` #1684

Closed dbitouze closed 2 months ago

dbitouze commented 6 months ago

With PST 0.15.2 (and git+https://github.com/drammock/pydata-sphinx-theme@fix-queryselector), multiple (at a first glance, identical) warnings appear in the console (partially translated from French and trees only partially open):

Unknown "text-decoration-skip" property.  Declaration abandoned. [_links.scss](webpack://pydata_sphinx_theme/src/pydata_sphinx_theme/assets/styles/abstracts/_links.scss):46:4
Elements corresponding to the selector: a:hover
NodeList []
​
length: 0
​
<prototype>: NodeListPrototype { item: item(), keys: keys(), values: values(), … }
​​
constructor: function ()
​​
entries: function entries()
​​
forEach: function forEach()
​​
item: function item()
​​
keys: function keys()
​​
length: 
​​
values: function values()
​​
Symbol(Symbol.iterator): function values()
​​
Symbol(Symbol.toStringTag): "NodeList"
​​
<get length()>: function length()
​​
<prototype>: Object { … }
​​​
__defineGetter__: function __defineGetter__()
​​​
__defineSetter__: function __defineSetter__()
​​​
__lookupGetter__: function __lookupGetter__()
​​​
__lookupSetter__: function __lookupSetter__()
​​​
__proto__: 
​​​
constructor: function Object()
​​​
hasOwnProperty: function hasOwnProperty()
​​​
isPrototypeOf: function isPrototypeOf()
​​​
propertyIsEnumerable: function propertyIsEnumerable()
​​​
toLocaleString: function toLocaleString()
​​​
toString: function toString()
​​​
valueOf: function valueOf()
​​​
<get __proto__()>: function __proto__()
​​​
<set __proto__()>: function __proto__()
trallard commented 5 months ago

Odd - we are defining both text-decoration-skip-ink and text-decoration-skip due to browser support/compatibility.

Are you getting these at build time of your documentation?

dbitouze commented 5 months ago

Are you getting these at build time of your documentation?

No. Here is a very minimal (built) project that triggers these warnings (with Firefox 122.0 (64 bits) on GNU/Linux Mageia 9).

trallard commented 3 months ago

I completely forgot about this, sorry.

@gabalafou I do not remember seeing this with the new changes to interactive components. Would you mind having a quick check as this might have been resolved now. I am sure this is something I introduced unintentionally when doing the first pass at links styling.

dbitouze commented 2 months ago

Still happens with PST 0.15.3rc1.

gabalafou commented 2 months ago

This was a ping I missed, sorry, but I'm seeing it just now with the latest comment.

I need steps to reproduce.

I downloaded the minimal built project, ran python -m http.server -d build/html, loaded the site in Chrome, but all I could see was the error fixed by #1683.

I'm not sure where I'm supposed to be looking.

dbitouze commented 2 months ago

This was a ping I missed, sorry, but I'm seeing it just now with the latest comment.

You're welcome!

I downloaded the minimal built project, ran python -m http.server -d build/html, loaded the site in Chrome, but all I could see was the error fixed by #1683.

Indeed, I don't see these errors in Chromium (BTW I see with it several errors regarding fontawesome) but I see them in Firefox. Here is attached the minimal site built with the last PST version.

gabalafou commented 2 months ago

Here's a screenshot of everything I see in Firefox:

Transcript of console:

GET
http://localhost:8000/favicon.ico
[HTTP/1.1 404 Not Found 0ms]

[PST]: Changed to auto mode using the light theme. [pydata-sphinx-theme.js:54:10](webpack://pydata_sphinx_theme/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js)
The resource at “http://localhost:8000/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [localhost:8000](http://localhost:8000/)
The resource at “http://localhost:8000/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [localhost:8000](http://localhost:8000/)
The resource at “http://localhost:8000/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

I don't see anything about "text-decoration-skip"... am I looking in the right place?

dbitouze commented 2 months ago

I don't see anything about "text-decoration-skip"...

That's strange.

am I looking in the right place?

I guess so.

I checked with Firefox in safe mode, where all extensions are disabled and there's no more errors. In normal mode, I manually disabled each extension one by one but, each time, the errors appeared again. This mode disables:

so I'm not sure what could be the cause of the errors.

gabalafou commented 2 months ago

Oh, I see it now, I needed to activate the "CSS" filter for the console.

Investigating...

gabalafou commented 2 months ago

Okay, I added a PR (#1820) that should fix it.

Looks to me that all of the other CSS warnings in the Firefox console come from third-party stylesheets (Bootstrap, JupyterLite).

Thanks for reporting this!