Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/styles/mixins/flex.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Provides a quick method for setting an element’s flex settings. Use a `null` value to “skip” a side. Fast & Neat.

@example sass - Usage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dal bych sass a css example vedle sebe (podobně jako u ostatních mixin).

.element1 {
+flex(space-between, center);
}

.element2 {
+flex(space-evenly, null, column);
}

@example css - CSS Output
.element1 {
display: flex;
justify-content: space-between
align-items: center
}

.element2 {
display: flex;
justify-content: space-between
flex-direction: column
}

@krystofm - Kodérek for life.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Od tohohle je kdyžtak git blame



=flex($justify: null, $align: center, $direction: null)

$offsets: (justify-content: $justify, align-items: $align, flex-direction: $direction)

display: flex

@each $offset, $value in $offsets
@if $value
#{$offset}: $value