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

    mysterious-toddler-20573

    02/11/2022, 10:22 PM
    pretty proud of myself tbh
  • b

    bland-coat-6833

    02/11/2022, 10:23 PM
    If things are coming to native CSS the I think the cool kids use PostCSS - tomorrow's features today.
  • g

    gorgeous-airport-54386

    02/11/2022, 10:24 PM
    basically:
    Copy code
    css
    .foo {
      & .bar {
        /* the & is mandatory */
      }
      @nest .baz + & {
        /* @nest needed if & not at start */
      }
    }
  • g

    gorgeous-ghost-95789

    02/11/2022, 10:31 PM
    Damnit w3c.. why you gotta do is like that?
  • g

    gorgeous-airport-54386

    02/11/2022, 10:32 PM
    as long as the & is at the start we should be good, but i don't know if less handles
    @nest
  • m

    mysterious-toddler-20573

    02/11/2022, 10:34 PM
    many such cases
  • m

    mysterious-toddler-20573

    02/11/2022, 10:45 PM
    https://github.com/bigskysoftware/untitled/blob/master/docs/concepts.md
  • m

    mysterious-toddler-20573

    02/11/2022, 10:45 PM
    some fleshed out concepts to make sure I'm communicating what I'm thinking properly
  • g

    gorgeous-airport-54386

    02/11/2022, 10:48 PM
    > Tabs could be similar defined like so: >
    Copy code
    html
    > <div role="tab">
    >   <a href="/foo">Tab 1</a>
    >   <a href="/foo">Tab 2</a>
    >   <a href="/foo">Tab 3</a>
    > </div>
    >
    > We would like to explore using the role attribute for this.
    Copy code
    html
    <div role="tablist">
      <a role="tab" href="/foo">Tab 1</a>
      <a role="tab" href="/foo">Tab 2</a>
      <a role="tab" href="/foo">Tab 3</a>
    </div>
  • m

    mysterious-toddler-20573

    02/11/2022, 10:48 PM
    I like minimizing the amount of intervention in vanilla html, but I am willing to listen to reason
  • m

    mysterious-toddler-20573

    02/11/2022, 10:49 PM
    a goal here is to keep it as close to vanilla as possible
  • g

    gorgeous-airport-54386

    02/11/2022, 10:49 PM
    reason: don't style incorrect aria correctly
  • m

    mysterious-toddler-20573

    02/11/2022, 10:49 PM
    the role on the div should be
    tablist
    or
    tabs
    or something like that though, that's a typo
  • m

    mysterious-toddler-20573

    02/11/2022, 10:52 PM
    fixed
  • m

    mysterious-toddler-20573

    02/11/2022, 10:52 PM
    (ish)
  • g

    gorgeous-airport-54386

    02/11/2022, 10:54 PM
    role
    is not an arbitrary string, it does stuff. and if you don't put the correct roles on things it will not be recognized as a valid tab list
  • m

    mysterious-toddler-20573

    02/11/2022, 10:55 PM
    roger, I can accept that
  • m

    mysterious-toddler-20573

    02/11/2022, 10:56 PM
    are we allowed to add our own custom roles? (e.g. card)?
  • g

    gorgeous-airport-54386

    02/11/2022, 10:57 PM
    no
  • g

    gorgeous-airport-54386

    02/11/2022, 10:58 PM
    use a class for that
  • g

    gorgeous-airport-54386

    02/11/2022, 10:58 PM
    the correct element for a card is usually li, article or section
  • m

    mysterious-toddler-20573

    02/11/2022, 10:58 PM
    OK, so we will have a mix of aria support for things defined by them
  • m

    mysterious-toddler-20573

    02/11/2022, 10:58 PM
    I will update the docs to reflect that
  • m

    mysterious-toddler-20573

    02/11/2022, 10:59 PM
    Do you think we should have an opinionated semantic option for card or a class?
  • g

    gorgeous-airport-54386

    02/11/2022, 10:59 PM
    using css to enforce proper aria use is a really powerful idea imo
  • m

    mysterious-toddler-20573

    02/11/2022, 10:59 PM
    agreed
  • g

    gorgeous-airport-54386

    02/11/2022, 10:59 PM
    i don't think an option exists
  • g

    gorgeous-airport-54386

    02/11/2022, 11:00 PM
    mvp.css uses
    article > aside
    , which is very incorrect
  • m

    mysterious-toddler-20573

    02/11/2022, 11:00 PM
    Well, we could just say "In our CSS lib, article renders as a card"
  • g

    gorgeous-airport-54386

    02/11/2022, 11:00 PM
    maybe
    li > article
12345...44Latest