#19317 closed Cleanup/optimization (fixed)
Make warning blocks distinguishable
Reported by: | Tome Cvitan | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
This is suggestion to make the warning block in the docs distinguishable from the note blocks, as they contain a different type of information.
Most (but not all) instances of the warning block are written like this:
.. warning::
This way the blocks get the class "warning", which might not be a specific enough target for css styling. The "philosophy" and "behind the scenes" blocks on the other hand use the following syntax:
.. admonition:: Philosophy
In the example, the div gets a class of "admonition-philosophy". This is then referred to in the spinx theme css and gives the block a philosophy icon.
The suggestion is to use the same notation for warning boxes:
.. admonition:: Warning
This is already used in a few places in the docs. With this, the divs get the "admonition-warning" class, to which we can safely apply a different styling - my suggestion is an orange border and an orange icon.
A suggested icon and a patch for the sphinx theme css are attached, as well as a screenshot of the result.
Attachments (3)
Change History (10)
by , 12 years ago
Attachment: | warning_css_class.diff added |
---|
by , 12 years ago
Attachment: | docicons-warning.png added |
---|
by , 12 years ago
Attachment: | warning_block_screenshot.png added |
---|
Screenshot of proposed warning block
comment:1 by , 12 years ago
Type: | Uncategorized → Cleanup/optimization |
---|
comment:2 by , 12 years ago
+1 from me, we can use .admonition.warning for the CSS selector to achieve the desired effect rather than changing the existing markup.
comment:3 by , 12 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Warning block icon