MOBILE-3670 styles: Reindent mixin file

main
Pau Ferrer Ocaña 2021-05-14 13:42:29 +02:00
parent c8899dde03
commit 4925e47ab9
1 changed files with 332 additions and 332 deletions

View File

@ -291,9 +291,9 @@
// @content;
// }
// }
}
}
@mixin rtl() {
@mixin rtl() {
$root: #{&};
@at-root [dir=rtl] {
@ -301,17 +301,17 @@
@content;
}
}
}
}
@mixin ltr() {
@mixin ltr() {
@content;
}
}
// SVG Background Image Mixin
// @param {string} $svg
// ----------------------------------------------------------
@mixin svg-background-image($svg, $flip-rtl: false) {
// SVG Background Image Mixin
// @param {string} $svg
// ----------------------------------------------------------
@mixin svg-background-image($svg, $flip-rtl: false) {
$url: url-encode($svg);
$viewBox: str-split(str-extract($svg, "viewBox='", "'"), " ");
@ -334,13 +334,13 @@
background-image: url("data:image/svg+xml;charset=utf-8,#{$flipped-url}");
}
}
}
}
// Add property horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin property-horizontal($prop, $start, $end: $start) {
// Add property horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin property-horizontal($prop, $start, $end: $start) {
@if $start == 0 and $end == 0 {
#{$prop}-left: $start;
#{$prop}-right: $end;
@ -367,63 +367,63 @@
}
}
}
}
}
// Add property for all directions
// @param {string} $prop
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// @param {boolean} $content include content or use default
// ----------------------------------------------------------
@mixin property($prop, $top, $end: $top, $bottom: $top, $start: $end) {
// Add property for all directions
// @param {string} $prop
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// @param {boolean} $content include content or use default
// ----------------------------------------------------------
@mixin property($prop, $top, $end: $top, $bottom: $top, $start: $end) {
@include property-horizontal($prop, $start, $end);
#{$prop}-top: $top;
#{$prop}-bottom: $bottom;
}
}
// Add padding horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin padding-horizontal($start, $end: $start) {
// Add padding horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin padding-horizontal($start, $end: $start) {
@include property-horizontal(padding, $start, $end);
}
}
// Add padding for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin padding($top, $end: $top, $bottom: $top, $start: $end) {
// Add padding for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin padding($top, $end: $top, $bottom: $top, $start: $end) {
@include property(padding, $top, $end, $bottom, $start);
}
}
// Add margin horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin margin-horizontal($start, $end: $start) {
// Add margin horizontal
// @param {string} $start
// @param {string} $end
// ----------------------------------------------------------
@mixin margin-horizontal($start, $end: $start) {
@include property-horizontal(margin, $start, $end);
}
}
// Add margin for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin margin($top, $end: $top, $bottom: $top, $start: $end) {
// Add margin for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin margin($top, $end: $top, $bottom: $top, $start: $end) {
@include property(margin, $top, $end, $bottom, $start);
}
}
// Add position horizontal
// @param {string} $start - amount to position start
// @param {string} $end - amount to left: 0; end
// ----------------------------------------------------------
@mixin position-horizontal($start: null, $end: null) {
// Add position horizontal
// @param {string} $start - amount to position start
// @param {string} $end - amount to left: 0; end
// ----------------------------------------------------------
@mixin position-horizontal($start: null, $end: null) {
@if $start == $end {
@include multi-dir() {
left: $start;
@ -442,37 +442,37 @@
right: $start;
}
}
}
}
// Add position for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin position($top: null, $end: null, $bottom: null, $start: null) {
// Add position for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin position($top: null, $end: null, $bottom: null, $start: null) {
@include position-horizontal($start, $end);
top: $top;
bottom: $bottom;
}
}
// Add border for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin border($top, $end: $top, $bottom: $top, $start: $end) {
// Add border for all directions
// @param {string} $top
// @param {string} $end
// @param {string} $bottom
// @param {string} $start
// ----------------------------------------------------------
@mixin border($top, $end: $top, $bottom: $top, $start: $end) {
@include property(border, $top, $end, $bottom, $start);
}
}
// Add border radius for all directions
// @param {string} $top-start
// @param {string} $top-end
// @param {string} $bottom-end
// @param {string} $bottom-start
// ----------------------------------------------------------
@mixin border-radius($top-start, $top-end: $top-start, $bottom-end: $top-start, $bottom-start: $top-end) {
// Add border radius for all directions
// @param {string} $top-start
// @param {string} $top-end
// @param {string} $bottom-end
// @param {string} $bottom-start
// ----------------------------------------------------------
@mixin border-radius($top-start, $top-end: $top-start, $bottom-end: $top-start, $bottom-start: $top-end) {
@if $top-start == $top-end and $top-start == $bottom-end and $top-start == $bottom-start {
@include multi-dir() {
border-radius: $top-start;
@ -492,11 +492,11 @@
border-bottom-left-radius: $bottom-end;
}
}
}
}
// Add direction for all directions
// @param {string} $dir - Direction on LTR
@mixin direction($dir) {
// Add direction for all directions
// @param {string} $dir - Direction on LTR
@mixin direction($dir) {
$other-dir: null;
@if $dir == ltr {
@ -511,12 +511,12 @@
@include rtl() {
direction: $other-dir;
}
}
}
// Add float for all directions
// @param {string} $side
// @param {string} $decorator - !important
@mixin float($side, $decorator: null) {
// Add float for all directions
// @param {string} $side
// @param {string} $decorator - !important
@mixin float($side, $decorator: null) {
@if $side == start {
@include ltr() {
float: left $decorator;
@ -536,9 +536,9 @@
float: $side $decorator;
}
}
}
}
@mixin background-position($horizontal, $horizontal-amount: null, $vertical: null, $vertical-amount: null) {
@mixin background-position($horizontal, $horizontal-amount: null, $vertical: null, $vertical-amount: null) {
@if $horizontal == start or $horizontal == end {
$horizontal-ltr: null;
$horizontal-rtl: null;
@ -561,9 +561,9 @@
background-position: $horizontal $horizontal-amount $vertical $vertical-amount;
}
}
}
}
@mixin transform-origin($x-axis, $y-axis: null) {
@mixin transform-origin($x-axis, $y-axis: null) {
@if $x-axis == start {
@include ltr() {
transform-origin: left $y-axis;
@ -590,11 +590,11 @@
transform-origin: calc(100% - #{$x-axis}) $y-axis;
}
}
}
}
// Add transform for all directions
// @param {string} $transforms - comma separated list of transforms
@mixin transform($transforms...) {
// Add transform for all directions
// @param {string} $transforms - comma separated list of transforms
@mixin transform($transforms...) {
$extra: null;
$x: null;
@ -636,4 +636,4 @@
transform: $rtl-translate $extra;
}
}
}
}