Skip to content
Snippets Groups Projects
Commit 5eff0609 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

Issue #2413311: More-specific mobile table rules for API.Drupal.org.

parent 4ab5837e
No related branches found
No related tags found
No related merge requests found
......@@ -2,19 +2,22 @@
$(document).ready(function() {
var windowsize = $(window).width();
$('table').not('#forum table').not('.page-user-track table').not('#project-usage-project-releases').each(function() {
// If the table is wider than the width of the window.
if ($(this).width() > windowsize) {
$(this).addClass('mobile-table');
}
});
// Use mobile tables for narrow tables.
$('.drupalorg-site-api table.views-table').each(function() {
var $this = $(this);
if ($this.width() < 500 && $this.width() === $this.parent().width()) {
$this.addClass('mobile-table');
}
});
if ($('body.drupalorg-site-api').length) {
// Use mobile tables for narrow views tables.
$('table.views-table').each(function() {
var $this = $(this);
if ($this.width() < 500 && $this.width() === $this.parent().width()) {
$this.addClass('mobile-table');
}
});
}
else {
$('table').not('#forum table').not('.page-user-track table').not('#project-usage-project-releases').each(function() {
// If the table is wider than the width of the window.
if ($(this).width() > windowsize) {
$(this).addClass('mobile-table');
}
});
}
});
})(jQuery);
......@@ -6,7 +6,7 @@
margin-bottom: 5px;
}
table {
table.views-table {
@include force-wrap;
.views-field-object-type, .views-field-modifiers {
@include word-break(normal);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment