Place table styling outside of dashboard, update class names for tables

This commit is contained in:
igorkorenfeld 2023-03-21 16:50:12 -04:00
parent 6ea24a4c2c
commit 38f3b5ed87
No known key found for this signature in database
GPG key ID: 826947A4B867F659
3 changed files with 61 additions and 48 deletions

View file

@ -223,7 +223,17 @@ section.dashboard {
margin-bottom: 0;
}
.usa-table {
@include at-media(mobile-lg) {
margin-top: units(5);
h2 {
margin-bottom: units(3);
}
}
}
.dotgov-table {
width: 100%;
a {
@ -234,16 +244,20 @@ section.dashboard {
&:visited {
color: color('primary');
}
.usa-icon {
// align icon with x height
margin-top: units(0.5);
margin-right: units(0.5);
}
}
}
// Table on small mobile
.usa-table--stacked {
th[data-sortable]:not([aria-sort]) .usa-table__header__button {
right: auto;
}
}
.dotgov-table--stacked {
td, th {
padding: units(1) units(2) units(2px) 0;
border: none;
@ -268,20 +282,15 @@ section.dashboard {
color: color('primary-darker');
padding-bottom: units(2px);
}
}
}
@include at-media(mobile-lg) {
margin-top: units(5);
@include at-media(mobile-lg) {
h2 {
margin-bottom: units(3);
}
.usa-table tr {
.dotgov-table {
tr {
border: none;
}
.usa-table {
td, th {
border-bottom: 1px solid color('base-light');
}
@ -297,8 +306,13 @@ section.dashboard {
}
}
td, th {
padding: units(2);
tbody th {
word-break: break-word;
}
td, th,
.usa-tabel th{
padding: units(2) units(2) units(2) 0;
}
th:first-of-type {
@ -309,7 +323,6 @@ section.dashboard {
border-top: none;
}
}
}
}

View file

@ -6,7 +6,7 @@
<h1>User management</h1>
{% if domain.permissions %}
<table class="dotgov-table usa-table usa-table--borderless usa-table--stacked">
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table--stacked dotgov-table">
<caption class="sr-only">Domain users</caption>
<thead>
<tr>

View file

@ -17,7 +17,7 @@
<section class="dashboard tablet:grid-col-11 desktop:grid-col-10">
<h2>Registered domains</h2>
{% if domains %}
<table class="usa-table usa-table--borderless usa-table--stacked">
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table dotgov-table--stacked">
<caption class="sr-only">Your domain applications</caption>
<thead>
<tr>
@ -56,7 +56,7 @@
<section class="dashboard tablet:grid-col-11 desktop:grid-col-10">
<h2>Active domain requests</h2>
{% if domain_applications %}
<table class="usa-table usa-table--borderless usa-table--stacked">
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table dotgov-table--stacked">
<caption class="sr-only">Your domain applications</caption>
<thead>
<tr>