Skip to content

Commit

Permalink
Remove nhsuk-button--disabled modifier
Browse files Browse the repository at this point in the history
Disabled style is applied to any nhs-button with the disabled attribute
  • Loading branch information
paulrobertlloyd committed Nov 20, 2024
1 parent 71c3b3b commit e7b5a1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/components/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Find out more about the button component and when to use it in the [NHS digital
#### HTML markup

```html
<button class="nhsuk-button nhsuk-button--disabled" type="submit" disabled="disabled" aria-disabled="true" data-module="nhsuk-button">
<button class="nhsuk-button" type="submit" disabled="disabled" aria-disabled="true" data-module="nhsuk-button">
Disabled button
</button>
```
Expand Down
1 change: 0 additions & 1 deletion packages/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ $button-shadow-size: 4px;
/**
* Button disabled states
*/
.nhsuk-button--disabled,
.nhsuk-button:disabled {
opacity: (0.5);
pointer-events: none;
Expand Down
3 changes: 1 addition & 2 deletions packages/components/button/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

{# Define common attributes that we can use across all element types #}
{% set commonAttributes %} class="nhsuk-button
{%- if params.classes %} {{ params.classes }}{% endif %}
{%- if params.disabled %} nhsuk-button--disabled{% endif %}"
{%- if params.classes %} {{ params.classes }}{% endif %}"
data-module="nhsuk-button"
{% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %}
{{- nhsukAttributes(params.attributes) }}
Expand Down

0 comments on commit e7b5a1c

Please sign in to comment.