Skip to content

Commit 612c8cd

Browse files
committed
Move :global table css to app.css and bug fix
1 parent 0640fa8 commit 612c8cd

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

src/app.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ code {
7676
height: 100%;
7777
width: 100%;
7878
}
79+
[aria-sort="ascending"].govuk-table__header .top-triangle {
80+
fill: #222;
81+
}
82+
[aria-sort="ascending"].govuk-table__header .bottom-triangle {
83+
fill: #bcbcbd;
84+
}
85+
[aria-sort="descending"].govuk-table__header .top-triangle {
86+
fill: #bcbcbd;
87+
}
88+
[aria-sort="descending"].govuk-table__header .bottom-triangle {
89+
fill: #222;
90+
}

src/lib/components/data-vis/table/Table.svelte

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
class={`govuk-table__header ${column.dataType === "number" ? "govuk-table__header--numeric" : ""}`}
145145
title={metaData[column.key].explainer}
146146
aria-sort={sortState.column !== column.key
147-
? "not-sorted"
147+
? "none"
148148
: sortState.column === column.key &&
149149
sortState.order === "descending"
150150
? "descending"
@@ -232,17 +232,4 @@
232232
border-radius: 10%;
233233
padding: 6px;
234234
}
235-
236-
:global([aria-sort="ascending"].govuk-table__header .top-triangle) {
237-
fill: #222;
238-
}
239-
:global([aria-sort="ascending"].govuk-table__header .bottom-triangle) {
240-
fill: #bcbcbd;
241-
}
242-
:global([aria-sort="descending"].govuk-table__header .top-triangle) {
243-
fill: #bcbcbd;
244-
}
245-
:global([aria-sort="descending"].govuk-table__header .bottom-triangle) {
246-
fill: #222;
247-
}
248235
</style>

src/lib/components/ui/Button.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,12 @@
138138
xmlns="http://www.w3.org/2000/svg"
139139
>
140140
<path
141+
class="top-triangle"
141142
d="M8.1875 9.5L10.9609 3.95703L13.7344 9.5H8.1875Z"
142143
fill="currentColor"
143144
></path>
144145
<path
146+
class="bottom-triangle"
145147
d="M13.7344 12.0781L10.9609 17.6211L8.1875 12.0781H13.7344Z"
146148
fill="currentColor"
147149
></path>

0 commit comments

Comments
 (0)