-
login and other links that don't have gradient work fine just exactly like I want. see how the login hover effect looks like! <div class="hidden sm:block sm:ml-6">
<div class="flex space-x-4">
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
<a href="/" class="bg-gradient-to-r from-indigo-600 via-blue-800 to-gray-900 hover:bg-gradient-to-r from-indigo-100 text-white px-3 py-2 rounded-md text-sm font-medium" aria-current="page">Home</a>
{% if (current_user.is_authenticated) and (current_user.username == username.admin) %}
<a href="/admin" class="bg-gray-900 text-white block px-3 py-2 rounded-md text-base font-medium" aria-current="page">Admin</a>
{% endif %}
{% if not current_user.is_authenticated %}
<a href="/login" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Login</a>
<a href="/signup" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Signup</a>
{% endif %}
{# <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Calendar</a> #}
</div>
</div> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're using
To change the background on hover, you'll need at least one of In addition your |
Beta Was this translation helpful? Give feedback.
You're using
To change the background on hover, you'll need at least one of
hover:from-<some color>
,hover:via-<some color>
, orhover:to-<some color>
.In addition your
hover:bg-gradient-to-r
is unnecessary (it duplicates the styles inherited frombg-gradient-to-r
, and yourfrom-indigo-600
isn't doing anything (it's overrided by by yourfrom-indigo-100
).