{"id":18300411,"url":"https://github.com/jpdevries/deets","last_synced_at":"2026-02-19T06:30:51.984Z","repository":{"id":140005000,"uuid":"70688272","full_name":"jpdevries/deets","owner":"jpdevries","description":"Pure HTML5 Tree Component. Works without JavaScript.","archived":false,"fork":false,"pushed_at":"2016-10-12T16:05:42.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-10-25T13:58:19.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpdevries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-12T10:16:24.000Z","updated_at":"2023-09-08T17:15:47.000Z","dependencies_parsed_at":"2023-05-01T03:47:13.976Z","dependency_job_id":null,"html_url":"https://github.com/jpdevries/deets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jpdevries/deets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fdeets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fdeets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fdeets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fdeets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpdevries","download_url":"https://codeload.github.com/jpdevries/deets/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2Fdeets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T15:12:14.879Z","updated_at":"2026-02-19T06:30:51.968Z","avatar_url":"https://github.com/jpdevries.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deets\n\nHTML5 tree component that works entirely without JavaScript and web\u0026nbsp;fonts.\n\n[Try it out](http://jpdevries.github.io/deets).\n\n![](http://j4p.us/1V3M3k2y0D1U/deets.gif)\n\n## Usage\n[HTML5 Rocks](https://www.html5rocks.com). That's how this asynchronous component is architected with pure HTML5 and a sprinkle of\u0026nbsp;CSS3.\n\n### Pattern\nYou'll need to wrap everything in a `\u003cdetails\u003e` tag so create one of those:\n```html\n\u003cdetails\u003e\n\u003c/details\u003e\n```\n\nNext create a summary. Summaries define the persisting area of each element in the\u0026nbsp;tree.\n```html\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003ca href=\"#\"\u003e\n      Blog\n    \u003c/a\u003e\n  \u003c/summary\u003e\n  \u003c!-- stuff to show when expanded goes here --\u003e\n\u003c/details\u003e\n```\n\nAnd the add the stuff to display when the element is expanded! This can be any HTML so by nesting `\u003cdetails\u003e` you can create a familiar tree component that allows each item to act as a\u0026nbsp;container.\n\n```html\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003ca href=\"#\"\u003e\n      Blog\n    \u003c/a\u003e\n  \u003c/summary\u003e\n  \u003cdetails\u003e\n    \u003csummary\u003e\n      \u003ca href=\"#\"\u003e\n        MODX\n      \u003c/a\u003e\n    \u003c/summary\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eRTFM\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eForums\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eMAB\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eMODX Cloud\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/details\u003e\n  \u003cdetails\u003e\n    \u003csummary\u003e\n      \u003ca href=\"#\"\u003e\n        HTML5\n      \u003c/a\u003e\n    \u003c/summary\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003ecaniuse\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eW3C\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/details\u003e\n\u003c/details\u003e\n```\n\n[Visit this\u0026nbsp;example](http://jpdevries.github.io/deets).\n\n### icons\nThere are a few patterns to add\u0026nbsp;icons.\n\n#### SVG Use\nOur [icon example](https://jpdevries.github.io/deets/icons.html) uses a SVG `\u003cuse\u003e`\u0026nbsp;pattern.\n##### HTML\n```html\n\u003csummary\u003e\n  \u003ca href=\"#\"\u003e\n    \u003csvg role=\"img\" class=\"folder icon\"\u003e\n      \u003cuse xlink:href=\"assets/img/icons.svg#icon-folder\"\u003e\u003c/use\u003e\n    \u003c/svg\u003e\n    \u003csvg hidden role=\"img\" class=\"folder-open icon\"\u003e\n      \u003cuse xlink:href=\"assets/img/icons.svg#icon-folder-open\"\u003e\u003c/use\u003e\n    \u003c/svg\u003e\n    MODX\n  \u003c/a\u003e\n\u003c/summary\u003e\n```\n\n##### CSS\n```css\ndetails[open] \u003e summary \u003e a .folder {\n  display:none; /* hide the folder icon when open */\n}\n\ndetails[open] \u003e summary \u003e a .folder-open {\n  display:inline-block; /* show the folder-open icon when open */\n}\n```\n\n##### Pros\n - Any number of SVG icons can be contained in a sprite file or inlined in the\u0026nbsp;HTML\n - Accessible and semantic delivery of icons\n - Dynamic color with `color:currentColor`\n - Can [color an icon with CSS\u0026nbsp;Properties](https://codepen.io/jpdevries/pen/MKbrrX)\n\n##### Cons\n - Markup weight\n\n##### Costs\n  - an HTTP request\n\n#### CSS Pseudo\nOur [CSS Pseudo example](https://jpdevries.github.io/deets/icons-pseudo.html) is CSS only and therefore the icons aren't delivered semantically or accessible. But depending on your situation they may not need to be. For example, a screen reader user may not need to be informed there's an icon that indicates a folder is open if their assistive technology had already indicated\u0026nbsp;that.\n\nThe CSS pattern requires no\u0026nbsp;markup.\n\n##### CSS\n```css\nsummary \u003e a:before {\n  content:' ';\n  position:absolute;\n  left:0;\n  bottom:0;\n  width:1em;\n  top:0;\n  display:block;\n  background:transparent url('assets/img/folder.svg') no-repeat center center;\n  background-size:contain;\n}\n\ndetails[open] \u003e summary \u003e a:before {\n  background:transparent url('assets/img/folder-open.svg') no-repeat center center;\n}\n```\n\n##### Pros\n - Light HTML\n - Style where style goes\n\n##### Cons\n - Unsemantic icons\n - Can't change icon color(s) with CSS\n\n##### Costs\n- Multiple HTTP requests\n\n _These may not be cons or costly if you are serving over HTTP/2 and icons don't need to be semantic or\u0026nbsp;accessible_\n\nYes you [could inline the icons with data URIs but probably\u0026nbsp;don't](https://css-tricks.com/probably-dont-base64-svg/)?\n\n### `no-marker`\nIf this attribute is present on the `\u003cdetails\u003e` node or any parent node the triangular marker which indicates if summaries are expanded or closed will not be\u0026nbsp;displayed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fdeets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpdevries%2Fdeets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fdeets/lists"}