diff --git a/.changeset/fix-back-to-top-hover.md b/.changeset/fix-back-to-top-hover.md new file mode 100644 index 0000000000..c5052c34a9 --- /dev/null +++ b/.changeset/fix-back-to-top-hover.md @@ -0,0 +1,5 @@ +--- +"@patternfly/elements": patch +--- + +``: fixed background color during hover and focus. diff --git a/elements/pf-back-to-top/pf-back-to-top.css b/elements/pf-back-to-top/pf-back-to-top.css index 2d708fee8c..4d74858c9d 100644 --- a/elements/pf-back-to-top/pf-back-to-top.css +++ b/elements/pf-back-to-top/pf-back-to-top.css @@ -41,14 +41,16 @@ a { gap: var(--pf-c-button__icon--m-end--MarginLeft, var(--pf-global--spacer--xs, 0.25rem)); } -a:hover { +a:hover, +a:focus { --pf-c-button--m-primary--Color: var(--pf-c-button--m-primary--hover--Color, var(--pf-global--Color--light-100, #fff)); --pf-c-button--m-primary--BackgroundColor: var(--pf-c-button--m-primary--hover--BackgroundColor, var(--pf-global--primary-color--200, #004080)); } -a:focus { - --pf-c-button--m-primary--Color: var(--pf-c-button--m-primary--hover--Color, var(--pf-global--Color--light-100,#fff)); +[part="trigger"]:is(pf-button):hover, +[part="trigger"]:is(pf-button):focus-within { --pf-c-button--m-primary--BackgroundColor: var(--pf-c-button--m-primary--hover--BackgroundColor, var(--pf-global--primary-color--200, #004080)); + --pf-c-button--m-primary--Color: var(--pf-c-button--m-primary--hover--Color, var(--pf-global--Color--light-100, #fff)); } [part="trigger"][hidden] {