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

    swift-translator-13366

    09/22/2022, 3:08 PM
    I think
    .permalink-anchor
    isn't very clear, or necessarily accurate (e.g. the anchored content need not have a permanence guarantee). Perhaps
    .visible-anchor
    ,
    .anchor-link
    or even just
    .anchor
    ?
  • g

    gorgeous-airport-54386

    09/22/2022, 3:09 PM
    .hashlink
    ?
  • g

    gorgeous-airport-54386

    09/22/2022, 3:09 PM
    or
    .fragment-link
  • s

    swift-translator-13366

    09/22/2022, 3:10 PM
    I'd rather use "fragment" or "anchor" if the idea is to lean on the native affordances (and terminology, by extension) as much as possible
  • g

    gorgeous-airport-54386

    09/22/2022, 3:10 PM
    But you don't put the class on the fragment, rather the permalink of the fragment
  • s

    swift-translator-13366

    09/22/2022, 3:11 PM
    right, but a named element is an anchor, right? A hashed link points to an anchor, IIUC
  • g

    gorgeous-airport-54386

    09/22/2022, 3:12 PM
    Not to my knowledge, isn't an anchor an element?
  • s

    swift-translator-13366

    09/22/2022, 3:12 PM
    Oh right, there's that ambiguity too
  • s

    swift-translator-13366

    09/22/2022, 3:12 PM
    I was thinking about any named element
  • s

    swift-translator-13366

    09/22/2022, 3:12 PM
    which is addressable via an URL fragment
  • g

    gorgeous-airport-54386

    09/22/2022, 3:12 PM
    This pattern is annoying because it's on lots of sites but there is no standard name for it
  • s

    swift-translator-13366

    09/22/2022, 3:13 PM
    In any case, given the actual effect of the CSS you've assigned to this selector, it's clearly meant to make a named element (anchor or otherwise) visually apparent in the page, so I think the "visible" part should be there
  • g

    gorgeous-airport-54386

    09/22/2022, 3:17 PM
    https://twitter.com/DenizAksimsek/status/1572968209887674371
  • t

    tall-dinner-62086

    09/22/2022, 3:19 PM
    The bit after the
    #
    in a url is called a fragment., as specified in RFC 3986
  • t

    tall-dinner-62086

    09/22/2022, 3:19 PM
    It's pretty standardized
  • g

    gorgeous-airport-54386

    09/22/2022, 3:20 PM
    we're not talking about the url fragment, but the visual affordance that helps you use fragments without opening devtools to find an id
  • t

    tall-dinner-62086

    09/22/2022, 3:21 PM
    oh sorry I should've clicked through the twitter link
  • s

    swift-translator-13366

    09/22/2022, 3:21 PM
    On a separate note, I dislike the single-letter abbreviations in the selectors. There aren't many listed in the gist, but v-h and f-row/col/switch should IMO be more explicit.
  • s

    swift-translator-13366

    09/22/2022, 3:22 PM
    especially given the vw and vh units
  • g

    gorgeous-airport-54386

    09/22/2022, 3:22 PM
    I could rename f-row to flex-row, but i want a short name for v-h
  • g

    gorgeous-airport-54386

    09/22/2022, 3:22 PM
    It feels wrong to have a long name for an element that usually only holds one character
  • t

    tall-dinner-62086

    09/22/2022, 3:22 PM
    I usually refer to those as anchor links. As in they link to an anchor.
  • g

    gorgeous-airport-54386

    09/22/2022, 3:24 PM
    Copy code
    html
    <h1>
      <sub-title>BREAKING NEWS</sub-title>
      <visually-hidden>—</visually-hidden>
      A thing happens in a place
    </h1>
  • s

    swift-translator-13366

    09/22/2022, 3:24 PM
    Name it "🙈" 😛
  • t

    tall-dinner-62086

    09/22/2022, 3:25 PM
    But I think I'm relying on an old definition of an html tag, or maybe just a false memory of it.
  • s

    swift-translator-13366

    09/22/2022, 3:25 PM
    (I don't have a good solution to that, but personally I'd prefer the spelled-out version. It's not like you'd sprinkle it all over the page, I believe it would be used sparingly)
  • s

    swift-translator-13366

    09/22/2022, 3:27 PM
    That raises a good question — an
    <a>
    tag is called an anchor because it links somewhere, not because one can link to it.
  • t

    tall-dinner-62086

    09/22/2022, 3:28 PM
    It only links somewhere if it has an
    href
    attribute
  • s

    swift-translator-13366

    09/22/2022, 3:28 PM
    but that's its main purpose, right?
  • t

    tall-dinner-62086

    09/22/2022, 3:29 PM
    It is now, yes. I might be completely off my rocker, but I'm fairly sure they used to be used for, well, creating anchors in a document to be linked to.
1...293031...44Latest