<pre>
tag should have white-space: pre
#14
Comments
Oh, and apparently we set |
I did that to prevent unwanted spacing when we wrap |
Nathan when using react I think if you replace the state of the |
Something funky is going on. Here's my code: return (
<div className="tab-panels" role="tabpanel">
<ul className="tab-panels--tab-list" role="tablist">
<li className="tab-panels--tab-list-item base--li" role="presentation">
<a className="tab-panels--tab base--a active" href="#display_output_doc"
aria-controls="display_output_doc" role="tab">Output document</a>
</li>
<a title="Download output file" href={`/api/convert?document_id=${this.props.id}&conversion_target=${formats[this.props.format]}&download=true`}
className="download--output-icon icon icon-download download--icon"></a>
</ul>
<div className="tab-panels--tab-content">
<div id="display_output_doc" className="tab-panels--tab-pane active" role="tab-panel">
<Code type={this.props.format}>{this.state.output}</Code>
</div>
</div>
</div>
); And this is what it renders as: The only CSS I'm including on the page is our If I disable the Should that class maybe be on the |
Actually, I think I answered my own question. If I move the I included the fix in watson-developer-cloud/react-components#5 |
I think in the sample documentation, we should say that Edit: nvm, ignore this message |
See
ui-components/src/scss/lib/vendors/reset/_reset.scss
Line 270 in 78a1eeb
white-space: pre
, but then overrides it (twice), setteling onwhite-space: pre-line
, which makes my pretty-printed JSON blocks look ugly.This gets overridden somewhere for
pre[class*="language-"]
(maybe in the prism css), but I don't see any reason why it shouldn't be the default for other things.The text was updated successfully, but these errors were encountered: