Bootstrap: pre tags nearly invisible in dark tables

Created on 18 Jun 2019  路  3Comments  路  Source: twbs/bootstrap

When adding table-dark class to a table any <pre> tag inside the table gets hardly visible.

Example: https://jsbin.com/wutofapeji/edit?html,output

It would be nice if the color css property of <pre> tags would get overwritten when inside a table with the table-dark class.

css

Most helpful comment

null is probably the best choice indeed.

The only concern is the possibility of displaying in unintended colors for existing v4 users.

This can indeed be a breaking change, maybe we should just fix this for v5?

All 3 comments

@twbs/css-review Maybe we let pre inherit the color instead of setting a custom one? https://github.com/twbs/bootstrap/blob/ceffc3a5fd7af7609150048f0651f025ef19672c/scss/_code.scss#L30-L48

Agree, but $pre-color: null is better IMO. The only concern is the possibility of displaying in unintended colors for existing v4 users.

null is probably the best choice indeed.

The only concern is the possibility of displaying in unintended colors for existing v4 users.

This can indeed be a breaking change, maybe we should just fix this for v5?

Was this page helpful?
0 / 5 - 0 ratings