Skip to content

Instantly share code, notes, and snippets.

View simeydotme's full-sized avatar
🍉

Simon Goellner simeydotme

🍉
View GitHub Profile
@simeydotme
simeydotme / odd-last-child.html
Created February 14, 2025 10:11
tailwind selector for the last element in a container (if the # if elements in the container is odd)
<ul class="[&>*:nth-last-child(2)_~_:nth-of-type(odd)]:text-red-500">
<li />
<li />
<li />
<li />
<li /> <!-- red -->
</ul>
<ul class="[&>*:nth-last-child(2)_~_:nth-of-type(odd)]:text-red-500">
<li />
@simeydotme
simeydotme / getTransitionSpeed.js
Last active August 29, 2015 14:00
a jQuery function to get either all the transition times or just the longest css transition time on an element.
function getTransitionSpeed( $el , returnWholeArray ) {
returnWholeArray = returnWholeArray || false;
var speed = $el.css("transition-duration").split(","),
speedLength = speed.length;
for( var i = 0; i < speedLength; i++) {
var multiplier = 1000;