Skip to content

Commit ce3bf23

Browse files
committed
Add Sidebar Variables
1 parent eae41ca commit ce3bf23

8 files changed

Lines changed: 61 additions & 25 deletions

File tree

src/sass/_variables.scss

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ $state-info-bg: lighten($brand-info, 54%) !default;
3838
$state-warning-bg: lighten($brand-warning, 43%) !default;
3939
$state-danger-bg: lighten($brand-danger, 40%) !default;
4040

41-
$sidebar-width: 250px !default;
42-
4341
$progress-bar-bg: $brand-primary !default;
4442

4543
$list-group-border-color: $card-border-color !default;
@@ -58,8 +56,39 @@ $dropdown-border-color: $border-color !default;
5856

5957
$pagination-disabled-bg: #efefef !default;
6058

59+
// SIDEBAR
60+
$sidebar-width: 250px !default;
61+
$sidebar-font-size: 15px !default;
62+
$sidebar-padding: 1.25rem !default;
63+
6164
$sidebar-light-link-color: $brand-primary !default;
65+
6266
$sidebar-dark-link-color: #fff !default;
67+
$sidebar-dark-link-active-color: $sidebar-dark-link-color !default;
68+
$sidebar-dark-link-active-bg: rgba(255,255,255, .12) !default;
69+
70+
$sidebar-brand-size: 1.3rem !default;
71+
$sidebar-brand-weight: 500 !default;
72+
73+
$sidebar-heading-size: .9rem !default;
74+
$sidebar-heading-padding: $sidebar-padding !default;
75+
$sidebar-heading-weight: 500 !default;
76+
$sidebar-heading-line-height: normal !default;
77+
$sidebar-link-height: 42px !default;
78+
79+
$sidebar-link-icon-size: 24px !default;
80+
$sidebar-link-icon-width: 1.5rem !default;
81+
$sidebar-link-icon-margin-r: 1rem !default;
82+
83+
$sidebar-link-label-margin-t: 13px !default;
84+
85+
$sidebar-link-caret-size: 16px !default;
86+
$sidebar-link-caret: '\e5db' !default;
87+
$sidebar-link-caret-open: '\e5d8' !default;
88+
$sidebar-link-caret-spacing: 45px !default;
89+
$sidebar-link-caret-margin-r: 1.25rem !default;
90+
91+
// END SIDEBAR
6392

6493
$state-success-text: darken($brand-success, 13%) !default;
6594
$state-success-bg: lighten($brand-success, 48%) !default;

src/sass/sidebar/_sidebar-dark.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232

3333
&.active,
3434
> .active {
35-
background: rgba(255,255,255, .12);
35+
background: $sidebar-dark-link-active-bg;
3636
a,
3737
a i {
38-
color: $sidebar-dark-link-color;
38+
color: $sidebar-dark-link-active-color;
3939
}
4040
}
4141
&.open .active {
42-
background: rgba(255,255,255, .12);
42+
background: $sidebar-dark-link-active-bg;
4343
a,
4444
a i {
45-
color: $sidebar-dark-link-color;
45+
color: $sidebar-dark-link-active-color;
4646
}
4747
}
4848
a {

src/sass/sidebar/components/_brand.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
width: 100%;
55
height: $navbar-height;
66
line-height: $navbar-height;
7-
padding: 0 1.25rem;
8-
font-weight: 500;
9-
font-size: 1.3rem;
7+
padding: 0 $sidebar-padding;
8+
font-weight: $sidebar-brand-weight;
9+
font-size: $sidebar-brand-size;
1010
&:hover {
1111
cursor: pointer;
1212
text-decoration: none;

src/sass/sidebar/components/_core.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
bottom: 0;
88
overflow: auto;
99
width: $sidebar-width;
10-
font-size: 15px;
10+
font-size: $sidebar-font-size;
1111
@include media-breakpoint-up(md) {
1212
&.top-md-navbar { top: 56px; }
1313
.nav { top: 70px; }

src/sass/sidebar/components/_forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SIDEBAR FORMS
22
.sidebar-filter {
33
.form-group {
4-
padding: 0 1.25rem;
4+
padding: 0 $sidebar-padding;
55
}
66
.c-select {
77
width: 100%;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SIDEBAR HEADER
22
.sidebar-header {
33
text-transform: uppercase;
4-
padding: 1.25rem;
5-
line-height: normal;
6-
font-weight: 500;
7-
font-size: .9rem;
4+
padding: $sidebar-heading-padding;
5+
line-height: $sidebar-heading-line-height;
6+
font-weight: $sidebar-heading-weight;
7+
font-size: $sidebar-heading-size;
88
}

src/sass/sidebar/components/_menu.scss

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
// SIDEBAR MENU
22
.sidebar .nav {
33
.nav-item a {
4-
padding: 0 1.25rem;
5-
line-height: 42px;
4+
padding: 0 $sidebar-padding;
5+
line-height: $sidebar-link-height;
66
display: block;
77
i {
8-
width: 2.5rem;
8+
font-size: $sidebar-link-icon-size;
9+
width: $sidebar-link-icon-width;
10+
margin-right: $sidebar-link-icon-margin-r;
11+
text-align: center;
12+
&.material-icons {
13+
position: relative;
14+
top: -1px;
15+
}
916
}
1017
.label {
1118
float:right;
12-
margin-top: 13px;
19+
margin-top: $sidebar-link-label-margin-t;
1320
}
1421
&:hover { text-decoration: none }
1522
}
@@ -30,17 +37,17 @@
3037
// SIDEBAR MENU ITEM CARET
3138
.sidebar .nav-item {
3239
&.open a:not(:only-child):before {
33-
content: '\e5d8';
40+
content: $sidebar-link-caret-open;
3441
}
3542
a:not(:only-child) {
36-
padding-right: 45px !important;
43+
padding-right: $sidebar-link-caret-spacing !important;
3744
}
3845
a:not(:only-child):before {
3946
font-family: 'Material Icons';
40-
font-size: 16px;
41-
content: '\e5db';
47+
font-size: $sidebar-link-caret-size;
48+
content: $sidebar-link-caret;
4249
position: absolute;
43-
right: 1.25rem;
50+
right: $sidebar-link-caret-margin-r;
4451
margin-top: 2px;
4552
}
4653
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// SIDEBAR DIRECT CONTENT
22
.sidebar > p {
3-
padding: 0 1.25rem;
3+
padding: 0 $sidebar-padding;
44
}

0 commit comments

Comments
 (0)