https://htmx.org logo
Join Discord
Powered by
# missing_dot_css
  • m

    mysterious-toddler-20573

    02/11/2022, 10:01 PM
    I would be interested in someone who has used tailwinds a lot: what are the top 10 most useful classes/ideas from it if we were to offer them in a stripped down version?
  • m

    mysterious-toddler-20573

    02/11/2022, 10:03 PM
    refining the language around the facets of untitled.css: * Classless CSS - It renders well out of the box with Vanilla HTML, like a classless CSS library such as pico * Semantic Power Structure - It takes advantage of semantic, lesser used tags such as
    nav
    ,
    main
    and
    section
    to allow for more elaborate layouts in pure HTML * Aria-Driven Components - It offers "High Power" arias that capture high level components on, as much as is possible, a single CSS element * Utility Classes - It offers a set of [utility classes](https://cube.fyi/utility.html) that captures the 80/20 of libraries like tailwinds
  • m

    mysterious-toddler-20573

    02/11/2022, 10:04 PM
    @User turned me on to the Aria-Driven components idea and I like it
  • m

    mysterious-toddler-20573

    02/11/2022, 10:05 PM
    Again the goal here is to provide a css library that "looks right" out of the box, then allows you to do some styling/layout with some opinionated semantic HTML, then add some components via an aria system, then do a bit of tweaking with utility classes. It is not intended to be a complete design system for a full, final, commercial project, but rather get you going and say 50% of the way there.
  • m

    mysterious-toddler-20573

    02/11/2022, 10:06 PM
    and let you scale in to how much you want to move beyond vanilla HTML in much the same way htmx lets you scale in to AJAX
  • g

    gorgeous-ghost-95789

    02/11/2022, 10:07 PM
    CSS variables also seem like a big part of the solution
  • m

    mysterious-toddler-20573

    02/11/2022, 10:07 PM
    yes
  • b

    bland-coat-6833

    02/11/2022, 10:07 PM
    So in my view, Tailwind is super low-level. It feels like there's close to a 1-2-1 mapping of a CSS property and a Tailwind class. I think that the reason it's so popular is that the JS frontends are all about components, so you can use it in a component and then use that component whever you want. LoB and all that. I think that the best ideas from it are: 1. massive coverage: a lot of CSS is included. 2. learnable syntax.
    ml-1
    for
    margin-left: ???
    but also then
    hover:ml-1
    for the hover version.
  • b

    bland-coat-6833

    02/11/2022, 10:08 PM
    WRT ARIA: https://www.accessibility-developer-guide.com/knowledge/aria/bad-practices/
  • g

    gorgeous-airport-54386

    02/11/2022, 10:09 PM
    Copy code
    html
    <div class="margin:1 :hover{margin:1}">
  • g

    gorgeous-airport-54386

    02/11/2022, 10:10 PM
    most learnable syntax i can think of
  • m

    mysterious-toddler-20573

    02/11/2022, 10:11 PM
    perhaps
    margin:1
    is a relative designation?
  • m

    mysterious-toddler-20573

    02/11/2022, 10:11 PM
    Is that what that means?
  • m

    mysterious-toddler-20573

    02/11/2022, 10:11 PM
    I am old school so that reads "margin is 1px" to me
  • g

    gorgeous-airport-54386

    02/11/2022, 10:12 PM
    my unit of choice would be 1 line height
  • m

    mysterious-toddler-20573

    02/11/2022, 10:12 PM
    yes 👑
  • m

    mysterious-toddler-20573

    02/11/2022, 10:12 PM
    @User do you have this book: https://every-layout.dev/
  • m

    mysterious-toddler-20573

    02/11/2022, 10:12 PM
    ?
  • g

    gorgeous-airport-54386

    02/11/2022, 10:12 PM
    vertical rhythm
  • g

    gorgeous-airport-54386

    02/11/2022, 10:12 PM
    no
  • m

    mysterious-toddler-20573

    02/11/2022, 10:12 PM
    May I buy it for you?
  • b

    bland-coat-6833

    02/11/2022, 10:12 PM
    Personally, I've found that Tachyons is good enough for replacing Tailwind - a small set of classes that do most of what I want from Tailwind. With Tailwind you really have to purge. No one uses all of it.
  • m

    mysterious-toddler-20573

    02/11/2022, 10:13 PM
    yes, I'd like to get the 80/20 or tailwinds or more like the 95/5 because, if you want tailwinds, just use tailwinds
  • b

    brave-magazine-28098

    02/11/2022, 10:13 PM
    have you thought about a tailwind plugin?
  • m

    mysterious-toddler-20573

    02/11/2022, 10:13 PM
    otoh, I think a small and controlled ability to tweak would keep untitled.css in play longer
  • m

    mysterious-toddler-20573

    02/11/2022, 10:14 PM
    no
  • b

    brave-magazine-28098

    02/11/2022, 10:14 PM
    their form plugin adds nice default styling to form inputs for example
  • b

    brave-magazine-28098

    02/11/2022, 10:14 PM
    https://github.com/tailwindlabs/tailwindcss-forms
  • m

    mysterious-toddler-20573

    02/11/2022, 10:14 PM
    that sounds like a good approach, but they are coming from another direction
  • m

    mysterious-toddler-20573

    02/11/2022, 10:15 PM
    I want this to start like a classeless library, progress through some opinionated pure semantic HTML, then helper classes/arias (willing to discuss this) and then finally some small tweaks
12345...44Latest