2.6.2 Debugging style files ¶
If you want to understand why the style rules in a style file produce
the output that you see, you can do so in three steps:
- Run the program with the command-line option
--color=html
,
redirecting the output to a file.
- Open the resulting HTML file in a browser.
- Use the browser’s built-in CSS debugging tool.
- In Firefox: From the pop-up menu, select "Inspect Element".
Click somewhere in the DOM tree ("Inspector" tab) and look at the
CSS declarations in the "Rules" tab.
- In Chromium: From the pop-up menu, select "Inspect".
Click somewhere in the DOM tree ("Elements" tab) and look at the
CSS declarations in the "Styles" tab.
This technique allows you, in particular, to see which CSS declarations
override which other CSS declarations from other CSS rules.