Use pre-wrap instead of pre-line.

This commit is contained in:
Jason Robbins 2020-10-01 20:18:28 -04:00
Родитель 8eb2f268d3
Коммит cfe5548b27
4 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -296,13 +296,13 @@ class ChromedashFeature extends LitElement {
html`<p><b>This feature is only shown in the feature list html`<p><b>This feature is only shown in the feature list
to users with edit access.</b></p> to users with edit access.</b></p>
`: nothing } `: nothing }
<p class="${this.open ? 'pre-line' : ''}"> <p class="${this.open ? 'preformatted' : ''}">
<span>${autolink(this.feature.summary)}</span> <span>${autolink(this.feature.summary)}</span>
</p> </p>
</summary> </summary>
${this.feature.motivation ? ${this.feature.motivation ?
html`<p><h3>Motivation</h3></p> html`<p><h3>Motivation</h3></p>
<p class="${this.open ? 'pre-line' : ''}"> <p class="${this.open ? 'preformatted' : ''}">
<span>${autolink(this.feature.motivation)}</span> <span>${autolink(this.feature.motivation)}</span>
</p>` </p>`
: nothing } : nothing }

Просмотреть файл

@ -89,6 +89,6 @@ iron-icon {
width: var(--icon-size); width: var(--icon-size);
} }
.pre-line { .preformatted {
white-space: pre-line; white-space: pre-wrap;
} }

Просмотреть файл

@ -40,7 +40,7 @@
{% endif %} {% endif %}
<br><br><h4>Summary</h4> <br><br><h4>Summary</h4>
<p class="pre-line">{{ feature.summary | urlize }}</p> <p class="preformatted">{{ feature.summary | urlize }}</p>
<br><br><h4>Blink component</h4> <br><br><h4>Blink component</h4>
{% for c in feature.blink_components %} {% for c in feature.blink_components %}
@ -49,7 +49,7 @@
{% if 'motivation' in sections_to_show %} {% if 'motivation' in sections_to_show %}
<br><br><h4>Motivation</h4> <br><br><h4>Motivation</h4>
<p class="pre-line">{{feature.motivation|urlize}}</p> <p class="preformatted">{{feature.motivation|urlize}}</p>
<br><br><h4>Initial public proposal</h4> <br><br><h4>Initial public proposal</h4>
{{feature.initial_public_proposal_url|urlize}} {{feature.initial_public_proposal_url|urlize}}
@ -79,7 +79,7 @@
<br><br><h4>Risks</h4> <br><br><h4>Risks</h4>
<div style="margin-left: 4em;"> <div style="margin-left: 4em;">
<br><br><h4>Interoperability and Compatibility</h4> <br><br><h4>Interoperability and Compatibility</h4>
<p class="pre-line">{{feature.interop_compat_risks|urlize}}</p> <p class="preformatted">{{feature.interop_compat_risks|urlize}}</p>
<br><br><i>Gecko</i>: {{feature.ff_views.text}} <br><br><i>Gecko</i>: {{feature.ff_views.text}}
{% if feature.ff_views_link %} {% if feature.ff_views_link %}
@ -107,17 +107,17 @@
{% if feature.ergonomics_risks %} {% if feature.ergonomics_risks %}
<br><br><h4>Ergonomics</h4> <br><br><h4>Ergonomics</h4>
<p class="pre-line">{{feature.ergonomics_risks|urlize}}</p> <p class="preformatted">{{feature.ergonomics_risks|urlize}}</p>
{% endif %} {% endif %}
{% if feature.activation_risks %} {% if feature.activation_risks %}
<br><br><h4>Activation</h4> <br><br><h4>Activation</h4>
<p class="pre-line">{{feature.activation_risks|urlize}}</p> <p class="preformatted">{{feature.activation_risks|urlize}}</p>
{% endif %} {% endif %}
{% if feature.security_risks %} {% if feature.security_risks %}
<br><br><h4>Security</h4> <br><br><h4>Security</h4>
<p class="pre-line">{{feature.security_risks|urlize}}</p> <p class="preformatted">{{feature.security_risks|urlize}}</p>
{% endif %} {% endif %}
</div> <!-- end risks --> </div> <!-- end risks -->
@ -125,37 +125,37 @@
{% if 'experiment' in sections_to_show %} {% if 'experiment' in sections_to_show %}
<br><br><h4>Goals for experimentation</h4> <br><br><h4>Goals for experimentation</h4>
<p class="pre-line">{{feature.experiment_goals|urlize}}</p> <p class="preformatted">{{feature.experiment_goals|urlize}}</p>
{% if feature.experiment_timeline %} {% if feature.experiment_timeline %}
<br><br><h4>Experimental timeline</h4> <br><br><h4>Experimental timeline</h4>
<p class="pre-line">{{feature.experiment_timeline|urlize}}</p> <p class="preformatted">{{feature.experiment_timeline|urlize}}</p>
{% endif %} {% endif %}
{% if 'extension_reason' in sections_to_show %} {% if 'extension_reason' in sections_to_show %}
<br><br><h4>Reason this experiment is being extended</h4> <br><br><h4>Reason this experiment is being extended</h4>
<p class="pre-line">{{feature.experiment_extension_reason|urlize}}</p> <p class="preformatted">{{feature.experiment_extension_reason|urlize}}</p>
{% endif %} {% endif %}
<br><br><h4>Ongoing technical constraints</h4> <br><br><h4>Ongoing technical constraints</h4>
<p class="pre-line">{{feature.ongoing_constraints|urlize}}</p> <p class="preformatted">{{feature.ongoing_constraints|urlize}}</p>
{% endif %} {% endif %}
{% if feature.debuggability %} {% if feature.debuggability %}
<br><br><h4>Debuggability</h4> <br><br><h4>Debuggability</h4>
<p class="pre-line">{{feature.debuggability|urlize}}</p> <p class="preformatted">{{feature.debuggability|urlize}}</p>
{% endif %} {% endif %}
<br><br><h4>Will this feature be supported on all six Blink platforms <br><br><h4>Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?</h4> (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?</h4>
{% if feature.all_platforms %}Yes{% else %}No{% endif %} {% if feature.all_platforms %}Yes{% else %}No{% endif %}
<p class="pre-line">{{feature.all_platforms_descr|urlize}}</p> <p class="preformatted">{{feature.all_platforms_descr|urlize}}</p>
<br><br><h4>Is this feature fully tested by <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md">web-platform-tests</a>?</h4> <br><br><h4>Is this feature fully tested by <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md">web-platform-tests</a>?</h4>
{% if feature.wpt %}Yes{% else %}No{% endif %} {% if feature.wpt %}Yes{% else %}No{% endif %}
{% if feature.wpt_desc %} {% if feature.wpt_desc %}
<p class="pre-line">{{feature.wpt_descr|urlize}}</p> <p class="preformatted">{{feature.wpt_descr|urlize}}</p>
{% endif %} {% endif %}
{% if feature.bug_url %} {% if feature.bug_url %}

Просмотреть файл

@ -85,14 +85,14 @@
{% if feature.summary %} {% if feature.summary %}
<section id="summary"> <section id="summary">
<p class="pre-line">{{ feature.summary|urlize }}</p> <p class="preformatted">{{ feature.summary|urlize }}</p>
</section> </section>
{% endif %} {% endif %}
{% if feature.motivation %} {% if feature.motivation %}
<section id="motivation"> <section id="motivation">
<h3>Motivation</h3> <h3>Motivation</h3>
<p class="pre-line">{{ feature.motivation|urlize }}</p> <p class="preformatted">{{ feature.motivation|urlize }}</p>
</section> </section>
{% endif %} {% endif %}
@ -225,7 +225,7 @@
{% if feature.comments %} {% if feature.comments %}
<section id="comments"> <section id="comments">
<h3>Comments</h3> <h3>Comments</h3>
<p class="pre-line">{{ feature.comments|urlize }}</p> <p class="preformatted">{{ feature.comments|urlize }}</p>
</section> </section>
{% endif %} {% endif %}