Skip to content
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

Ensure tables scale regardless of text size or length #6561

Merged
merged 1 commit into from
Sep 5, 2019
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: 4 additions & 4 deletions warehouse/static/js/warehouse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,18 @@ docReady(() => {
});

docReady(() => {
let changeRoleForms = document.querySelectorAll("form.change-role");
let changeRoleForms = document.querySelectorAll("form.table__change-role");

if (changeRoleForms) {
for (let form of changeRoleForms) {
let changeButton = form.querySelector("button.change-button");
let changeSelect = form.querySelector("select.change-field");
let changeButton = form.querySelector("button.table__change-button");
let changeSelect = form.querySelector("select.table__change-field");

changeSelect.addEventListener("change", function (event) {
if (event.target.value === changeSelect.dataset.original) {
changeButton.style.display = "none";
} else {
changeButton.style.display = "inline-block";
changeButton.style.display = "block";
}
});
}
Expand Down
14 changes: 9 additions & 5 deletions warehouse/static/sass/blocks/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
/*
Navigation breadcrumbs.

<nav aria-label="Breadcrumb">
<ul class="breadcrumbs">
<nav aria-label="Breadcrumb" class="breadcrumbs">
<ul>
<li class="breadcrumbs__breadcrumb"></li>
<li class="breadcrumbs__breadcrumb"></li>
</ul>
Expand All @@ -25,9 +25,13 @@


.breadcrumbs {
margin: 0;
padding: 0;
@include clearfix;
padding-bottom: ($spacing-unit / 2);

ul {
margin: 0;
padding: 0;
@include clearfix;
}

&__breadcrumb {
list-style-type: none;
Expand Down
1 change: 1 addition & 0 deletions warehouse/static/sass/blocks/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
border: 1px solid $accessible-border-color;
border-radius: 3px;
display: inline-block;
text-align: center;
@include link-without-underline;

i.fa {
Expand Down
38 changes: 37 additions & 1 deletion warehouse/static/sass/blocks/_project-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,44 @@
}

table {
@include table;
@include card;
@include border-width(1px null);
border-collapse: collapse;
border-spacing: 0;
text-align: left;
width: 100%;
margin: $spacing-unit 0 0;

tr {
border-bottom: 1px solid $border-color;
}

th,
td {
margin: 0;
border: 0;
padding: 10px 7px;
border-right: 1px solid $border-color;
}

thead tr {
background-color: $white;

th {
vertical-align: bottom;
font-weight: $bold-font-weight;
}
}

tbody {
tr {
background-color: darken($background-color, 0.75);
}

tr:nth-child(even) {
background-color: darken($background-color, 2);
}
}
}

hr {
Expand Down
Loading