Skip to content

Commit

Permalink
Fix sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Feb 18, 2024
1 parent 9b5f2c4 commit c6494cd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@linwooddev/style",
"description": "",
"main": "index.js",
"version": "0.2.1",
"version": "0.2.2",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "sass --watch scss/:css/",
Expand Down
45 changes: 22 additions & 23 deletions packages/web/scss/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
}
}

@each $breakpoint, $value in vars.$breakpoints {
.w-#{$breakpoint} {
width: $value;
}
.h-#{$breakpoint} {
height: $value;
}
.col {
display: flex;
flex-direction: column;
list-style: none;
margin: 0;
padding: 0;
}

.row {
display: flex;
flex-direction: row;
list-style: none;
margin: 0;
padding: 0;
}

.full {
Expand All @@ -44,6 +51,14 @@
}
}

@each $breakpoint, $value in vars.$sizing {
.w-#{$breakpoint} {
width: $value;
}
.h-#{$breakpoint} {
height: $value;
}
}

@each $breakpoint, $value in vars.$spacing {
.gap-#{$breakpoint} {
Expand Down Expand Up @@ -97,22 +112,6 @@
}
}

.col {
display: flex;
flex-direction: column;
list-style: none;
margin: 0;
padding: 0;
}

.row {
display: flex;
flex-direction: row;
list-style: none;
margin: 0;
padding: 0;
}

.wrap {
flex-wrap: wrap;
}
Expand Down
7 changes: 7 additions & 0 deletions packages/web/scss/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ $breakpoints: (
'lg': 1200px,
'xl': 1400px,
) !default;
$sizing: (
'xs': 100px,
'sm': 200px,
'md': 300px,
'lg': 400px,
'xl': 500px,
) !default;
$mobile-breakpoint: map-get($breakpoints, 'sm') !default;
$spacing: (
'xs': 6px,
Expand Down

0 comments on commit c6494cd

Please sign in to comment.