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

Truncate long headers #35

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions public/css/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ div.cube {
border-left: 0.5em solid transparent;
}

div.cube-dimension1 > .header, div.cube-dimension2 {
div.cube-dimension1 > .header,
div.cube-dimension2 {
display: inline-block;
width: 10em;
height: 10em;
Expand All @@ -32,21 +33,33 @@ div.cube {
}

div.cube-dimension1 > .header {
display: flex;
float: left;
font-weight: bold;
text-align: center;
padding-left: 0;
}

div.cube-dimension1 > .body {
margin-left: 10em;
> a:first-child {
flex: 1;
max-width: 8em;
word-wrap: break-word;
}
}

div.cube-dimension2 {
> .header {
display: flex;
text-align: center;
color: white;
margin-bottom: 1em;

> a:first-child {
flex: 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using display: block; here is sufficient and does not require flex.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flex here is to properly align the filter icon to the right while maintaining a set width to truncate on :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check. Makes sense. But it must also work for cube-dimension1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.cube-dimension-1 doesn't need this, because it's nothing more than a headline with no content and there is nothing that gets pushed down - so i think it would make more sense to allow longer headings there.

Copy link
Member

@lippserd lippserd Jul 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please configure more than one dimension 😉

max-width: 8em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

background: @color-ok;
Expand Down