Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Firefox ignoring fonts declared in CSS both for userChrome.css and websites.

  • 2 trả lời
  • 4 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi ecly

more options

I am running more or less a mirrored setup of both my OS and my Firefox customization on a laptop and on a desktop. All of a sudden, unrelated to anything that I can think of, Firefox on my desktop stopped respected the font I told it to use in both my userChrome.css and on my startpage.

When I use the developer tools to inspect everything, I see that the stylesheets are correctly there, and all other css is applied nicely, but when I check the font for the elements, it is not in the list, and merely ignored reverting to default Noto Sans.

I've tried with several fonts, including eg. Inconsolata, and naturally I've made sure that all these fonts are present in fc-list on my system. I would love to give more information but am somewhat unsure of what could possibly be causing this.

I have the 'Allow pages to choose their own fonts, instead of your selections above' setting enabled.

I am running more or less a mirrored setup of both my OS and my Firefox customization on a laptop and on a desktop. All of a sudden, unrelated to anything that I can think of, Firefox on my desktop stopped respected the font I told it to use in both my userChrome.css and on my startpage. When I use the developer tools to inspect everything, I see that the stylesheets are correctly there, and all other css is applied nicely, but when I check the font for the elements, it is not in the list, and merely ignored reverting to default Noto Sans. I've tried with several fonts, including eg. Inconsolata, and naturally I've made sure that all these fonts are present in fc-list on my system. I would love to give more information but am somewhat unsure of what could possibly be causing this. I have the 'Allow pages to choose their own fonts, instead of your selections above' setting enabled.

Được chỉnh sửa bởi ecly vào

Tất cả các câu trả lời (2)

more options

CSS rules for fonts that you use on a web page need to be placed in userContent.css (web content) and not in userChrome.css (user interface).

The DOM Inspector will also show rules from userChrome.css and userContent.css

more options

cor-el said

CSS rules for fonts that you use on a web page need to be placed in userContent.css (web content) and not in userChrome.css (user interface). The DOM Inspector will also show rules from userChrome.css and userContent.css

Hey, cor-el, thanks for reaching out. Seems I've formulated my question less than perfect. The web page with the font not rendering has its own style.css in which the font-family is declared. The only fonts I'm changing in userChrome.css are the ones of the user interface. But both the ones defined in userChrome.css and the ones defined in style.css for webpages are ignored. And seeing as the setup is working on my laptop with the same setup, it has to be a rather specific or silly setting somewhere that I just cannot find. Any ideas?