- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- Dmitry Sheiko
- 104字
- 2021-07-15 17:36:25
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);
}
Note that we've just introduced a couple of variables. Let's add them in the definitions module:
./assets/css/Base/definitions.css
--dirlist-bg-hover-color: #d64937;
--dirlist-fg-hover-color: #ffffff;
As we ruin the application we can observe the new contents in the directory list:

推薦閱讀
- 數(shù)據(jù)庫程序員面試筆試真題與解析
- Vue.js 2 and Bootstrap 4 Web Development
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- JavaScript+jQuery開發(fā)實(shí)戰(zhàn)
- 小程序開發(fā)原理與實(shí)戰(zhàn)
- Swift細(xì)致入門與最佳實(shí)踐
- 大學(xué)計(jì)算機(jī)基礎(chǔ)實(shí)驗(yàn)指導(dǎo)
- Android驅(qū)動(dòng)開發(fā)權(quán)威指南
- Java Web開發(fā)實(shí)例大全(基礎(chǔ)卷) (軟件工程師開發(fā)大系)
- Distributed Computing in Java 9
- 跟戴銘學(xué)iOS編程:理順核心知識(shí)點(diǎn)
- iOS Development with Xamarin Cookbook
- Getting Started with Windows Server Security
- R語言數(shù)據(jù)分析從入門到實(shí)戰(zhàn)
- 鋁合金陽極氧化與表面處理技術(shù)(第三版)