Skip to content

Commit e9f08e2

Browse files
committed
Optimize selectors
1 parent 2a799c7 commit e9f08e2

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

static/css/documentation.css

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ a img {
433433
border-bottom: 1px solid #d8d8d8;
434434
}
435435

436-
.sub-nav h2, .sub-nav h2 a {
436+
.sub-nav > h2, .sub-nav > h2 > a {
437437
color: #333;
438438
font-weight: normal;
439439
font-size: 22px;
@@ -442,15 +442,11 @@ a img {
442442
text-decoration: none;
443443
}
444444

445-
.sub-nav h2 a {
445+
.sub-nav > h2 > a {
446446
z-index: 10;
447447
position: relative;
448448
}
449449

450-
.sub-nav li a:hover {
451-
text-decoration: none;
452-
}
453-
454450
.sub-nav ul {
455451
list-style: none;
456452
position: absolute;
@@ -471,19 +467,20 @@ a img {
471467
padding: 4px 2px 8px;
472468
}
473469

470+
.sub-nav li a:hover {
471+
text-decoration: none;
472+
color: #327fc7;
473+
}
474+
474475
.sub-nav li:last-child a {
475476
padding-right: 0;
476477
}
477478

478-
.sub-nav li a.active {
479+
.sub-nav li .active {
479480
color: #222;
480481
border-bottom: 2px solid #d8d8d8;
481482
}
482483

483-
.sub-nav li a:hover {
484-
color: #327fc7;
485-
}
486-
487484
/*------------------------------------------------------------------------------
488485
Features
489486
------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)