Skip to content

Prevent mobile table td collapsing issue #1131

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

Merged
merged 1 commit into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions app/styles/_tables.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
> thead >tr > th, > tbody > tr > td {
border-left: 0;
border-right: 0;
padding-bottom: 8px;
padding-top: 8px;
padding-bottom: @table-cell-padding-bottom;
padding-top: @table-cell-padding-top;
vertical-align: middle;
}

Expand Down Expand Up @@ -123,7 +123,9 @@
/* Behave like a row */
border: none;
border-bottom: 1px solid lighten(@table-border-color, 5%);
padding: 3px 6px 2px 35%;
// prevent empty td from collapsing
min-height: (@table-cell-padding-top + @table-cell-padding-bottom) + (@line-height-base * @font-size-base);
padding-left: 35%;
position: relative;
&:last-child {
border-bottom: none;
Expand Down
2 changes: 2 additions & 0 deletions app/styles/_variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
@navbar-pf-alt-navbar-brand-padding: 20px 0;
@navbar-pf-bg-color: @navbar-os-bg-color;
@sidebar-pf-bg: @body-bg;
@table-cell-padding-bottom: 8px;
@table-cell-padding-top: 8px;


// OpenShift Console specific
Expand Down
4 changes: 2 additions & 2 deletions dist/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,7 @@ td>.progress:first-child:last-child{margin-bottom:0;margin-top:3px}
.progress-description .fa,.progress-description .pficon{font-size:14px;margin-right:3px}
.progress-description-left .progress-description{left:0;margin-bottom:0;max-width:85px;position:absolute;top:0}
.progress-description .tooltip{white-space:normal}
.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:2px 10px 3px}
.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px 10px}
.nav-tabs+.nav-tabs-pf>li:first-child>a,.nav-tabs-pf.nav-justified>li:first-child>a{padding-left:15px}
.table>tbody>tr>td>a:hover,.table>tbody>tr>th>a:hover,.table>tfoot>tr>td>a:hover,.table>tfoot>tr>th>a:hover,.table>thead>tr>td>a:hover,.table>thead>tr>th>a:hover{text-decoration:none}
.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>th{font-family:"Open Sans";font-style:normal;font-weight:600}
Expand Down Expand Up @@ -4961,7 +4961,7 @@ body,html{margin:0;padding:0}
.table-mobile.table-empty{border:0}
.table-mobile.table-empty>tbody>tr>td{border:0;padding-left:0}
.table-mobile>tbody>tr{border-top:2px solid #d1d1d1}
.table-mobile>tbody>tr>td{border:none;border-bottom:1px solid #dedede;padding:3px 6px 2px 35%;position:relative}
.table-mobile>tbody>tr>td{border:none;border-bottom:1px solid #dedede;min-height:37.67px;padding-left:35%;position:relative}
.table-mobile>tbody>tr>td:last-child{border-bottom:none}
.table-mobile>tbody>tr>td:before{content:attr(data-title);position:absolute;top:8px;left:6px;width:35%;padding-right:10px;white-space:nowrap}
}
Expand Down