MDL-72896 Accessibility: Make html_table responsive
The tables are generated by html_table will responsive across viewports
This commit is contained in:
@@ -2321,6 +2321,10 @@ class html_writer {
|
||||
}
|
||||
$output .= html_writer::end_tag('table') . "\n";
|
||||
|
||||
if ($table->responsive) {
|
||||
return self::div($output, 'table-responsive');
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -2772,6 +2776,9 @@ class html_table {
|
||||
*/
|
||||
public $captionhide = false;
|
||||
|
||||
/** @var bool Whether to make the table to be scrolled horizontally with ease. Make table responsive across all viewports. */
|
||||
public $responsive = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user