Skip to content

Commit 013b556

Browse files
committed
wip(dom2): 更新样式语法文件,支持样式属性联合类型,完善文本相关样式及测试例
1 parent e50de46 commit 013b556

File tree

21 files changed

+1398
-132
lines changed

21 files changed

+1398
-132
lines changed

packages/uni-nvue-styler/__tests__/dom2/__snapshots__/parse.spec.ts.snap

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ exports[`dom2 parse basic 2`] = `
2727
.invalid {
2828
display: grid;
2929
grid-auto-rows: 200px;
30-
white-space: nowrap;
3130
}
3231
",
3332
"file": "foo.css",
@@ -83,7 +82,6 @@ exports[`dom2 parse basic 2`] = `
8382
.invalid {
8483
display: grid;
8584
grid-auto-rows: 200px;
86-
white-space: nowrap;
8785
}
8886
",
8987
"file": "foo.css",
@@ -116,61 +114,6 @@ exports[`dom2 parse basic 2`] = `
116114
"text": "WARNING: \`grid-auto-rows\` is not a standard property name (may not be supported)",
117115
"type": "warning",
118116
},
119-
Warning {
120-
"column": 11,
121-
"endColumn": 31,
122-
"endLine": 15,
123-
"line": 15,
124-
"node": {
125-
"__originalProp": "white-space",
126-
"inputs": [
127-
{
128-
"css": "
129-
.content {
130-
display: flex;
131-
}
132-
.logo {
133-
width: 200px;
134-
height: 200px;
135-
}
136-
.text-area, .title {
137-
font-size: 36px;
138-
}
139-
.invalid {
140-
display: grid;
141-
grid-auto-rows: 200px;
142-
white-space: nowrap;
143-
}
144-
",
145-
"file": "foo.css",
146-
"hasBOM": false,
147-
},
148-
],
149-
"prop": "whiteSpace",
150-
"raws": {
151-
"before": "
152-
",
153-
"between": ": ",
154-
},
155-
"source": {
156-
"end": {
157-
"column": 30,
158-
"line": 15,
159-
"offset": 312,
160-
},
161-
"inputId": 0,
162-
"start": {
163-
"column": 11,
164-
"line": 15,
165-
"offset": 292,
166-
},
167-
},
168-
"type": "decl",
169-
"value": "nowrap",
170-
},
171-
"text": "WARNING: \`white-space\` is not a standard property name (may not be supported)",
172-
"type": "warning",
173-
},
174117
]
175118
`;
176119

packages/uni-nvue-styler/__tests__/dom2/parse.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ describe('dom2 parse', () => {
2727
.invalid {
2828
display: grid;
2929
grid-auto-rows: 200px;
30-
white-space: nowrap;
3130
}
3231
`,
3332
{

packages/uni-nvue-styler/__tests__/dom2/static/__snapshots__/border.spec.ts.snap

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,25 @@ exports[`border: 1px solid red: app-harmony(nv-c) 1`] = `
268268
}
269269
`;
270270

271+
exports[`border-color: red: app-harmony(dom-c) 1`] = `
272+
{
273+
"messages": [],
274+
"obj": {},
275+
}
276+
`;
277+
278+
exports[`border-color: red: app-harmony(nv-c) 1`] = `
279+
{
280+
"messages": [],
281+
"obj": {
282+
"border-color": {
283+
"setterCode": "borderColor(UniNativeBorderColors(0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000))",
284+
"valueCode": "UniNativeBorderColors(0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000)",
285+
},
286+
},
287+
}
288+
`;
289+
271290
exports[`border-style: solid: app-harmony(dom-c) 1`] = `
272291
{
273292
"messages": [],

0 commit comments

Comments
 (0)