官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 商洛市| 东乡族自治县| 宁南县| 赤城县| 湘乡市| 津南区| 枝江市| 革吉县| 方山县| 安化县| 芮城县| 奉新县| 德昌县| 绥德县| 泉州市| 屏南县| 辰溪县| 华蓥市| 永寿县| 呼图壁县| 合水县| 呼图壁县| 思南县| 搜索| 乌什县| 乐都县| 海南省| 宣城市| 乐清市| 阿拉善左旗| 郑州市| 吴桥县| 台中县| 株洲县| 庐江县| 宣威市| 吉安县| 威宁| 江都市| 泸西县| 阜阳市|