File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 34
34
35
35
$ : vert = ! horz ;
36
36
37
- $ : paddingTop = pxToRem (padding .top ) ?? ' 0px ' ;
38
- $ : paddingBottom = pxToRem (padding .bottom ) ?? ' 0px ' ;
39
- $ : paddingRight = pxToRem (padding .right ) ?? ' 0px ' ;
40
- $ : paddingLeft = pxToRem (padding .left ) ?? ' 0px ' ;
37
+ $ : paddingTop = pxToRem (padding .top ?? 0 ) ;
38
+ $ : paddingBottom = pxToRem (padding .bottom ?? 0 ) ;
39
+ $ : paddingRight = pxToRem (padding .right ?? 0 ) ;
40
+ $ : paddingLeft = pxToRem (padding .left ?? 0 ) ;
41
41
42
42
$ : wholeHeight = viewport ?.scrollHeight ?? 0 ;
43
43
$ : wholeWidth = viewport ?.scrollWidth ?? 0 ;
Original file line number Diff line number Diff line change 49
49
class =" textbox"
50
50
bind:this ={element }
51
51
class:wide
52
- style:width ={pxToRem (width )}
52
+ style:width ={width ? pxToRem (width ) : undefined }
53
53
class:wiggle ={! isInputValid }
54
54
>
55
55
{#if label }
Original file line number Diff line number Diff line change 1
- export function pxToRem ( px : number | undefined , base : number = 16 ) {
2
- if ( ! px ) return ;
1
+ export function pxToRem ( px : number , base : number = 16 ) {
3
2
return `${ px / base } rem` ;
4
3
}
You can’t perform that action at this time.
0 commit comments