Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

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".

Tìm hiểu thêm

Why is firefox adding empty lines to the css file in web developer?

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

more options

Firefox is adding empty lines to the css file in web developer like so:

  1. videoFiles {
 left: 0;
 z-index: 3;
 width: 250px;
 height: 40px;
 opacity: 0;
 cursor: pointer;

}

  1. image_files {
 height: 40px;
 width: 250px;
 z-index: 3;
 opacity: 0;
 cursor: pointer;

}

.previewVid {

 width: 50%;
 padding: 10px;

}

Those empty lines are not in the css file and so it is reporting the wrong line numbers. So hard to find the correct line in the actual file.

Firefox is adding empty lines to the css file in web developer like so: #videoFiles { left: 0; z-index: 3; width: 250px; height: 40px; opacity: 0; cursor: pointer; } #image_files { height: 40px; width: 250px; z-index: 3; opacity: 0; cursor: pointer; } .previewVid { width: 50%; padding: 10px; } Those empty lines are not in the css file and so it is reporting the wrong line numbers. So hard to find the correct line in the actual file.

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

more options

It sounds like a frustrating issue with Firefox’s Web Developer Tools. The extra empty lines in the CSS are likely being inserted by Firefox’s internal rendering, which can make debugging difficult, especially when trying to match up line numbers with the original CSS file.

One approach you could try is to use a different browser’s developer tools (like Chrome or Edge) to see if they display the CSS without the extra lines. Alternatively, using a text editor with built-in developer tools could also help avoid this issue.

If you need to stick with Firefox, another workaround could be adding comments in your CSS to mark specific sections, which might make it easier to locate the corresponding lines.

Hopefully, a future update to Firefox will resolve this behavior, but in the meantime, these steps might help mitigate the issue.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.