1

example

Tell me where did these styles for th come from? Such a feeling earlier that they were not there and my table was working fine? A couple of days ago there were no styles or I did not notice them

Override styles with my own, but I wonder where it came from and why?

th:not(table th) {
padding: 1px; }
  • Says right there in your image. It's from the user agent stylesheet. https://stackoverflow.com/questions/12582624/what-is-a-user-agent-stylesheet – j08691 Apr 07 '23 at 14:14
  • as j08691 is saying it's written in your image "user agent", and in your title "chrome". Browser has basic css style for almost everything. In general it's ok, sometimes not. Exemple, if you want a div full height, chrome has a top margin 8px. So yes, when you encounter this kind of problem, you override the style giving problems. – pier farrugia Apr 07 '23 at 14:18
  • It does seem to be styling newly added to the user agent stylesheet in Chrome v112. I can't think what its purpose is, a th that's not inside a table is as invalid now as it has ever been. – Alohci Apr 07 '23 at 15:14
  • Seems the change is to address this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1406929 Basically, the HTML specification says that the padding should be 1px on td and th elements, which wasn't happening if they weren't in a table element. – Alohci Apr 07 '23 at 18:57

0 Answers0