From 51017fedff68cef5fe3255b17b645017c564b53c Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 20:08:00 +0200
Subject: [PATCH 01/10] fix apply control and input radius to range thumb
---
src/scss/core/_Range.scss | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/scss/core/_Range.scss b/src/scss/core/_Range.scss
index 687a393..b4cf1cd 100644
--- a/src/scss/core/_Range.scss
+++ b/src/scss/core/_Range.scss
@@ -27,7 +27,7 @@ input[type="range"] {
box-shadow: $control-shadow;
cursor: pointer;
height: 2.5rem;
- width: 2.7rem;
+ width: 2.5rem;
}
&::-webkit-slider-thumb {
@@ -40,7 +40,8 @@ input[type="range"] {
box-shadow: $control-shadow;
cursor: pointer;
height: 2.5rem;
- width: 2.7rem;
+ width: 2.5rem;
+ border-radius: var(--mg-control-radius);
}
&:disabled {
From 158bd2dc5bb3693b6bac173032d3dc86fa859c37 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 20:08:24 +0200
Subject: [PATCH 02/10] fix doc remove custom work styling
---
demo/index.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/demo/index.css b/demo/index.css
index 93a8d69..6dfa6b1 100644
--- a/demo/index.css
+++ b/demo/index.css
@@ -192,3 +192,8 @@ pre.prettyprint {
);
z-index: -2;
}
+
+code .kwd,
+pre .kwd {
+ color: #fff !important;
+}
From 72179c4a5eabc1604fc6d706d475663eb9bbc3dc Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:32:11 +0200
Subject: [PATCH 03/10] fix add more left space for dropdown and navs icons
---
src/scss/extensions/mg-icon.scss | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scss/extensions/mg-icon.scss b/src/scss/extensions/mg-icon.scss
index 92f246e..f6a783d 100644
--- a/src/scss/extensions/mg-icon.scss
+++ b/src/scss/extensions/mg-icon.scss
@@ -25,7 +25,7 @@
.mg-icon-dropdown,
.mg-icon-collapse {
// force padding to container element to reserve space for arrow
- padding-right: 2.5rem !important;
+ padding-right: 3rem !important;
position: relative;
&::after {
@@ -41,7 +41,7 @@
.mg-icon-nav {
// force padding to container element to reserve space for arrow
- padding-right: 2.5rem !important;
+ padding-right: 3rem !important;
position: relative;
&::after {
From 9af66ee0a304f36e321501c4a413afe4f4f619c5 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:32:25 +0200
Subject: [PATCH 04/10] doc update modal section
---
demo/sections/modal-section.html | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/demo/sections/modal-section.html b/demo/sections/modal-section.html
index 5162ccc..ee92628 100644
--- a/demo/sections/modal-section.html
+++ b/demo/sections/modal-section.html
@@ -16,7 +16,7 @@ Modal
trigger button to open the modal:
data-toggle="modal" and
- data-target="any-modal-content-id"
+ data-target="id-of-modal-content"
Otherwise to toggle visibility of the modal, you need to add dynamically
@@ -200,16 +200,17 @@
Combine following classes with mg-modal to define orientation:
- mg-modal--top | mg-modal--bottom | mg-modal--right | mg-modal--left
+ mg-modal--top | mg-modal--bottom | mg-modal--right | mg-modal--left
-
+
@@ -217,7 +218,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-l"
- data-orientation="left"
>
@@ -225,7 +225,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-bl"
- data-orientation="bottom-left"
>
@@ -235,7 +234,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-tc"
- data-orientation="top"
>
@@ -243,7 +241,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-default"
- data-orientation="default"
>
@@ -251,7 +248,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-b"
- data-orientation="bottom"
>
@@ -269,7 +265,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-r"
- data-orientation="right"
>
@@ -277,7 +272,6 @@
title="scrollable modal"
data-toggle="modal"
data-target="modal-br"
- data-orientation="bottom-right"
>
From 6514fbc531ffc578f7f880d50fe697a3309b7365 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:16:15 +0200
Subject: [PATCH 05/10] fix use zindex global variables for modal layers
---
src/scss/extensions/mg-modal.scss | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scss/extensions/mg-modal.scss b/src/scss/extensions/mg-modal.scss
index 5d8a528..ec2661c 100644
--- a/src/scss/extensions/mg-modal.scss
+++ b/src/scss/extensions/mg-modal.scss
@@ -16,7 +16,7 @@
height: 100%;
visibility: hidden;
backface-visibility: hidden;
- z-index: 1000;
+ z-index: calc($zindex-max + 1);
opacity: 0;
background: rgb(0 0 0 / 70%);
transition: opacity 0.3s;
@@ -32,7 +32,7 @@
color: $color-secondary;
padding: 2rem 1.5rem;
margin-top: 0;
- z-index: 2000;
+ z-index: calc($zindex-max + 2);
box-shadow: $control-shadow;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
From 57ba543cf058e0096634f427b621897203744430 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:16:33 +0200
Subject: [PATCH 06/10] doc add customization section
---
index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 4cbf6ed..dda162b 100644
--- a/index.html
+++ b/index.html
@@ -23,7 +23,6 @@
href="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/skins/sunburst.css"
/>
-
@@ -176,7 +175,8 @@ A micro CSS library
- Examples
+
+
Explore the various examples provided in the documentation to see how
you can use Mg+ to build your web interface. Each example demonstrates
From 53d242cd68d7a8c37afd23ea1c8b7c727da34da0 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:17:23 +0200
Subject: [PATCH 07/10] add zindex custom variables
---
demo/sections/customization-section.html | 93 ++++++++++++++++++++++++
src/scss/mg-variables.scss | 26 +++++--
2 files changed, 112 insertions(+), 7 deletions(-)
create mode 100644 demo/sections/customization-section.html
diff --git a/demo/sections/customization-section.html b/demo/sections/customization-section.html
new file mode 100644
index 0000000..b98b519
--- /dev/null
+++ b/demo/sections/customization-section.html
@@ -0,0 +1,93 @@
+
+ Customization
+
+ MgPlus provides a set of CSS variables that allow you to customize the look
+ and feel of your application. Below is a list of all available variables and
+ their default values.
+
+
+ Colors
+
+ --mg-color-dark: hsl(255deg 0% 5%)
+ --mg-color-light: hsl(255deg 0% 95%)
+ --mg-color-primary: #475dca
+ --mg-color-red: #dc3545
+ --mg-color-orange: #fd7e14
+ --mg-color-blue: #007bff
+ --mg-color-green: #28a745
+ --mg-color-initial: var(--mg-color-light)
+ --mg-color-secondary: hsl(255deg 0% 20%)
+ --mg-color-tertiary: hsl(255deg 0% 40%)
+ --mg-color-quaternary: hsl(255deg 0% 60%)
+ --mg-color-quinary: hsl(255deg 0% 90%)
+
+
+ Dark Mode Colors
+
+ --mg-dark-color-initial:
+ var(--mg-color-dark)
+ --mg-dark-color-secondary:
+ hsl(255deg 0% 80%)
+ --mg-dark-color-tertiary:
+ hsl(255deg 0% 70%)
+ --mg-dark-color-quaternary:
+ hsl(255deg 0% 50%)
+ --mg-dark-color-quinary:
+ hsl(255deg 0% 25%)
+
+
+ Typography
+
+ --mg-base-font-size: 1.6rem
+
+
+ Borders and Shadows
+
+ --mg-control-radius: 1rem
+ --mg-input-radius: 1rem
+ --mg-control-shadow:
+ 0 0 2px rgb(0 0 0 / 20%), 0 3px 4px rgb(0 0 0 / 15%)
+ --mg-control-active-shadow:
+ inset 0 0 100px 100px rgb(0 0 0 / 10%)
+
+
+ Grid
+
+ --mg-grid-gutter: 0.5rem
+
+
+ Z-Index
+
+ --mg-zindex-0: 1
+ --mg-zindex-1: 100
+ --mg-zindex-2: 200
+ --mg-zindex-3: 300
+ --mg-zindex-4: 400
+ --mg-zindex-5: 500
+ --mg-zindex-max: 999
+
+
diff --git a/src/scss/mg-variables.scss b/src/scss/mg-variables.scss
index 9c845f2..ca148f4 100644
--- a/src/scss/mg-variables.scss
+++ b/src/scss/mg-variables.scss
@@ -31,6 +31,15 @@
//grid gutter
--mg-grid-gutter: 0.5rem;
+
+ //z-index
+ --mg-zindex-0: 1;
+ --mg-zindex-1: 100;
+ --mg-zindex-2: 200;
+ --mg-zindex-3: 300;
+ --mg-zindex-4: 400;
+ --mg-zindex-5: 500;
+ --mg-zindex-max: 999;
}
//
@@ -78,26 +87,29 @@ $grid__columns: 12;
$icon-border-width: .05rem !default;
// Z-index
-$zindex-0: 1 !default;
-$zindex-1: 100 !default;
-$zindex-2: 200 !default;
-$zindex-3: 300 !default;
-$zindex-4: 400 !default;
-$zindex-5: 500 !default;
-$zindex-max: 999 !default;
+$zindex-0: var(--mg-zindex-0) !default;
+$zindex-1: var(--mg-zindex-1) !default;
+$zindex-2: var(--mg-zindex-2) !default;
+$zindex-3: var(--mg-zindex-3) !default;
+$zindex-4: var(--mg-zindex-4) !default;
+$zindex-5: var(--mg-zindex-5) !default;
+$zindex-max: var(--mg-zindex-max) !default;
$name-x: mg-x;
$name-s: mg-s;
$name-m: mg-m;
$name-l: mg-l;
$name-xl: mg-xl;
+// Breakpoints
$break-s: 480px;
$break-m: 768px;
$break-l: 1024px;
$break-xl: 1440px;
+
$screen-s: $break-s + 1;
$screen-m: $break-m + 1;
$screen-l: $break-l + 1;
$screen-xl: $break-xl + 1;
+
$rem-map: (
0: 0,
1: 1rem,
From 4a015acb28a3542958d0c2149592e302e06d36f2 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:17:42 +0200
Subject: [PATCH 08/10] chore doc
---
demo/index.ts | 17 +----
demo/sections/collapse-section.html | 2 +-
demo/sections/intro-section.html | 2 +-
demo/sections/modal-section.html | 24 +++++++
demo/sections/responsive-display-section.html | 66 ++++++++++++++-----
5 files changed, 78 insertions(+), 33 deletions(-)
diff --git a/demo/index.ts b/demo/index.ts
index c82e014..e060382 100644
--- a/demo/index.ts
+++ b/demo/index.ts
@@ -149,25 +149,12 @@ function registerDemoFeatures() {
.forEach(buildHtmlPreview);
document.querySelectorAll("pre").forEach((el) => {
- el.innerHTML = htmlCodeFormatter(el.innerHTML)
+ el.innerHTML = htmlCodeFormatter(el.innerHTML);
el.classList.add("prettyprint", "mg-overflow-x-auto", "mg-max-w-full");
document.querySelectorAll("code").forEach((el) => {
- el.innerHTML = htmlCodeFormatter(el.innerHTML)
+ el.innerHTML = htmlCodeFormatter(el.innerHTML);
el.classList.add("prettyprint", "mg-overflow-x-auto", "mg-max-w-full");
-
-
- //const clipboardButton = document.createElement("button");
- //const clipboardButtonIcon = document.createElement("i");
-
- // clipboardButton.classList.add("mg-button--link", "mg-button--small", "mg-right");
-
- // clipboardButton.addEventListener("click", (ev) => {
- // navigator.clipboard.writeText(el.innerHTML);
- // });
- // clipboardButtonIcon.classList.add("mg-icon", "svg-icon-clipboard");
- // clipboardButton.appendChild(clipboardButtonIcon);
- // el.previousElementSibling?.append(clipboardButton);
});
});
diff --git a/demo/sections/collapse-section.html b/demo/sections/collapse-section.html
index b731988..55d6b54 100644
--- a/demo/sections/collapse-section.html
+++ b/demo/sections/collapse-section.html
@@ -1,4 +1,4 @@
-
+
Collapse
mg-collapse + opened
Collapsible elements are used to hide or show content based on user interaction. Below, you will find examples of
diff --git a/demo/sections/intro-section.html b/demo/sections/intro-section.html
index 2512c84..5bad306 100644
--- a/demo/sections/intro-section.html
+++ b/demo/sections/intro-section.html
@@ -38,7 +38,7 @@
Library size comparison
8 KB
-
Mg+ v1.4.4
+
Mg+ v1.4.5
68 KB
diff --git a/demo/sections/modal-section.html b/demo/sections/modal-section.html
index ee92628..5a1462c 100644
--- a/demo/sections/modal-section.html
+++ b/demo/sections/modal-section.html
@@ -69,6 +69,30 @@
>
+
+
+ a dropdown inside a modal
+
+
+
+ Audi
+ BMW
+ Citroen
+ Ford
+ Honda
+ Jaguar
+ Land Rover
+ Mini
+ Nissan
+ Toyota
+ Volvo
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
diff --git a/demo/sections/responsive-display-section.html b/demo/sections/responsive-display-section.html
index c66e642..f9556df 100644
--- a/demo/sections/responsive-display-section.html
+++ b/demo/sections/responsive-display-section.html
@@ -1,7 +1,10 @@
Responsive display
- Responsive display classes allow you to show or hide elements based on the screen size. This is useful for
- creating a responsive layout that adapts to different screen sizes.
+
+ Responsive display classes allow you to show or hide elements based on the
+ screen size. This is useful for creating a responsive layout that adapts to
+ different screen sizes.
+
no JS required, following rules works only with CSS
Resize your browser or switch to virutal mobile mode to check changes
Hidden effect (s,m,l,xl)
@@ -20,25 +23,56 @@ Display effect (s,m,l,xl)
Progressive display example
-
-
-
-
-
+
+ This example demonstrates how elements can be progressively revealed based
+ on the screen size.
+
+
Resize your browser or switch to virtual mobile mode to check changes
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
Exclusive display example
It shows only icon with current screen size
+
Resize your browser or switch to virtual mobile mode to check changes
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
From b2d27c3ecb0d6177d269f7dd943728b66bfcb1b6 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:17:48 +0200
Subject: [PATCH 09/10] update pkg
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 623e1fb..1122185 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mgplus",
"private": false,
- "version": "1.4.4",
+ "version": "1.4.5",
"description": "mgplus a micro CSS library",
"homepage": "https://evodim.github.io/mgplus",
"repository": "https://github.com/Evodim/mgplus",
From 84aba789ef0739b1bd855757869c8508973c6b80 Mon Sep 17 00:00:00 2001
From: medevod
Date: Tue, 22 Jul 2025 21:38:20 +0200
Subject: [PATCH 10/10] fix linter
---
src/scss/core/_Range.scss | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/scss/core/_Range.scss b/src/scss/core/_Range.scss
index b4cf1cd..a930599 100644
--- a/src/scss/core/_Range.scss
+++ b/src/scss/core/_Range.scss
@@ -34,8 +34,6 @@ input[type="range"] {
-webkit-appearance: none;
appearance: none;
background: $color-primary;
- border-radius: 100%;
- ;
border: none;
box-shadow: $control-shadow;
cursor: pointer;