Skip to content

Commit a82b88a

Browse files
committed
configured rollup to export styles to sprockets recognized folder
1 parent b4aefac commit a82b88a

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
.matestack-page-container .matestack-page-wrapper {
2+
opacity: 1;
3+
transition: opacity 0.2s ease-in-out;
4+
}
5+
.matestack-page-container .matestack-page-wrapper.loading {
6+
opacity: 0;
7+
}
8+
.matestack-page-container .loading-state-element-wrapper {
9+
opacity: 0;
10+
transition: opacity 0.3s ease-in-out;
11+
}
12+
.matestack-page-container .loading-state-element-wrapper.loading {
13+
opacity: 1;
14+
}
15+
16+
.matestack-async-component-container {
17+
opacity: 1;
18+
transition: opacity 0.2s ease-in-out;
19+
}
20+
.matestack-async-component-container.loading {
21+
opacity: 0;
22+
}
23+
24+
.matestack-isolated-component-container {
25+
opacity: 1;
26+
transition: opacity 0.2s ease-in-out;
27+
}
28+
.matestack-isolated-component-container.loading {
29+
opacity: 0;
30+
}
31+
32+
.matestack-app-wrapper {
33+
overflow-x: hidden;
34+
}
35+
36+
.content-wrapper {
37+
position: relative;
38+
z-index: 1;
39+
min-height: 101vh;
40+
transition: 0.5s;
41+
}
42+
@media (max-width: 992px) {
43+
.content-wrapper.sidebar-open {
44+
margin-left: -300px;
45+
}
46+
}
47+
48+
.sidebar-wrapper {
49+
position: relative;
50+
z-index: 10;
51+
transition: 0.5s;
52+
flex-grow: 0; /* do not grow - initial value: 0 */
53+
flex-shrink: 0; /* do not shrink - initial value: 1 */
54+
flex-basis: 300px; /* width/height - initial value: auto */
55+
}
56+
.sidebar-wrapper .sidebar-toggler {
57+
transition: 0.5s;
58+
position: relative;
59+
left: 290px;
60+
}
61+
.sidebar-wrapper.closed {
62+
margin-left: -300px;
63+
}
64+
.sidebar-wrapper.open {
65+
margin-left: 0px;
66+
}
67+
@media (max-width: 992px) {
68+
.sidebar-wrapper {
69+
margin-left: -300px;
70+
}
71+
.sidebar-wrapper.open {
72+
margin-left: 0px;
73+
}
74+
}
75+
.sidebar-wrapper .sidebar {
76+
min-height: 100vh;
77+
height: 100%;
78+
}
79+
.sidebar-wrapper .sidebar .sidebar-top {
80+
margin-top: -35px;
81+
}
82+
.sidebar-wrapper .sidebar .sidebar-top a {
83+
text-decoration: none;
84+
}
85+
.sidebar-wrapper .sidebar .list-group-item.active {
86+
margin-top: 0px !important;
87+
}
88+
.sidebar-wrapper .sidebar .list-group-item.active-child {
89+
color: var(--bs-white);
90+
background-color: var(--bs-primary);
91+
}
92+
93+
.smart-collection .pagination .page-item {
94+
cursor: pointer;
95+
}
96+
.smart-collection .pagination .page-item.disabled {
97+
cursor: initial;
98+
}

rollup.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import commonjs from "@rollup/plugin-commonjs"
33
import json from '@rollup/plugin-json';
44
import { terser } from "rollup-plugin-terser"
55
import scss from 'rollup-plugin-scss'
6+
import { writeFileSync } from 'fs'
67

78
const terserOptions = {
89
mangle: true,
@@ -24,7 +25,10 @@ export default [
2425
resolve({ browser: true }),
2526
json(),
2627
commonjs(),
27-
scss({ output: './dist/matestack-ui-bootstrap.css' }),
28+
scss({ output: function (styles, styleNodes) {
29+
writeFileSync('./dist/matestack-ui-bootstrap.css', styles)
30+
writeFileSync('./assets/stylesheets/_matestack-ui-bootstrap.css', styles)
31+
}}),
2832
terser(terserOptions)
2933
]
3034
}

0 commit comments

Comments
 (0)