debian-mirror-gitlab/app/assets/stylesheets/framework/responsive_tables.scss

166 lines
2.7 KiB
SCSS
Raw Normal View History

2017-09-10 17:25:29 +05:30
@mixin flex-max-width($max) {
flex: 0 0 #{$max + '%'};
max-width: #{$max + '%'};
}
2018-03-17 18:26:18 +05:30
.gl-responsive-table-row-layout {
width: 100%;
@media (min-width: $screen-md-min) {
display: flex;
align-items: center;
& > &:not(:first-child) {
margin-top: $gl-padding;
}
}
}
2017-09-10 17:25:29 +05:30
.gl-responsive-table-row {
2018-03-17 18:26:18 +05:30
@extend .gl-responsive-table-row-layout;
2017-09-10 17:25:29 +05:30
margin-top: 10px;
border: 1px solid $border-color;
@media (min-width: $screen-md-min) {
margin: 0;
2018-03-17 18:26:18 +05:30
padding: $gl-padding 0;
border: 0;
&:not(:last-child) {
border-bottom: 1px solid $white-normal;
}
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.gl-responsive-table-row-col-span {
flex-wrap: wrap;
}
.table-section {
white-space: nowrap;
2017-09-10 17:25:29 +05:30
2018-05-09 12:01:36 +05:30
$section-widths: 10 15 20 25 30 40 50 100;
2018-03-17 18:26:18 +05:30
@each $width in $section-widths {
&.section-#{$width} {
flex: 0 0 #{$width + '%'};
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
@media (min-width: $screen-md-min) {
max-width: #{$width + '%'};
2017-09-10 17:25:29 +05:30
}
}
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
@media (max-width: $screen-sm-max) {
display: flex;
align-self: stretch;
padding: 10px;
align-items: center;
min-height: 62px;
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
&:not(:first-child) {
border-top: 1px solid $white-normal;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
&.section-wrap {
white-space: normal;
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
@media (max-width: $screen-sm-max) {
flex-wrap: wrap;
2017-09-10 17:25:29 +05:30
}
}
2018-03-17 18:26:18 +05:30
&.section-align-top {
align-self: flex-start;
}
}
2017-09-10 17:25:29 +05:30
.table-button-footer {
@media (min-width: $screen-md-min) {
text-align: right;
}
@media (max-width: $screen-sm-max) {
2018-03-17 18:26:18 +05:30
display: block;
2017-09-10 17:25:29 +05:30
align-self: stretch;
2018-03-17 18:26:18 +05:30
min-height: 0;
background-color: $gray-normal;
2017-09-10 17:25:29 +05:30
border-top: 1px solid $border-color;
.table-action-buttons {
display: flex;
.btn {
border-radius: 3px;
}
> .btn-group,
> .external-url,
> .btn {
flex: 1 1 28px;
2018-03-17 18:26:18 +05:30
&:not(:first-child) {
margin-left: 5px;
}
&:not(:last-child) {
margin-right: 5px;
}
2017-09-10 17:25:29 +05:30
}
.dropdown-new {
width: 100%;
}
.dropdown-menu {
min-width: initial;
}
}
}
}
.table-row-header {
font-size: 13px;
@media (max-width: $screen-sm-max) {
display: none;
}
}
.table-mobile-header {
@include flex-max-width(40);
color: $gl-text-color-secondary;
text-align: left;
@media (min-width: $screen-md-min) {
display: none;
}
}
.table-mobile-content {
@media (max-width: $screen-sm-max) {
@include flex-max-width(60);
text-align: right;
}
}
.flex-truncate-parent {
display: flex;
}
.flex-truncate-child {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@media (min-width: $screen-md-min) {
flex: 0 0 90%;
}
.avatar {
float: none;
margin-right: 4px;
}
}