Skip to content

Commit

Permalink
Merge pull request #5114 from colinrotherham/small-checkboxes-divider
Browse files Browse the repository at this point in the history
Fix divider width for small checkboxes
  • Loading branch information
domoscargin committed Jul 11, 2024
2 parents 9bbd9ac + bea7856 commit 357ed9a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/govuk/components/checkboxes/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@
padding-left: ($govuk-touch-target-size - $input-offset) - ($margin-left + $conditional-border-width);
}

.govuk-checkboxes__divider {
width: $govuk-small-checkboxes-size;
margin-bottom: govuk-spacing(1);
}

// Hover state for small checkboxes.
//
// We use a hover state for small checkboxes because the touch target size
Expand Down
21 changes: 21 additions & 0 deletions src/govuk/components/checkboxes/checkboxes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ examples:
- other

- name: with divider and None
screenshot: true
options:
name: with-divider-and-none
fieldset:
Expand Down Expand Up @@ -700,6 +701,26 @@ examples:
- value: b
text: another thing

- name: small with divider and None
screenshot: true
options:
name: small-with-divider-and-none
classes: govuk-checkboxes--small
fieldset:
legend:
text: Which types of waste do you transport regularly?
items:
- value: animal
text: Waste from animal carcasses
- value: mines
text: Waste from mines or quarries
- value: farm
text: Farm or agricultural waste
- divider: or
- value: none
text: None of these
behaviour: exclusive

# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: with idPrefix
hidden: true
Expand Down
6 changes: 4 additions & 2 deletions src/govuk/components/radios/radios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,15 @@ examples:
For properties that are within a geographical area defined by a local council

- name: with a divider
screenshot: true
options:
idPrefix: example-divider
name: example
fieldset:
legend:
text: How do you want to sign in?
items:
- value: governement-gateway
- value: government-gateway
text: Use Government Gateway
- value: govuk-verify
text: Use GOV.UK Verify
Expand Down Expand Up @@ -680,6 +681,7 @@ examples:
text: funkiness

- name: small with a divider
screenshot: true
options:
idPrefix: example-small-divider
name: example
Expand All @@ -688,7 +690,7 @@ examples:
text: How do you want to sign in?
classes: govuk-radios--small
items:
- value: governement-gateway
- value: government-gateway
text: Use Government Gateway
- value: govuk-verify
text: Use GOV.UK Verify
Expand Down

0 comments on commit 357ed9a

Please sign in to comment.