Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silver-ads-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Add webkit lineclamp to maintain value
3 changes: 2 additions & 1 deletion libs/extractor/src/extract_style/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ pub(super) static MAINTAIN_VALUE_PROPERTIES: phf::Set<&str> = phf_set! {
"grid-row-end",
"animation-iteration-count",
"tab-size",
"moz-tab-size"
"moz-tab-size",
"webkit-line-clamp"
};
2 changes: 1 addition & 1 deletion libs/extractor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,7 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props })
extract(
"test.jsx",
r#"import {Flex} from '@devup-ui/core'
<Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} tabSize={4} MozTabSize={4} />
<Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} tabSize={4} MozTabSize={4} WebkitLineClamp={4} />
"#,
ExtractOption { package: "@devup-ui/core".to_string(), css_file: None }
)
Expand Down
13 changes: 11 additions & 2 deletions libs/extractor/src/snapshots/extractor__tests__maintain_value.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: libs/extractor/src/lib.rs
expression: "ToBTreeSet::from(extract(\"test.jsx\",\nr#\"import {Flex} from '@devup-ui/core'\n <Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} tabSize={4} MozTabSize={4} />\n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())"
expression: "ToBTreeSet::from(extract(\"test.jsx\",\nr#\"import {Flex} from '@devup-ui/core'\n <Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} tabSize={4} MozTabSize={4} WebkitLineClamp={4} />\n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())"
---
ToBTreeSet {
styles: {
Expand All @@ -13,6 +13,15 @@ ToBTreeSet {
style_order: None,
},
),
Static(
ExtractStaticStyle {
property: "-webkit-line-clamp",
value: "16px",
level: 0,
selector: None,
style_order: None,
},
),
Static(
ExtractStaticStyle {
property: "display",
Expand Down Expand Up @@ -88,5 +97,5 @@ ToBTreeSet {
},
),
},
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className=\"a b c d e f g h i\" />;\n",
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className=\"a b c d e f g h i j\" />;\n",
}