Pure CSS tree view with custom tree icons

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2022
  • In this tutorial we'll be creating a pure CSS solution to implement a tree view structure. This is a very common structure and typically requires javascript in order to fully complete. In this CSS only solution we'll have customizable tree icons, use pseudo elements for the 'tier' legs and arms along with several tricks along the way!
    💖 SUBSCRIBE (Please) 💖
    ruclips.net/user/FollowAndrew?s...
    🔗 Links 🔗
    Pseudo Elements Tutorial: • Before & After CSS Pse...
    CSS Positioning: • CSS Positioning Tutori...
    ⌚Timestamps⌚
    00:00 Intro
    00:01 Setting up the HTML
    05:05 The magic of details & summary
    12:30 Adding the styles for the arms and legs with pseudo elements
    23:30 Setting up custom icons for the collapsed and open states
    31:26 Reminding you to SUBSCRIBE ALREADY
    📢 Social Media 📢
    TWITTER (@followandrewedu) ➞ / followandrewedu
    #css #html #treeview

Комментарии • 42

  • @enkiimuto1041
    @enkiimuto1041 18 дней назад

    You're such a good teacher that I don't even need to do this on css but i watched it anyway.
    PS: good music on the intro

  • @tri5431
    @tri5431 Год назад +3

    Thanks so much ! I needed an additional line in the css, summary {list-style: none;}, to make the disclosure triangle go away, but otherwise, worked like a charm. Very much appreciated.

  • @ayushkushwaha171
    @ayushkushwaha171 8 месяцев назад +1

    I had this same scenario come into my work today, your tutorial really helped, thanks Andrew!

  • @hulooloo
    @hulooloo 6 месяцев назад

    The perfet tutorial I'v search for tree UI! Thanks Andrew.

  • @JustMe-zu2ml
    @JustMe-zu2ml Год назад

    Very cool. Thanks Andrew!

  • @shubhamambhore7207
    @shubhamambhore7207 Год назад

    Thanks for all the helpful information 😍

  • @Levendo
    @Levendo 3 месяца назад

    This video helped me a great deal. Thanks a lot, good sir.

  • @user-zl6zm9xe5b
    @user-zl6zm9xe5b Год назад

    Great video and explanation. Thanks

  • @tanaysurya
    @tanaysurya Год назад

    This was helpful!

  • @IAmOxidised7525
    @IAmOxidised7525 3 месяца назад

    Man you are a life saver

  • @NedumEze
    @NedumEze Год назад

    Amazing creativity. Thanks Andy

  • @wtdosama
    @wtdosama Год назад

    You are the best for me thanks

  • @vishaljaiswal5346
    @vishaljaiswal5346 5 месяцев назад

    Really helpful

  • @GerritforBazeja
    @GerritforBazeja Год назад

    Thank you for the nice video, again and your calm way of explaining. Can you make it also suitable for mobile.

  • @pazir_r
    @pazir_r 5 месяцев назад

    thank you

  • @aerkain
    @aerkain 6 месяцев назад

    good work

  • @antonbrianfejervilchez3507
    @antonbrianfejervilchez3507 Год назад

    great video!

  • @NedumEze
    @NedumEze Год назад +4

    Sorry Andy, did you forget to make the code available for download? I'll be helpful if you do

  • @user-hc3cn8jw1o
    @user-hc3cn8jw1o 5 месяцев назад

    How well does this approach support screen-readers and accessibility?

  • @DeepakNegiSunny
    @DeepakNegiSunny Год назад

    Hello sir, is there any way we can make that recursive by note repeating the template (li), which repeats itself until last child 😊

  • @abidrahim7607
    @abidrahim7607 Год назад

    This. is. amazing. I would have gone the hard way with JavaScript, but this is so so much better. Thank you sir!

  • @kajalmondal9745
    @kajalmondal9745 Год назад

    Please upload regularly sir. Miss your videos

    • @FollowAndrew
      @FollowAndrew  Год назад +1

      I do plan on more regular uploads!

  • @wtdosama
    @wtdosama Год назад

    We need more full website with css grid (grid-template-areas)

  • @edsonperycles5581
    @edsonperycles5581 Год назад

    How would we do this in React ?

  • @balex259
    @balex259 Год назад

    Can you share the code from intro?

  • @blackguy-ij7ij
    @blackguy-ij7ij 9 месяцев назад

    Is this ada friendly?

  • @anonimus11236
    @anonimus11236 Год назад

    Source code? I cant get rid of the summery::marker

  • @rayyanabdulwajid7681
    @rayyanabdulwajid7681 3 месяца назад

    I have done this without css checkbox or javascript using only html details and summary

  • @wikituby
    @wikituby 8 месяцев назад +1

    source code please

  • @MateStier-hd4nv
    @MateStier-hd4nv Год назад

    Can i get the code?:)

  • @jeweltalukder3296
    @jeweltalukder3296 Год назад +1

    source code?

  • @brotinbiswas8348
    @brotinbiswas8348 Год назад +2

    This is amazing and so simple. I like it....👍👍👍👍
    But one thing :- Turn off the default triangle " details summary::-webkit-details-marker { display:none; }" didn't work for me.
    I believe the following approaches will work.
    ul summary::marker {
    content: none;
    }

    • @josevelez6865
      @josevelez6865 Год назад +2

      I found this also worked:
      .tree summary{
      list-style: none;
      }

    • @Gyannea
      @Gyannea 11 месяцев назад

      I had the same issue. But the content:none; worked. Disturbing for standardization. I am using the latest Chrome browser, too.

    • @Kennerdoll
      @Kennerdoll 4 месяца назад

      same here

    • @ai_serf
      @ai_serf 2 месяца назад

      MDN is pretty bad too. the documentation on summary doesn't cover this....