feat: ✨ move styles out of App.vue and modularize
This commit is contained in:
parent
e0f67441bd
commit
d7e8f55b41
4 changed files with 133 additions and 0 deletions
67
src/scss/_flex.scss
Normal file
67
src/scss/_flex.scss
Normal file
|
@ -0,0 +1,67 @@
|
|||
.flex {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
|
||||
&--row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
&--column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&--nowrap {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
&--center {
|
||||
justify-content: center;
|
||||
|
||||
&-v {
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
&--end {
|
||||
justify-content: flex-end;
|
||||
|
||||
&-v {
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
> .col {
|
||||
flex: 1 0 0;
|
||||
max-width: 100%;
|
||||
|
||||
&--center {
|
||||
text-align: center;
|
||||
|
||||
&-v {
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
@for $i from 1 through 12 {
|
||||
&-#{$i} {
|
||||
$width: percentage(($i / 12));
|
||||
flex: 0 0 $width;
|
||||
max-width: $width;
|
||||
}
|
||||
@include mq-desktop {
|
||||
&-d-#{$i} {
|
||||
$width: percentage(($i / 12));
|
||||
flex: 0 0 $width;
|
||||
max-width: $width;
|
||||
}
|
||||
}
|
||||
@include mq-mobile {
|
||||
&-m-#{$i} {
|
||||
$width: percentage(($i / 12));
|
||||
flex: 0 0 $width;
|
||||
max-width: $width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue