From 33aa357d153f1458d742f4c027a758cc7b1d3753 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 13 Feb 2025 10:00:56 +0000 Subject: [PATCH 1/2] Fix typo --- packages/components/panel/_panel.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/panel/_panel.scss b/packages/components/panel/_panel.scss index b28adaa77..4cad5f94c 100644 --- a/packages/components/panel/_panel.scss +++ b/packages/components/panel/_panel.scss @@ -16,7 +16,7 @@ // The overflowing is a particular problem with the panel component since it uses white // text: when the text overflows the container, it is invisible on the white (page) // background. When the text in our other components overflow, the user might have to scroll -// horizontally to view it but the the text remains legible. +// horizontally to view it but the text remains legible. // 4. Support IE (autoprefixer doesn't add this as it's not a prefix) $nhsuk-border-width-panel: nhsuk-spacing(1); From c2150608d048638f4b93d35e3bb9c1b83ce36abd Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 13 Feb 2025 10:01:04 +0000 Subject: [PATCH 2/2] Prefer SassDoc style comments --- packages/components/panel/_panel.scss | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/components/panel/_panel.scss b/packages/components/panel/_panel.scss index 4cad5f94c..05aa6a17a 100644 --- a/packages/components/panel/_panel.scss +++ b/packages/components/panel/_panel.scss @@ -1,23 +1,23 @@ -// ========================================================================== -// COMPONENTS / #PANEL -// ========================================================================== - -// Original code taken from GDS (Government Digital Service) -// https://github.com/alphagov/govuk-frontend - -// 1. Adds a transparent border for high contrast modes -// 2. This subtracts the transparent border width from the padding (because the border -// visually adds to the total padding) -// 3. This is an if-all-else-fails attempt to stop long words from overflowing the container -// on very narrow viewports by forcing them to break and wrap instead. This -// overflowing is more likely to happen when user increases text size on a mobile eg. using -// iOS Safari text resize controls. - -// The overflowing is a particular problem with the panel component since it uses white -// text: when the text overflows the container, it is invisible on the white (page) -// background. When the text in our other components overflow, the user might have to scroll -// horizontally to view it but the text remains legible. -// 4. Support IE (autoprefixer doesn't add this as it's not a prefix) +//// +/// Panel component +/// +/// 1. Adds a transparent border for high contrast modes +/// 2. This subtracts the transparent border width from the padding (because the border +/// visually adds to the total padding) +/// 3. This is an if-all-else-fails attempt to stop long words from overflowing the container +/// on very narrow viewports by forcing them to break and wrap instead. This +/// overflowing is more likely to happen when user increases text size on a mobile eg. using +/// iOS Safari text resize controls. + +/// The overflowing is a particular problem with the panel component since it uses white +/// text: when the text overflows the container, it is invisible on the white (page) +/// background. When the text in our other components overflow, the user might have to scroll +/// horizontally to view it but the text remains legible. +/// 4. Support IE (autoprefixer doesn't add this as it's not a prefix) +/// +/// @group components +/// @link https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) +//// $nhsuk-border-width-panel: nhsuk-spacing(1);