compostrap 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/compostrap.css +5 -10
- package/dist/css/lightbox.css +1 -6
- package/dist/css/sidebar-menu.css +4 -4
- package/dist/css/theme.css +6 -22
- package/dist/js/lightbox.js +10 -2
- package/docs/blog.md +85 -85
- package/docs/layout.md +143 -143
- package/package.json +1 -1
- package/readme.md +198 -198
- package/src/js/datepicker.js +154 -154
- package/src/js/lightbox.js +14 -1
- package/src/scss/datagrid.scss +5 -5
- package/src/scss/datepicker/_index.scss +557 -557
- package/src/scss/lightbox/_index.scss +5 -13
- package/src/scss/sidebar/_index.scss +8 -8
- package/src/scss/sidebar-menu/_pills.scss +10 -8
- package/src/scss/theme/_overlays.scss +3 -0
|
@@ -3,24 +3,16 @@
|
|
|
3
3
|
// on a dark backdrop, its caption, a counter and round buttons to close and to browse
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
-
// The page under it
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
6
|
+
// The page under it is locked and its scrollbar hidden (a scrollbar that showed only on a long page looked random), so
|
|
7
|
+
// the dialog has the whole window and its buttons stand symmetrically. The script pads the body by the width of the
|
|
8
|
+
// scrollbar meanwhile (like the modals of Bootstrap), so the page under it does not shift. Keeping the room of the
|
|
9
|
+
// scrollbar empty (scrollbar-gutter) was tried: a dialog widened over it was cut off in some browsers.
|
|
10
10
|
html.lightbox-open {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@supports (-webkit-touch-callout: none) {
|
|
15
|
-
.lightbox-open {
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
11
|
+
overflow: hidden;
|
|
18
12
|
}
|
|
19
13
|
|
|
20
14
|
.lightbox {
|
|
21
15
|
overscroll-behavior: contain;
|
|
22
|
-
// 100 %, not 100vw: the window without the scrollbar of the page, so the buttons at the right edge keep their
|
|
23
|
-
// distance from it and are not drawn under it
|
|
24
16
|
width: 100%;
|
|
25
17
|
max-width: 100%;
|
|
26
18
|
height: 100dvh;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
// sidebar skeleton
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
@use 'body';
|
|
6
|
-
@use 'wrapper';
|
|
7
|
-
@use 'sidebar';
|
|
8
|
-
@use 'theme';
|
|
1
|
+
//
|
|
2
|
+
// sidebar skeleton
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use 'body';
|
|
6
|
+
@use 'wrapper';
|
|
7
|
+
@use 'sidebar';
|
|
8
|
+
@use 'theme';
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
// links are pills inset from the sidebar edges with a small gap between them (pills of 36px on the first level and
|
|
8
8
|
// 32px in submenus, rows of 42px and 38px); their text stays where the base menu has it
|
|
9
9
|
$inset: .5rem;
|
|
10
|
-
$gap: .375rem; //
|
|
10
|
+
$gap: .375rem; // the gap above each link
|
|
11
11
|
$pill-padding-y: .5rem;
|
|
12
12
|
$subpill-padding-y: .375rem;
|
|
13
13
|
$text-start: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap;
|
|
14
14
|
|
|
15
15
|
.list {
|
|
16
|
+
// the gap is only above a link, so no margins collapse: a closing submenu (height 0, still shown) would keep two
|
|
17
|
+
// margins until it is hidden and then jump by one of them at the end of its animation (SidebarMenu.slideDuration)
|
|
16
18
|
.list-link {
|
|
17
|
-
margin: $gap $inset;
|
|
19
|
+
margin: $gap $inset 0;
|
|
18
20
|
padding: $pill-padding-y (var.$sm-link-padding-x - $inset);
|
|
19
21
|
border-radius: var(--sm-pill-border-radius);
|
|
20
22
|
}
|
|
@@ -25,8 +27,12 @@ $text-start: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap;
|
|
|
25
27
|
padding-left: $text-start - $inset;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
// a
|
|
29
|
-
//
|
|
30
|
+
// the gap between a link and its submenu is the padding of the submenu, which SidebarMenu slides to 0 together
|
|
31
|
+
// with the height
|
|
32
|
+
.list-hidden {
|
|
33
|
+
padding-top: $gap;
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
.list-hidden > li:first-child > .list-link {
|
|
31
37
|
margin-top: 0;
|
|
32
38
|
}
|
|
@@ -36,10 +42,6 @@ $text-start: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap;
|
|
|
36
42
|
margin-top: .25rem;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
.list-hidden > li:last-child > .list-link {
|
|
40
|
-
margin-bottom: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
45
|
.list-hidden .list-hidden .list-link {
|
|
44
46
|
padding-left: $text-start + var.$sm-sub-indent - $inset;
|
|
45
47
|
}
|
|
@@ -119,6 +119,9 @@ li + li > .dropdown-item {
|
|
|
119
119
|
.dropdown-menu[data-bs-theme='dark'] {
|
|
120
120
|
--bs-dropdown-bg: var(--bs-secondary-bg);
|
|
121
121
|
--bs-dropdown-link-hover-bg: rgba(var(--bs-body-color-rgb), .08);
|
|
122
|
+
// the header of Bootstrap is $gray-600 in both themes, too dark on the dark surface; the quiet text color of the
|
|
123
|
+
// theme like the header of the compact sidebar menu
|
|
124
|
+
--bs-dropdown-header-color: var(--bs-secondary-color);
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
// a toast is a floating surface like a dropdown: lighter in the dark theme, where a shadow is not seen
|