Merge "Only limit width of prose text in message list"

This commit is contained in:
Wyatt Allen
2017-04-14 20:48:20 +00:00
committed by Gerrit Code Review
3 changed files with 12 additions and 2 deletions

View File

@@ -19,6 +19,11 @@ limitations under the License.
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../shared/gr-formatted-text/gr-formatted-text.html">
<!--
The custom CSS property `--gr-formatted-text-prose-max-width` controls the max
width of formatted text blocks that are not code.
-->
<dom-module id="gr-comment-list">
<template>
<style>
@@ -43,7 +48,7 @@ limitations under the License.
}
.message {
flex: 1;
max-width: 80ch;
--gr-formatted-text-prose-max-width: 80ch;
}
</style>
<template is="dom-repeat" items="[[_computeFilesFromComments(comments)]]" as="file">

View File

@@ -75,7 +75,7 @@ limitations under the License.
font-weight: bold;
}
.message {
max-width: 80ch;
--gr-formatted-text-prose-max-width: 80ch;
}
.collapsed .message {
max-width: none;

View File

@@ -29,6 +29,11 @@ limitations under the License.
gr-linked-text.pre {
margin: 0 0 1.4em 0;
}
p,
ul,
blockquote {
max-width: var(--gr-formatted-text-prose-max-width, none);
}
:host.noTrailingMargin p:last-child,
:host.noTrailingMargin ul:last-child,
:host.noTrailingMargin blockquote:last-child,