Permalink
Browse files

BUG: Force gridfield to wrap on long content

Make sure gridfield cells wrap. Added word-warp, so long words will
break apart to wrap, and a max-width.

The max-width number is semi-arbitrary. In practice it does not act as
a real max-width, but as some sort of limit on the percentage.
Unfortunately, this fix has no effect at all on any version of IE.
  • Loading branch information...
1 parent 574c53d commit 1a864d739de5e9312e7e9f317441bdf9d0464411 @adrexia adrexia committed Oct 16, 2012
Showing with 7 additions and 12 deletions.
  1. +1 −2 css/GridField.css
  2. +2 −2 css/UploadField.css
  3. +4 −8 scss/GridField.scss
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -157,21 +157,17 @@ $gf_grid_x: 16px;
cursor: pointer;
}
td {
+ width: auto;
+ max-width: 500px; //This number is semi-arbitary. It is acting as a percentage limit, rather than actually constricting the width to 500px.
+ word-wrap:break-word;
// Give browser some hints on which cols take priority:
// The last column (buttons) should always shrink to fit.
- // Overwritten for IE7, which doesn't support this.
- width: auto;
- white-space:nowrap;
+ // Overwritten for IE7, which doesn't support this.
&.col-buttons {
width: 40px;
padding:0 $gf_grid_x/2;
text-align: left;
}
-
- &.col-description {
- width: auto;
- }
-
&.col-listChildrenLink {
width:$gf_grid_x;
border-right:none;

0 comments on commit 1a864d7

Please sign in to comment.