refactor(data-table): extract styling into shared css
This commit is contained in:
+5
-7
@@ -178,13 +178,11 @@
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<div class="table-wrap">
|
||||
<app-data-table
|
||||
[columns]="columns()"
|
||||
[data]="elements()"
|
||||
[detailTemplate]="fuzzySearch() ? null : snippetTmp"
|
||||
[canExpand]="hasSnippet" />
|
||||
</div>
|
||||
<app-data-table
|
||||
[columns]="columns()"
|
||||
[data]="elements()"
|
||||
[detailTemplate]="fuzzySearch() ? null : snippetTmp"
|
||||
[canExpand]="hasSnippet" />
|
||||
|
||||
<app-query-param-paginator
|
||||
[total]="total()"
|
||||
|
||||
+5
-49
@@ -43,49 +43,6 @@
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
TABLE
|
||||
============================================================ */
|
||||
.table-wrap {
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
::ng-deep .table-wrap table {
|
||||
width: 100%;
|
||||
min-width: 960px;
|
||||
border-collapse: collapse;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::ng-deep .table-wrap .mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
::ng-deep .table-wrap .mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
::ng-deep .table-wrap .mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
::ng-deep .table-wrap {
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.detail-row .mat-mdc-cell {
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
TABLE CELLS
|
||||
============================================================ */
|
||||
@@ -99,11 +56,10 @@
|
||||
|
||||
.title {
|
||||
display: inline-block;
|
||||
max-width: 520px;
|
||||
line-height: 1.35;
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
|
||||
app-highlighted-text {
|
||||
display: inline;
|
||||
@@ -158,10 +114,10 @@
|
||||
.topic-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
gap: 6px;
|
||||
align-items: flex-start;
|
||||
padding: 0.5rem 0;
|
||||
max-width: 350px;
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
.no-results {
|
||||
|
||||
@@ -164,48 +164,6 @@
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
// Data table overrides (applied via ::ng-deep)
|
||||
// ------------------------
|
||||
|
||||
::ng-deep {
|
||||
.mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
.mat-column-type,
|
||||
.mat-column-year,
|
||||
.mat-column-language,
|
||||
.mat-column-citations,
|
||||
.mat-mdc-header-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-mdc-cell:not(:last-child),
|
||||
.mat-mdc-header-cell:not(:last-child) {
|
||||
border-right: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.mat-column-institutions,
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
// Responsive adjustments
|
||||
// ------------------------
|
||||
|
||||
@@ -154,48 +154,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
// Data table overrides (applied via ::ng-deep)
|
||||
// ------------------------
|
||||
|
||||
::ng-deep {
|
||||
.mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
.mat-column-type,
|
||||
.mat-column-year,
|
||||
.mat-column-language,
|
||||
.mat-column-citations,
|
||||
.mat-mdc-header-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-mdc-cell:not(:last-child),
|
||||
.mat-mdc-header-cell:not(:last-child) {
|
||||
border-right: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.mat-column-institutions,
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
// Responsive adjustments
|
||||
// ------------------------
|
||||
|
||||
@@ -142,47 +142,7 @@
|
||||
.classification-container {
|
||||
max-width: 200px;
|
||||
}
|
||||
// ------------------------
|
||||
// Data table overrides (applied via ::ng-deep)
|
||||
// ------------------------
|
||||
|
||||
::ng-deep {
|
||||
.mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
.mat-column-type,
|
||||
.mat-column-year,
|
||||
.mat-column-language,
|
||||
.mat-column-citations,
|
||||
.mat-mdc-header-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-mdc-cell:not(:last-child),
|
||||
.mat-mdc-header-cell:not(:last-child) {
|
||||
border-right: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.mat-column-institutions,
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
.type-filter-btn {
|
||||
display: inline-flex;
|
||||
margin: 0;
|
||||
|
||||
@@ -331,20 +331,6 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
min-width: 1120px;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0 10px;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: inline-block;
|
||||
max-width: 520px;
|
||||
@@ -360,10 +346,6 @@ a.title:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table.is-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table-status {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -444,42 +426,6 @@ table.is-hidden {
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
::ng-deep .mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
::ng-deep .mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
::ng-deep .mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-wrap ::ng-deep {
|
||||
.mat-column-type,
|
||||
.mat-column-year,
|
||||
.mat-column-language,
|
||||
.mat-column-citations,
|
||||
.mat-mdc-header-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-mdc-cell:not(:last-child),
|
||||
.mat-mdc-header-cell:not(:last-child) {
|
||||
border-right: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.mat-column-institutions,
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
|
||||
mat-paginator {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -415,6 +415,29 @@ input {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.data-table-container {
|
||||
.mat-mdc-header-cell {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mat-mdc-row {
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
color: var(--sg-text);
|
||||
border-bottom-color: var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.mat-column-institutions,
|
||||
.mat-column-topics {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
|
||||
Reference in New Issue
Block a user