refactor: Improve tab navigation styling with target selector
This commit is contained in:
1 parent
5eb6024a1b
commit
8dd9ad4a0a
1 file changed
+6
-7
@@ -3,15 +3,14 @@
|
|||||||
<!-- Tabs Navigation -->
|
<!-- Tabs Navigation -->
|
||||||
<div class="mb-4 border-b border-gray-200">
|
<div class="mb-4 border-b border-gray-200">
|
||||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
<a href="#tab-login" class="whitespace-nowrap py-4 px-1 font-medium text-sm
|
<a href="#tab-login" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
|
||||||
[&:not(:target):not(:has(~:target))]:border-b-2 [&:not(:target):not(:has(~:target))]:border-primary [&:not(:target):not(:has(~:target))]:text-primary
|
text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300
|
||||||
[&:target]:border-b-2 [&:target]:border-primary [&:target]:text-primary
|
[#tab-login:target~&]:text-primary [#tab-login:target~&]:border-primary">
|
||||||
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
|
|
||||||
Login
|
Login
|
||||||
</a>
|
</a>
|
||||||
<a href="#tab-create-account" class="whitespace-nowrap py-4 px-1 font-medium text-sm
|
<a href="#tab-create-account" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
|
||||||
[&:target]:border-b-2 [&:target]:border-primary [&:target]:text-primary
|
text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300
|
||||||
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
|
[#tab-create-account:target~&]:text-primary [#tab-create-account:target~&]:border-primary">
|
||||||
Create Account
|
Create Account
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in new issue
Block a user