Patch out bootstrap rule forcing black and white printing#3212
Conversation
|
The test failures on Travis appear to be genuine failures from nbval. I just released 0.8, which catches some discrepancies that earlier versions of nbval missed. CC @vidartf . |
Carreau
left a comment
There was a problem hiding this comment.
It's been long standing enough. +1 for hackish solution.
damianavila
left a comment
There was a problem hiding this comment.
It is ugly but it is a long standing issue and doing it less hacky way implies a lot of additional complexity.
+1 as well.
| rmed = lines.pop(ix) | ||
| print("Removed line", ix, "from bootstrap print.less:") | ||
| print("-", rmed) | ||
| print() |
There was a problem hiding this comment.
It makes a blank line, so the text above is slightly easier to pick out.
| lines = f.readlines() | ||
|
|
||
| for ix, line in enumerate(lines): | ||
| if 'Black prints faster' in line: |
There was a problem hiding this comment.
I guess this is enough specific to patch the proper line, right?
There was a problem hiding this comment.
Should be. The original file is not very long:
https://github.com/twbs/bootstrap/blob/v3.3.7/less/print.less
|
Thanks both ! |
|
@mpacer @takluyver, we need to update the css in the CDN so nbconvert can catch this change. |
A thoroughly ugly hack. Bootstrap forces all text to be black when printing, resulting in a long running issue (#840). I tried to override it with
color: inherit !important, but that didn't produce the right results. I can't find any way to tell LESS to remove a rule or act as if it didn't exist. So the only thing I can think to do is to patch the source we get from bootstrap to get rid of the rule entirely.Frustratingly, it looks like bootstrap is fixing this (getting rid of the rule) for v4, but it's also moving from LESS to SCSS, so we can't easily switch to the new version.
Closes gh-840