Skip to content

Commit 66ba223

Browse files
committed
Fix media issue
1 parent 37176ca commit 66ba223

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/silver-actors-lie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/wasm": patch
3+
---
4+
5+
Fix media issue

libs/sheet/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ impl StyleSheet {
197197
css.push_str(
198198
if let Some(break_point) = break_point {
199199
format!(
200-
"\n@media (min-width:{}px) and ({}){{{}}}",
200+
"\n@media (min-width:{}px) and {}{{{}}}",
201201
break_point, media, inner_css
202202
)
203203
} else {
204-
format!("\n@media ({}){{{}}}", media, inner_css.as_str())
204+
format!("\n@media {}{{{}}}", media, inner_css.as_str())
205205
}
206206
.as_str(),
207207
);

libs/sheet/src/snapshots/sheet__tests__print_selector.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: libs/sheet/src/lib.rs
33
expression: sheet.create_css()
44
---
5-
"\n@media (print){.test{margin-left:40px;margin-right:40px;}.test{margin-top:40px;margin-bottom:40px;}}\n@media (min-width:480px) and (print){.test{margin-left:40px;margin-right:40px;}.test{margin-top:40px;margin-bottom:40px;}}"
5+
"\n@media print{.test{margin-left:40px;margin-right:40px;}.test{margin-top:40px;margin-bottom:40px;}}\n@media (min-width:480px) and print{.test{margin-left:40px;margin-right:40px;}.test{margin-top:40px;margin-bottom:40px;}}"

0 commit comments

Comments
 (0)