Skip to content

Commit a2f759e

Browse files
committed
refactor: improve styles
1 parent 5f3df89 commit a2f759e

File tree

7 files changed

+80
-65
lines changed

7 files changed

+80
-65
lines changed

src/styles/_custom.scss

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
// Custom styles for this theme
2-
3-
.header > .container-fluid,
4-
.sidebar-header {
5-
min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list
6-
}
7-
8-
.header > .container-fluid + .container-fluid {
9-
min-height: 3rem;
10-
}
11-
12-
.sidebar-brand-full {
13-
margin-left: 3px;
14-
}
15-
16-
.sidebar-toggler {
17-
@include ltr-rtl("margin-left", auto);
18-
}
19-
20-
.sidebar-narrow,
21-
.sidebar-narrow-unfoldable:not(:hover) {
22-
.sidebar-toggler {
23-
@include ltr-rtl("margin-right", auto);
24-
}
25-
}
26-
27-
.footer {
28-
min-height: calc(3rem + 1px); // stylelint-disable-line function-disallowed-list
29-
}
1+
// Here you can add other styles

src/styles/_layout.scss

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/styles/_theme.scss

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
body {
2+
background-color: var(--cui-tertiary-bg);
3+
}
4+
5+
.wrapper {
6+
width: 100%;
7+
@include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0));
8+
@include ltr-rtl("padding-right", var(--cui-sidebar-occupy-end, 0));
9+
will-change: auto;
10+
@include transition(padding .15s);
11+
}
12+
13+
.header > .container-fluid,
14+
.sidebar-header {
15+
min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list
16+
}
17+
18+
.sidebar-brand-full {
19+
margin-left: 3px;
20+
}
21+
22+
.sidebar-header {
23+
.nav-underline-border {
24+
--cui-nav-underline-border-link-padding-x: 1rem;
25+
--cui-nav-underline-border-gap: 0;
26+
}
27+
28+
.nav-link {
29+
display: flex;
30+
align-items: center;
31+
min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list
32+
}
33+
}
34+
35+
.sidebar-toggler {
36+
@include ltr-rtl("margin-left", auto);
37+
}
38+
39+
.sidebar-narrow,
40+
.sidebar-narrow-unfoldable:not(:hover) {
41+
.sidebar-toggler {
42+
@include ltr-rtl("margin-right", auto);
43+
}
44+
}
45+
46+
.header > .container-fluid + .container-fluid {
47+
min-height: 3rem;
48+
}
49+
50+
.footer {
51+
min-height: calc(3rem + 1px); // stylelint-disable-line function-disallowed-list
52+
}
53+
54+
@if $enable-dark-mode {
55+
@include color-mode(dark) {
56+
body {
57+
background-color: var(--cui-dark-bg-subtle);
58+
}
59+
60+
.footer {
61+
--cui-footer-bg: var(--cui-body-bg);
62+
}
63+
}
64+
}

src/styles/_variables.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
//
33
// If you want to customize your project please add your variables below.
44

5-
$enable-rtl: true; /* stylelint-disable-line scss/dollar-variable-default */
6-
$enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-variable-default */
5+
$enable-deprecation-messages: false !default;

src/styles/_examples.scss renamed to src/styles/examples.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* stylelint-disable declaration-no-important, scss/selector-no-redundant-nesting-selector */
2+
$enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-variable-default */
3+
24
@import "@coreui/coreui/scss/functions";
35
@import "@coreui/coreui/scss/variables";
46
@import "@coreui/coreui/scss/mixins";
@@ -51,9 +53,6 @@
5153
}
5254

5355
// Buttons
54-
.col > .btn,
55-
.col-auto > .btn,
56-
.d-md-block > .btn,
5756
> .btn,
5857
> .btn-group {
5958
margin: .25rem .125rem;
@@ -114,4 +113,4 @@
114113
background-color: var(--#{$prefix}secondary-bg) !important;
115114
}
116115
}
117-
}
116+
}

src/styles/style.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
// If you want to override variables do it here
22
@import "variables";
33

4-
// Import CoreUI for React components library
4+
// Import styles
55
@import "@coreui/coreui/scss/coreui";
66

7-
// Import Chart.js custom tooltips styles
8-
@import "@coreui/chartjs/scss/coreui-chartjs";
7+
// Vendors
8+
@import "vendors/simplebar";
99

10-
@import "layout";
10+
// Custom styles for this theme
11+
@import "theme";
1112

12-
// Preview
13-
@import "examples";
14-
15-
// If you want to add custom CSS you can put it here.
13+
// If you want to add custom CSS you can put it here
1614
@import "custom";

src/styles/vendors/simplebar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.simplebar-content {
2+
display: flex;
3+
flex-direction: column;
4+
min-height: 100%;
5+
}

0 commit comments

Comments
 (0)