Projet

Général

Profil

0001-scss-make-table-widgets-responsive-41734.patch

Thomas Jund, 08 octobre 2020 14:31

Télécharger (1,46 ko)

Voir les différences:

Subject: [PATCH] scss: make table widgets responsive (#41734)

 static/includes/wcs/_bulk.scss | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
static/includes/wcs/_bulk.scss
653 653
	}
654 654
}
655 655

  
656
.TableListRowsWidget {
657
	.widget {
658
		margin-bottom: 0;
659
	}
660
}
661
// Responsive TableWidget
662
// work with JS : `new Responsive_table(table, options);`
663
.responsive-tableWidget {
664
	table-layout: fixed;
665
	&--col-header, &--row-header  {
666
		text-align: left;
667
		font-weight: normal;
668
	}
669
	td::before {
670
		@extend .responsive-tableWidget--col-header;
671
	}
672

  
673
	@media ($max-mobile-viewport) {
674
		&, & tbody {
675
			display: block;
676
		}
677
		&--col-header {
678
			display: none;
679
		}
680
		&--row-header {
681
			display: block;
682
		}
683
		tbody {
684
			tr {
685
				display: block;
686
				margin-bottom: 1rem;
687
			}
688
			td {
689
				display: flex;
690
				align-items: last baseline;
691
			}
692
			td::before {
693
				content: attr(data-col-header);
694
				display: block;
695
				flex: 0 1 33%;
696
				margin-right: .66em;
697
			}
698
		}
699
	}
700
	@media (max-width: $very-small-limit) {
701
		tbody td {
702
			display: block;
703
		}
704
	}
705
}
706

  
656 707
p.use-file-from-fargo {
657 708
	margin-top: 0;
658 709
}
659
-