Hacker Newsnew | past | comments | ask | show | jobs | submit | ska-dev's commentslogin

I made this - it's not free, but it's FSE and Tailwind: https://sinukoduleheabi.ee/blocks/


> However, closer examination reveals a huge line of highly obfuscated code when scrolling way over to the right.

Seems like a pointless method to "hide" the code but I've fallen for this myself looking through some files in a compromised WordPress installation and missed these "off the screen" bits initially.


It's like Tailwind playground but instead of editing raw HTML directly you can edit WordPress blocks that have a UI for Tailwind classes and then get HTML or JSX back once you're done.


> I was really annoyed by editing big amount of hover:, focus: and other styles because of the duplication

I share that sentiment. I even "invented" something called "selectors" [1] which is a UI to handle all the Tailwind variants.

I popped this monstrosity of a Tailwind class in and your extension worked wonderfully in creating a tree of it: [2]

How ever when I collapsed it back to a single line something went wrong and it increased the length of the classes by ~15x creating this: [3]

[1] https://sinukoduleheabi.ee/docs/ska-blocks/selectors/

[2] https://pastebin.com/raw/Nk3xBHfw

[3] https://pastebin.com/raw/bKLdTYjD (Edit: pastebin removed it for some reason)


Wow, this is huge! :)

I tried it to see what's going on. There are 2 issues that I need to fix:

- Variables. It splits incorrectly

  [--variations-gap:
    theme(spacing[2])]
- Arbitrary variants are split incorrectly as well

  [&>h2:
    first-child]:


Yesterday I was reaching for the JS I have used in the past for smooth scrolling to anchor links, until I discovered that `scroll-behavior: smooth;` exists.


Thank god. Most if not all “smooth scrolling” suck on devices that already offer smooth scrolling natively. I tried contributing solution back but they just didn’t care.


Native smooth-scrolling is one area where Safari is actually really good and Chrome is bizarrely awful.


Won’t you still need some smooth-scrolling JS for cases where you’re scrolling to an element dynamically? Like when updating a route without a full page load or click.


Nope!

    Element.scrollIntoView({ behavior: 'smooth' });
https://developer.mozilla.org/en-US/docs/Web/API/Element/scr...


Looks like a mammoth undertaking with endless avenues for improvement, how do you decide what is worthy and what to leave on the backlog?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: