Trying to change govukFieldset but I keep getting testing errors

This commit is contained in:
Jonathan Bobel
2023-08-31 14:57:45 -04:00
parent f82d77cdaf
commit 67c8bef7aa
9 changed files with 13 additions and 63 deletions

View File

@@ -1,5 +1,5 @@
{% from "../error-message/macro.njk" import usaErrorMessage -%}
{% from "../fieldset/macro.njk" import usaFieldset %}
{% from "../fieldset/macro.njk" import govukFieldset %}
{% from "../hint/macro.njk" import usaHint %}
{% from "../label/macro.njk" import usaLabel %}
@@ -95,7 +95,7 @@
<div class="usa-form-group {%- if params.errorMessage %} usa-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
{% if params.fieldset %}
{% call usaFieldset({
{% call govukFieldset({
describedBy: describedBy,
classes: params.fieldset.classes,
attributes: params.fieldset.attributes,

View File

@@ -1,50 +0,0 @@
@import "../../settings/all";
@import "../../tools/all";
@import "../../helpers/all";
@include govuk-exports("govuk/component/hint") {
.usa-hint {
@include govuk-font($size: 19);
display: block;
margin-bottom: govuk-spacing(3);
color: $govuk-secondary-text-colour;
}
// Reduces margin-bottom of hint when used after the default label (no class)
// or govuk-label--s for better vertical alignment.
// This adjustment will not work when the label is inside the <h1>, however it
// is unlikely that the default or govuk-label--s class would be used in this
// case.
// This adjustment will not work in browsers that do not support :not().
// Users with these browsers will see the default size margin (5px larger).
.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .usa-hint {
margin-bottom: govuk-spacing(2);
}
// Reduces margin-bottom of hint when used after the default legend (no class)
// or govuk-fieldset__legend--s for better vertical alignment.
// This adjustment will not work when the legend is outside the <h1>, however
// it is unlikely that the default or govuk-fieldset__legend--s class would be
// used in this case.
// This adjustment will not work in browsers that do not support :not().
// Users with these browsers will see the default size margin (5px larger).
.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .usa-hint {
margin-bottom: govuk-spacing(2);
}
// Reduces visual spacing of legend when there is a hint
.govuk-fieldset__legend + .usa-hint,
.govuk-fieldset__legend + .usa-hint {
margin-top: -(govuk-spacing(1));
}
}