Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bill summary: truncate and style #236

Closed
aih opened this issue Mar 19, 2021 · 2 comments
Closed

Bill summary: truncate and style #236

aih opened this issue Mar 19, 2021 · 2 comments
Assignees

Comments

@aih
Copy link
Collaborator

aih commented Mar 19, 2021

The bill summary now has the correct data. But it is not styled and may be too long (see below). We should truncate it by default (200 characters?) and provide a toggle to allow the user to show the whole summary. We should also style it, to the degree possible, to differentiate headings from text.

image

@aih aih assigned ayeshamk and aih and unassigned ayeshamk Mar 19, 2021
@aih
Copy link
Collaborator Author

aih commented Mar 19, 2021

Use pre element to wrap the summary and css to manage the overflow. See, e.g.

https://stackoverflow.com/a/43851641/628748

.pre-wrapper {
    border: 1px solid #d2d2d2;
    margin:20px;
    overflow-x: scroll;
    position: relative;
  }
  .pre-wrapper > div {
    display: table;
    width: 100%;
  }
  .pre-wrapper pre {
    background:transparent;
    border:0;
    border-bottom:1px solid #eee;
    border-radius:0;
    display: block;
    height:28px;
    line-height:28px;
    margin:0;
    min-width:100%;
    overflow: visible;
    padding:0;
    padding-left:10px;
    padding-right:10px;
    position: relative;
    white-space: pre;
    word-wrap:normal;
  }
  .pre-wrapper pre.added {
    background-color:#ddffdd;
  }
  .pre-wrapper pre.removed {
    background-color:#fee8e9;
  }

@aih
Copy link
Collaborator Author

aih commented Mar 19, 2021

Fixed in #237

@aih aih closed this as completed Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants