question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button - kind and disabled button doesn't apply when hover and plain

See original GitHub issue

Expected Behavior

disabled styles should apply when hoverindicator or plain is set on a grommet button.

Actual Behavior

No disabled styles applied.

URL, screen shot, or Codepen exhibiting the issue

Use this code when using the kind button, and see how disabled styles don’t apply.

<Button
          label="Disabled"
          disabled
          hoverIndicator
          plain
          icon={<FormNext />}
        />

Related to https://github.com/grommet/grommet-theme-hpe/pull/110

Steps to Reproduce

Your Environment

  • Grommet version: 2.15.0
  • Browser Name and version:
  • Operating System and version (desktop or mobile):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ShimiSuncommented, Nov 9, 2020

I think we have implemented all possible action items for this issue as linked to the PRs above. With button kind, users can define disabled text color, border color, etc but plain will only look at the disabled opacity value props.theme.button.disabled.opacity. The issue we experienced with the HPE theme, is that the opacity is set to 1.0 so you don’t see any drop in opacity on disabled + kind + plain Button. But, if any other theme relied on the grommet default opacity (0.3) or defined their own (as long as it’s not 1.0) then the disabled opacity would give a visual effect of “disabled”. In the case of HPE theme users, it will be recommended not to use plain buttons.

1reaction
ShimiSuncommented, Sep 21, 2020

@leonardodino thanks buddy, from what I’ve seen, Button + plain + disabled + kind (kind is when button.default is defined on the theme), the plain button doesn’t get the text opacity or the text-weak property, so the Button disabled text isn’t reflecting the disabled property well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I make a CSS Hover not work if a button is disabled?
Use the CSS :Not attribute selector to only target elements that don't have the disabled attribute.
Read more >
Making Disabled Buttons More Inclusive - CSS-Tricks
If you use a mouse, and hover over the submit button, a tooltip is shown explaining why the button is disabled. That's great!...
Read more >
HTML button tag - W3Schools
Attributes ; disabled, disabled, Specifies that a button should be disabled ; form, form_id, Specifies which form the button belongs to ; formaction,...
Read more >
Element: <oj-button> - Oracle
JET Button. Description: Themeable, WAI-ARIA-compliant push buttons, with appropriate styles for hover, active, checked, and disabled.
Read more >
Onhover on CSS doesn't work on disabled elements
you have used text as a class in above div but when you apply hover over disabled button you have applied text as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found