O'Reilly logo

Cross-platform Desktop Application Development: Electron, Node, NW.js, and React by Dmitry Sheiko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling the directory list

The directory list will be used for navigation through the file system, so we will wrap it with the nav > ul structure:

./index.html

<aside class="l-main__dir-list dir-list">   <nav>     <ul>       <li class="dir-list__li">..</li>       <li class="dir-list__li">assets</li>       <li class="dir-list__li">js</li>       <li class="dir-list__li">node_modules</li>       <li class="dir-list__li">tests</li></ul>   </nav> </aside> 

To support it with styles, we go with the following code:

./assets/css/Component/dir-list.css

.dir-list__li {   padding: 0.8em 0.6em;   cursor: pointer;   white-space: nowrap;   overflow: hidden;   text-overflow: ellipsis; }  .dir-list__li:hover {   background-color: var(--dirlist-bg-hover-color);  color: var(--dirlist-fg-hover-color); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required