Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover to button with custom color #4394

Closed
stanislav-cervenak opened this issue Jun 10, 2022 · 16 comments
Closed

Hover to button with custom color #4394

stanislav-cervenak opened this issue Jun 10, 2022 · 16 comments
Assignees
Labels
pending Issues that are pending triage

Comments

@stanislav-cervenak
Copy link

stanislav-cervenak commented Jun 10, 2022

Laravel Version: 9.17.0
Nova Version: 4.8.1
PHP Version: 8.1.0
Database Driver & Version:
Operating System and Version: MacOS 12.3.1
Browser type and version: Google Chrome 102

Description:

Custom color set in ./config/nova.php

     'brand' => [
         'colors' => [
             "400" => "218, 35, 30, 0.5",
             "500" => "218, 35, 30",
             "600" => "218, 35, 30, 0.75",
         ]
     ],

After hover to button hover:bg-primary-400 is background-color transparent
In Nova 4.7.0 everything was fine

Default colors have no problem.

Snímka obrazovky 2022-06-10 o 9 38 44

@bashgeek
Copy link

bashgeek commented Jun 10, 2022

Having the same issue with 4.8.1, was fine with 4.7.x

@mira-thakkar
Copy link

Getting same issue with 4.8.1

@crynobone
Copy link
Member

This might be related to changes to Tailwind 3, will investigate.

@crynobone crynobone added the pending Issues that are pending triage label Jun 10, 2022
@jjjrmy
Copy link

jjjrmy commented Jun 10, 2022

Same issue on Login Button

@crynobone
Copy link
Member

Tailwind 3 introduces a new opacity option for all color variants causing alpha/opacity option to become invalid. A quick fix right now is to change ${R}, ${G}, ${B}, ${A} to ${R}, ${G}, ${B} for each nova.brand.colors.*

@jimmitjoo
Copy link

Same issue for me when upgrading from 4.7 to 4.8 and upwards.

@gldrenthe89
Copy link

Same issue here

@stanislav-cervenak
Copy link
Author

Same issue in 4.10.0

@crynobone crynobone self-assigned this Jun 23, 2022
@jimmitjoo
Copy link

Tailwind 3 introduces a new opacity option for all color variants causing alpha/opacity option to become invalid. A quick fix right now is to change ${R}, ${G}, ${B}, ${A} to ${R}, ${G}, ${B} for each nova.brand.colors.*

That does work as a temporary fix for me. Thank you!

Changed the brand colors like this:

'colors' => [
    "400" => "251,154,164",
    "500" => "238,43,71",
    "600" => "245,103,118",
]

@baszach
Copy link

baszach commented Jul 5, 2022

The problem only occurs when the opacity is set. For example "400" => "251,154,164",0.6. Like @jimmitjoo said you can choose the color codes without opacity. For example FF9900 with 50% opacity is the same as F2BE72. It's also more consistent to work with specific color codes and not opacity.

@gldrenthe89
Copy link

The problem only occurs when the opacity is set. For example "400" => "251,154,164",0.6. Like @jimmitjoo said you can choose the color codes without opacity. For example FF9900 with 50% opacity is the same as F2BE72. It's also more consistent to work with specific color codes and not opacity.

That is not a solution. You need the opacity for the colors to be more consistent when on dark or light mode. Using a hex color can result in bad styling on dark mode but good styling on light mode.

This issue just needs fixing. I dont know why this is taking them such a long time for this.

@ramsha-mt
Copy link

Tailwind 3 introduces a new opacity option for all color variants causing alpha/opacity option to become invalid. A quick fix right now is to change ${R}, ${G}, ${B}, ${A} to ${R}, ${G}, ${B} for each nova.brand.colors.*

That does work as a temporary fix for me. Thank you!

Changed the brand colors like this:

'colors' => [
    "400" => "251,154,164",
    "500" => "238,43,71",
    "600" => "245,103,118",
]

Could be a temporary fix but this needs fixing asap because the hover effect from buttons will be gone!!

@scramatte
Copy link

Hi,

Same issue here. Please fix it asap.
Regards

@davidhemphill
Copy link
Contributor

This has been fixed and will be included in the next release. 👍

@jodhaakbar
Copy link

still issue on nova 4.13.0

@davidhemphill
Copy link
Contributor

I confirmed this to be working on a fresh Nova application running 4.13.0. If you still have the issue, please post a new one with all the details filled in so we can replicate the issue on our end. Thanks!

@laravel laravel locked as resolved and limited conversation to collaborators Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending Issues that are pending triage
Projects
None yet
Development

No branches or pull requests