Skip to content

Commit 0822558

Browse files
committed
Add border back so that some old examples still work
1 parent ed940d6 commit 0822558

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/generator/css.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ class Rules {
372372
}
373373
}
374374

375-
add_grid_style({ fill, clip, rotate, hueRotate, scale, translate, enlarge, skew, persp, flex, p3d, border, gap, backdropFilter}) {
375+
add_grid_style({
376+
fill, clip, rotate, hueRotate, scale, translate, enlarge, skew, persp,
377+
flex, p3d, border, borderLegacy, gap, backdropFilter
378+
}) {
376379
if (fill) {
377380
this.add_rule(':host', `background:${fill};`);
378381
}
@@ -426,6 +429,9 @@ class Rules {
426429
this.add_rule(':host', s);
427430
this.add_rule(':container', s);
428431
}
432+
if (borderLegacy !== undefined) {
433+
this.add_rule(':host', `border: 1px solid ${borderLegacy};`);
434+
}
429435
if (border !== undefined) {
430436
this.add_rule(':host', `border: ${border};`);
431437
}

src/property.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export default add_alias({
8282
if (pos === 0 && (item === '|' || item === '-')) {
8383
result.flex = item === '|' ? 'column' : 'row';
8484
temp.push('§');
85+
} else if (/border:?/i.test(item)) {
86+
result.borderLegacy = item.split(':')[1] || '';
87+
temp.push('§');
8588
} else if (/^no\-*clip$/i.test(item)) {
8689
result.clip = false;
8790
temp.push('§');

0 commit comments

Comments
 (0)