Skip to content

Commit 7a3a866

Browse files
medevodmedevod
andauthored
Fixes/1.4.1 (#80)
* chore: update default nav button styling * update pkg version --------- Co-authored-by: medevod <medevod@github.com>
1 parent def112d commit 7a3a866

3 files changed

Lines changed: 36 additions & 22 deletions

File tree

demo/sections/nav-section.html

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<section id="nav-section">
22
<h2>Navs</h2>
3-
<p>Navs are used to navigate through
4-
the application. Below, you will find examples of how to use the nav system to create a variety of nav states.</p>
3+
<p>
4+
Navs are used to navigate through the application. Below, you will find
5+
examples of how to use the nav system to create a variety of nav states.
6+
</p>
57
<div data-toggle="htmlpreview">
68
<h3>Nav vertical (default)</h3>
79
<code>mg-nav</code>
@@ -11,10 +13,9 @@ <h3>Nav vertical (default)</h3>
1113
<li><a href="#contact">Contact</a></li>
1214
<li><a href="#about">About</a></li>
1315
</ul>
14-
1516
</div>
1617
<div data-toggle="htmlpreview">
17-
<h3>Nav inline </h3>
18+
<h3>Nav inline</h3>
1819
<code>mg-nav mg-nav--inline</code>
1920
<ul class="mg-nav mg-nav--inline" data-toggle="nav">
2021
<li class="active"><a href="#home">Home</a></li>
@@ -25,33 +26,40 @@ <h3>Nav inline </h3>
2526
</div>
2627

2728
<div data-toggle="htmlpreview">
28-
<h3>Nav buttons</h3>
29+
<h3>Nav buttons</h3>
2930
<code>mg-nav mg-nav--buttons </code>
3031
<ul class="mg-nav mg-nav--buttons" data-toggle="nav">
3132
<li class="active"><a class="mg-button" href="#home">Home</a></li>
3233
<li><a class="mg-button" href="#news">News</a></li>
3334
<li><a class="mg-button" href="#contact">Contact</a></li>
3435
<li><a class="mg-button" href="#about">About</a></li>
3536
</ul>
36-
</div>
37+
</div>
38+
<h3>Nav buttons with custom background</h3>
39+
<code>+ mg-bg-quinary</code>
40+
<ul class="mg-nav mg-nav--buttons mg-bg-quinary mg-rounded" data-toggle="nav">
41+
<li class="active"><a class="mg-button" href="#home">Home</a></li>
42+
<li><a class="mg-button" href="#news">News</a></li>
43+
<li><a class="mg-button" href="#contact">Contact</a></li>
44+
<li><a class="mg-button" href="#about">About</a></li>
45+
</ul>
46+
</div>
3747
<div data-toggle="htmlpreview">
3848
<h3>Nav buttons (wrapped)</h3>
39-
<code>mg-nav mg-nav--buttons mg-wrap</code>
40-
<ul class="mg-nav mg-nav--buttons mg-wrap" data-toggle="nav">
49+
<code>+ mg-wrap</code>
50+
<ul class="mg-nav mg-nav--buttons mg-wrap " data-toggle="nav">
4151
<li class="active"><a class="mg-button" href="#home">Home</a></li>
4252
<li><a class="mg-button" href="#news">News</a></li>
4353
<li><a class="mg-button" href="#contact">Contact</a></li>
4454
<li><a class="mg-button" href="#about">About</a></li>
4555
</ul>
4656
<h3>Nav buttons (vertical)</h3>
47-
<code>mg-nav mg-nav--buttons mg-col</code>
57+
<code>+ mg-col</code>
4858
<ul class="mg-nav mg-nav--buttons mg-col mg-x12 mg-m2" data-toggle="nav">
4959
<li class="active"><a class="mg-button" href="#home">Home</a></li>
50-
<li><a class="mg-button" href="#news">News</a></li>
60+
<li><a class="mg-button mg-bg-red" href="#news">News</a></li>
5161
<li><a class="mg-button" href="#contact">Contact</a></li>
5262
<li><a class="mg-button" href="#about">About</a></li>
5363
</ul>
5464
</div>
55-
56-
57-
</section>
65+
</section>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mgplus",
33
"private": false,
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"description": "mgplus a micro CSS library",
66
"homepage": "https://evodim.github.io/mgplus",
77
"repository": "https://github.com/Evodim/mgplus",

src/scss/extensions/mg-nav.scss

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
font-weight: bold;
2626
}
2727

28-
& li>a {
28+
& li a {
2929
width: 100%;
3030
cursor: pointer;
3131
text-decoration: none;
@@ -71,17 +71,23 @@
7171
background-color: transparent;
7272
}
7373

74-
& li>button,
75-
& li>.mg-button {
76-
border: none;
74+
& li button,
75+
& li .mg-button {
76+
border: 0.2rem solid transparent;
7777
background-color: transparent;
7878
margin-bottom: 0;
7979
}
8080

81-
& li.active>button,
82-
& li.active>.mg-button {
83-
background-color: $color-primary;
84-
color: $color-light;
81+
& li button:hover,
82+
& li .mg-button:hover {
83+
color: $color-secondary;
84+
}
8585

86+
& li.active button,
87+
& li.active .mg-button {
88+
border: 0.2rem solid $color-primary;
89+
color: $color-secondary;
8690
}
91+
92+
8793
}

0 commit comments

Comments
 (0)