responsive-scale-mixins 2.0.7 → 2.0.9
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/README.md +9 -0
- package/index.scss +21 -33
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,15 @@ Works with React, Vue, Angular, Svelte, Next.js, Nuxt, Astro, and vanilla CSS. Y
|
|
|
60
60
|
|
|
61
61
|
**SCSS implementations are NOT affected** - existing `@include responsive-scale()` calls work unchanged.
|
|
62
62
|
|
|
63
|
+
## ✅ v2.0.9 - Bug Fix (No Breaking Changes)
|
|
64
|
+
|
|
65
|
+
**This is a bug fix that resolves tablet breakpoint calculation issues. No API changes.**
|
|
66
|
+
|
|
67
|
+
- **Fixed**: Tablet breakpoint CSS generation was producing invalid `calc()` expressions
|
|
68
|
+
- **Result**: Tablet scaling now works correctly with valid CSS output
|
|
69
|
+
- **Compatibility**: All existing code continues to work unchanged
|
|
70
|
+
- **API**: Zero breaking changes - same function calls, same parameters, same behavior
|
|
71
|
+
|
|
63
72
|
### Migration Guide (Pure CSS Users)
|
|
64
73
|
|
|
65
74
|
**Update your CSS variable definitions:**
|
package/index.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Responsive Scale Mixins v2.0.
|
|
1
|
+
// Responsive Scale Mixins v2.0.9
|
|
2
2
|
// A powerful SCSS mixin system for creating perfectly responsive designs
|
|
3
3
|
// Single-file distribution for maximum compatibility
|
|
4
4
|
|
|
@@ -85,29 +85,24 @@
|
|
|
85
85
|
$calc-value: calc(
|
|
86
86
|
#{$desktop-value} /
|
|
87
87
|
100 *
|
|
88
|
-
|
|
89
|
-
var(--desktop-width) *
|
|
90
|
-
#{$desktop-relative} *
|
|
91
|
-
#{$unit}
|
|
88
|
+
(var(#{$scale-factor}) * #{$desktop-relative}#{$unit})
|
|
92
89
|
);
|
|
93
90
|
#{$property}: #{$calc-value}#{$important};
|
|
94
91
|
}
|
|
95
92
|
|
|
96
93
|
@media screen and (min-width: 768px) and (max-width: 991px) {
|
|
94
|
+
$tablet-scale-factor: get-tablet-scale-factor($unit);
|
|
97
95
|
@if $desktop-relative != null and $mobile-relative != null {
|
|
98
96
|
$calc-value: calc(
|
|
99
97
|
#{$mobile-value} /
|
|
100
98
|
100 *
|
|
101
99
|
(
|
|
102
|
-
|
|
103
|
-
var(--tablet-width) *
|
|
100
|
+
var(#{$tablet-scale-factor}) *
|
|
104
101
|
(
|
|
105
|
-
#{$mobile-relative} +
|
|
106
|
-
|
|
107
|
-
(
|
|
108
|
-
|
|
109
|
-
) *
|
|
110
|
-
#{$unit}
|
|
102
|
+
#{$mobile-relative}#{$unit} +
|
|
103
|
+
var(--tablet-proportion-scale-factor) *
|
|
104
|
+
(#{$desktop-relative}#{$unit} - #{$mobile-relative}#{$unit})
|
|
105
|
+
)
|
|
111
106
|
)
|
|
112
107
|
);
|
|
113
108
|
#{$property}: #{$calc-value}#{$important};
|
|
@@ -115,14 +110,12 @@
|
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
@media screen and (max-width: 767px) {
|
|
113
|
+
$mobile-scale-factor: get-mobile-scale-factor($unit);
|
|
118
114
|
@if $mobile-relative != null {
|
|
119
115
|
$calc-value: calc(
|
|
120
116
|
#{$mobile-value} /
|
|
121
117
|
100 *
|
|
122
|
-
|
|
123
|
-
var(--mobile-width) *
|
|
124
|
-
#{$mobile-relative} *
|
|
125
|
-
#{$unit}
|
|
118
|
+
(var(#{$mobile-scale-factor}) * #{$mobile-relative}#{$unit})
|
|
126
119
|
);
|
|
127
120
|
#{$property}: #{$calc-value}#{$important};
|
|
128
121
|
}
|
|
@@ -144,6 +137,7 @@
|
|
|
144
137
|
}
|
|
145
138
|
|
|
146
139
|
@media screen and (min-width: 768px) and (max-width: 991px) {
|
|
140
|
+
$tablet-scale-factor: get-tablet-scale-factor($unit);
|
|
147
141
|
@if meta.type-of($desktop-value) == list {
|
|
148
142
|
$tablet-scaled: ();
|
|
149
143
|
@for $i from 1 through list.length($desktop-value) {
|
|
@@ -152,30 +146,24 @@
|
|
|
152
146
|
$tablet-scaled: list.append(
|
|
153
147
|
$tablet-scaled,
|
|
154
148
|
calc(
|
|
155
|
-
|
|
156
|
-
var(--tablet-width) *
|
|
149
|
+
var(#{$tablet-scale-factor}) *
|
|
157
150
|
(
|
|
158
|
-
#{$m-val} +
|
|
159
|
-
|
|
160
|
-
(
|
|
161
|
-
|
|
162
|
-
) *
|
|
163
|
-
#{$unit}
|
|
151
|
+
#{$m-val}#{$unit} +
|
|
152
|
+
var(--tablet-proportion-scale-factor) *
|
|
153
|
+
(#{$d-val}#{$unit} - #{$m-val}#{$unit})
|
|
154
|
+
)
|
|
164
155
|
)
|
|
165
156
|
);
|
|
166
157
|
}
|
|
167
158
|
#{$property}: #{$tablet-scaled}#{$important};
|
|
168
159
|
} @else {
|
|
169
160
|
$calc-value: calc(
|
|
170
|
-
|
|
171
|
-
var(--tablet-width) *
|
|
161
|
+
var(#{$tablet-scale-factor}) *
|
|
172
162
|
(
|
|
173
|
-
#{$mobile-value} +
|
|
174
|
-
|
|
175
|
-
(
|
|
176
|
-
|
|
177
|
-
) *
|
|
178
|
-
#{$unit}
|
|
163
|
+
#{$mobile-value}#{$unit} +
|
|
164
|
+
var(--tablet-proportion-scale-factor) *
|
|
165
|
+
(#{$desktop-value}#{$unit} - #{$mobile-value}#{$unit})
|
|
166
|
+
)
|
|
179
167
|
);
|
|
180
168
|
#{$property}: #{$calc-value}#{$important};
|
|
181
169
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "responsive-scale-mixins",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "🎨 Revolutionary SCSS mixins for perfect responsive design. Supports ALL CSS units (px, rem, em, vw, vh, %, etc.) with pixel-perfect scaling. Zero manual calculations - just flawless responsive typography, spacing, and dimensions across desktop, tablet, and mobile. Single-file distribution for maximum compatibility. Framework-agnostic, modern CSS variables, works everywhere.",
|
|
5
5
|
"main": "index.scss",
|
|
6
6
|
"style": "index.scss",
|