Skip to content

Commit

Permalink
Add additions styles for elements with "hidden" attribute
Browse files Browse the repository at this point in the history
We use hidden attribute to hide items that don't match live-search results.

Normally, the broser would hide the element, but as these ones have the display property set, we need to set additional override styles.
  • Loading branch information
kr8n3r committed Feb 7, 2025
1 parent 3db5508 commit c036ea6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/assets/stylesheets/components/message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ a {
width: auto;
}

// we use hidden attribute to hide items that don't match live-search results
// normally the broser would hide the element, but as this one has display property
// set, we need to set additional override styles
&[hidden] {
display: none;
}

}

&-folder,
Expand Down
13 changes: 13 additions & 0 deletions app/assets/stylesheets/govuk-frontend/extensions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,16 @@ $govuk-grid-widths: map.merge($govuk-grid-widths, $notify-grid-widths);
width: 66.66% !important;
}
/* stylelint-enable declaration-no-important */

// we use hidden attribute to hide items that don't match live-search results
// normally the broser would hide the element, but as this one has display property
// set, we need to set additional override styles
// used on /organisations/<id>/settings/email-branding/add
// used on /organisations/<id>/settings/letter-branding/add
// aused on /organisations/<id>/settings/add-nhs-local-organisation for NHS services
// used on /services/<id>/service-settings/link-service-to-organisation
// used on /services/>id>/service-settings/(set-email/letter)-branding
.govuk-checkboxes__item[hidden],
.govuk-radios__item[hidden] {
display: none;
}

0 comments on commit c036ea6

Please sign in to comment.