Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Tailwind Css particular class not working

$
0
0

I am implementing Tailwind CSS with my blazor project and so far everything is working fine. All basic UI is working as expected. But one particular element attribute on a certain element is not taking.

The element in question is direct implementation of the dropdown election from Tailwind.

<div class="w-9/12">      @* <label id="listbox-label" class="block  text-sm font-medium leading-6 text-gray-900">Assigned to</label> *@<div class="relative"><button @onclick=ToggleDropdown type="button" class="relative w-full h-full cursor-default rounded-md bg-white py-3.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-600 sm:text-sm sm:leading-6" aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label"><span class="block truncate">Tom Cook</span><span class="pointer-events-none absolute right-0 inset-y-0 flex items-center pr-2"><svg class="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd" /></svg></span></button><!--            Select popover, show/hide based on select state.            Entering: ""              From: ""              To: ""            Leaving: "transition ease-in duration-100"              From: "opacity-100"              To: "opacity-0"          --><ul class="@(isDropdownOpen?"": "hidden") absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" tabindex="-1" role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-option-3"><!--                Select option, manage highlight styles based on mouseenter/mouseleave and keyboard navigation.                Highlighted: "bg-indigo-600 text-white", Not Highlighted: "text-gray-900"              --><li class="relative cursor-default select-none py-2 pl-8 pr-4 text-gray-900" id="listbox-option-0" role="option"><!-- Selected: "font-semibold", Not Selected: "font-normal" --><span class="block truncate font-normal">Wade Cooper</span><!--                    Checkmark, only display for selected option.                    Highlighted: "text-white", Not Highlighted: "text-indigo-600"                  --><span class="absolute inset-y-0 left-0 flex items-center pl-1.5 text-indigo-600"><svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd" /></svg></span></li><!-- More items... --></ul></div></div>

The problem is occurring with the inset-y-o at the span class that holds the SVG for the dropdown icon. Every other class is working. You can see from the pic below:

tailwind issue

There should be two element styles: (top:0 and bottom:0) applied but are not. When I apply them separately it works.

Your kind help in this will be highly appreciated.


Viewing all articles
Browse latest Browse all 4839

Trending Articles