Skip to content

Complex conversions #27

@pas256

Description

@pas256

Feel free to close this if it is not helpful, but thought I would share.

I attempted to convert

.hover-underline-animation {
  display: inline-block;
  position: relative;
  color: #0087ca;
}

.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #0087ca;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

which resulted in:
Screen Shot 2023-01-29 at 3 14 32 PM

I put a bit of time into it, and the conversion is possible to Tailwind. The result I came up with is:

inline-block
relative
text-blue-600

after:content-['']
after:absolute
after:w-full
after:scale-0
after:h-0.5
after:bottom-0
after:left-0
after:bg-blue-600
after:origin-bottom-right
after:transition
after:ease-out
after:duration-200

hover:after:scale-100
hover:after:origin-bottom-left

so if someone wanted to take on some of these conversions, I thought this might help.

Thanks for the tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions