Skip to content

Commit

Permalink
Update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrussler committed May 24, 2024
1 parent a82872b commit 3fb6810
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 4 deletions.
85 changes: 82 additions & 3 deletions app/assets/stylesheets/components/table.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,98 @@
.mainstream-table {
.govuk-accordion__show-all {
display: none;

.js-enabled & {
display: block;
margin: 0;
padding: 0;
line-height: 1;
float: right;
}
}

.govuk-accordion {
.js-enabled & {
border-bottom: 0;
}

button {
border: none;
padding: 0;
}
}

.govuk-accordion__section-heading-text {
display: none;
}

.govuk-table__body {
position: relative;

.title {
@include govuk-responsive-margin(0)
}

.updated {
@include govuk-responsive-margin(2, "top");

display: block;
color: $govuk-secondary-text-colour;
}
}

.govuk-table__row {
&:nth-of-type(2) {
background: govuk-colour("light-grey");

.govuk-table__cell {
border-bottom: 0;
}

.govuk-accordion {
margin-bottom: 0 !important;
}

.govuk-accordion__section {
padding-top: 0;
}

.govuk-summary-list,
.gem-c-summary__block {
margin-bottom: 0;
}

.govuk-table__cell {
padding: 0 govuk-spacing(2);
}
}
}

.govuk-accordion__controls {
display: none;
}

.govuk-accordion__section-heading-text {
.js-enabled & {
display: none;
}
}

.govuk-accordion__section {
&.govuk-accordion__section--expanded {
border-bottom: 1px solid #b1b4b6;
}
}

.govuk-accordion__section-header {
position: absolute;
top: 0;
top: govuk-spacing(2);
right: 0;
}

.govuk-accordion__show-all {
float: right;
.govuk-accordion__section-content {
.js-enabled & {
padding: 0;
}
}
}
2 changes: 1 addition & 1 deletion app/views/components/_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<%= t.body do %>
<%= t.row do %>
<%= t.cell sanitize("<div><p><a href='#{row[:href]}'>#{row[:title]}</a></p><span>Last updated: #{row[:updated]}</span></div>") %>
<%= t.cell sanitize("<p class='title govuk-body'><a href='#{row[:href]}' class='govuk-!-font-weight-bold'>#{row[:title]}</a><span class='updated govuk-!-font-size-16'>Last updated: #{row[:updated]}</span></p>") %>
<%= t.cell row[:assigned] %>
<%= t.cell row[:status] %>
<%= t.cell "" %>
Expand Down

0 comments on commit 3fb6810

Please sign in to comment.