-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from minsoftk/develop
feat: mixin 함수들 추가 commit
- Loading branch information
Showing
5 changed files
with
167 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@use './../utils' as *; | ||
.draw { | ||
position: relative; | ||
&__title { | ||
display: inline-block; | ||
width: 100%; | ||
padding: rem(20px) rem(20px) rem(20px) 0; | ||
@include fontSB($size: rem(20px), $bold: 700); | ||
} | ||
&__button { | ||
@include position($right: 0, $top: rem(20px)); | ||
} | ||
&__list { | ||
@include flexbox($justify: space-between, $wrap: wrap); | ||
} | ||
@include desktop { | ||
background-color: yellow; | ||
} | ||
@include mobile { | ||
background-color: pink; | ||
} | ||
} | ||
|
||
.draw__link__img { | ||
width: 200px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
@forward './home'; | ||
@forward './home'; | ||
@forward './draw'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
// flexbox | ||
|
||
// 플렉스 박스 믹스인 ---------------------------------------------------------------- / | ||
@mixin flexbox($direction: row, $justify: flex-start, $items: stretch, $wrap: nowrap) { | ||
display: flex; | ||
flex-flow: $direction $wrap; | ||
justify-content: $justify; | ||
align-items: $items; | ||
} | ||
|
||
@mixin flexbox( | ||
$direction: row, | ||
$justify: center, | ||
$items: center, | ||
$wrap: nowrap | ||
) { | ||
display: flex; | ||
flex-flow: $direction $wrap; | ||
justify-content: $justify; | ||
align-items: $items; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@use './unit' as *; | ||
@use 'sass:math'; | ||
|
||
// font-size, font-weight, padding, margin, border, position,test | ||
|
||
@mixin fontSB($size: initial, $bold: initial) { | ||
font-size: $size; | ||
font-weight: $bold; | ||
} | ||
|
||
@mixin autoMargin($marginX: auto) { | ||
margin-left: $marginX; | ||
margin-right: $marginX; | ||
} | ||
|
||
// padding 관련 믹스인 | ||
@mixin paddingY($paddingY: 0) { | ||
padding-top: rem($paddingY); | ||
padding-bottom: rem($paddingY); | ||
} | ||
@mixin paddingX($paddingX: 0) { | ||
padding-left: rem($paddingX); | ||
padding-right: rem($paddingX); | ||
} | ||
|
||
@mixin marginY($marginY: 0) { | ||
margin-top: rem($marginY); | ||
margin-bottom: rem($marginY); | ||
} | ||
|
||
@mixin marginX($marginX: 0) { | ||
margin-left: rem($marginX); | ||
margin-right: rem($marginX); | ||
} | ||
|
||
@mixin border($px: 1px, $type: solid, $color: #c8c8c8) { | ||
border: $px $type $color; | ||
} | ||
|
||
@mixin position( | ||
$position: absolute, | ||
$top: initial, | ||
$right: initial, | ||
$bottom: initial, | ||
$left: initial | ||
) { | ||
position: $position; | ||
top: $top; | ||
right: $right; | ||
bottom: $bottom; | ||
left: $left; | ||
} | ||
|
||
@mixin positionCenterX() { | ||
@include position; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} | ||
|
||
@mixin positionCenterY() { | ||
@include position; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} | ||
|
||
@mixin positionCenter( | ||
$position: absolute, | ||
$top: initial, | ||
$right: initial, | ||
$bottom: initial, | ||
$left: initial | ||
) { | ||
position: $position; | ||
} |