| 1 |
/*-------------------------------------- |
| 2 |
- Base |
| 3 |
----------------------------------------*/ |
| 4 |
|
| 5 |
// Body Mixin |
| 6 |
@mixin body($font-family: $font, $font-weight: 400, $color: $global-color, $font-size: $global-font-size, $line-height: 1.5) { |
| 7 |
font-family: $font-family; |
| 8 |
font-weight: $font-weight; |
| 9 |
font-size: $font-size; |
| 10 |
line-height: $line-height; |
| 11 |
text-rendering: optimizeSpeed; |
| 12 |
color: $color; |
| 13 |
} |
| 14 |
|
| 15 |
@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) { |
| 16 |
$u1: unit($min-vw); |
| 17 |
$u2: unit($max-vw); |
| 18 |
$u3: unit($min-font-size); |
| 19 |
$u4: unit($max-font-size); |
| 20 |
|
| 21 |
@if $u1==$u2 and $u1==$u3 and $u1==$u4 { |
| 22 |
& { |
| 23 |
font-size: $min-font-size; |
| 24 |
|
| 25 |
@media screen and (min-width: $min-vw) { |
| 26 |
font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})); |
| 27 |
} |
| 28 |
|
| 29 |
@media screen and (min-width: $max-vw) { |
| 30 |
font-size: $max-font-size; |
| 31 |
} |
| 32 |
} |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
//Before Icon mixin |
| 37 |
@mixin before-icon($content, $color) { |
| 38 |
content: $content; |
| 39 |
font-family: IcoFont; |
| 40 |
color: $color; |
| 41 |
vertical-align: middle; |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Convert font-size from px to rem with px fallback |
| 46 |
* |
| 47 |
* @param $size - the value in pixel you want to convert |
| 48 |
* |
| 49 |
* e.g. p {@include fontSize(12px);} |
| 50 |
* |
| 51 |
*/ |
| 52 |
|
| 53 |
// Mixin that will include the fall back px declaration as well as the calculated rem value. |
| 54 |
@mixin fs-rem($size) { |
| 55 |
font-size: rem($size); |
| 56 |
} |
| 57 |
|
| 58 |
// Font Size Class |
| 59 |
@mixin font($size, $breakpoint: null, $pre: px) { |
| 60 |
|
| 61 |
@if $breakpoint { |
| 62 |
@include media-up(#{$breakpoint}) { |
| 63 |
.font-#{$breakpoint}-#{$size} { |
| 64 |
font-size: #{$size}#{$pre}; |
| 65 |
} |
| 66 |
} |
| 67 |
} @else { |
| 68 |
.font-#{$size} { |
| 69 |
font-size: #{$size}#{$pre}; |
| 70 |
} |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
//Line Height |
| 75 |
@mixin line-height($size, $breakpoint: null, $pre: px) { |
| 76 |
@if $breakpoint { |
| 77 |
@include media-up(#{$breakpoint}) { |
| 78 |
.line-height-#{$breakpoint}-#{$size} { |
| 79 |
line-height: #{$size}#{$pre}; |
| 80 |
} |
| 81 |
} |
| 82 |
} @else { |
| 83 |
.line-height-#{$size} { |
| 84 |
line-height: #{$size}#{$pre}; |
| 85 |
} |
| 86 |
} |
| 87 |
} |
| 88 |
|
| 89 |
// hr mixin |
| 90 |
@mixin hr($bg: $global-color, $width: 50px, $height: 5px, $my: 50px, $mx: 0, $p: 0, $radius: 0) { |
| 91 |
background: $bg; |
| 92 |
width: $width; |
| 93 |
height: $height; |
| 94 |
margin: $my $mx; |
| 95 |
padding: $p; |
| 96 |
border: none; |
| 97 |
border-radius: $radius; |
| 98 |
opacity: 1; |
| 99 |
} |
| 100 |
|
| 101 |
@mixin media-up($name, $breakpoints: $breakpoints) { |
| 102 |
$min: breakpoint-min($name, $breakpoints); |
| 103 |
|
| 104 |
@if $min { |
| 105 |
@media (min-width: $min) { |
| 106 |
@content; |
| 107 |
} |
| 108 |
} @else { |
| 109 |
@content; |
| 110 |
} |
| 111 |
} |
| 112 |
|
| 113 |
// Media of at most the maximum breakpoint width. No query for the largest breakpoint. |
| 114 |
// Makes the @content apply to the given breakpoint and narrower. |
| 115 |
@mixin media-down($name, $breakpoints: $breakpoints) { |
| 116 |
$max: breakpoint-max($name, $breakpoints); |
| 117 |
|
| 118 |
@if $max { |
| 119 |
@media (max-width: $max) { |
| 120 |
@content; |
| 121 |
} |
| 122 |
} @else { |
| 123 |
@content; |
| 124 |
} |
| 125 |
} |
| 126 |
|
| 127 |
// Media that spans multiple breakpoint widths. |
| 128 |
// Makes the @content apply between the min and max breakpoints |
| 129 |
@mixin media-between($lower, $upper, $breakpoints: $breakpoints) { |
| 130 |
$min: breakpoint-min($lower, $breakpoints); |
| 131 |
$max: breakpoint-max($upper, $breakpoints); |
| 132 |
|
| 133 |
@if $min !=null and $max !=null { |
| 134 |
@media (min-width: $min) and (max-width: $max) { |
| 135 |
@content; |
| 136 |
} |
| 137 |
} @else if $max==null { |
| 138 |
@include media-up($lower, $breakpoints) { |
| 139 |
@content; |
| 140 |
} |
| 141 |
} @else if $min==null { |
| 142 |
@include media-down($upper, $breakpoints) { |
| 143 |
@content; |
| 144 |
} |
| 145 |
} |
| 146 |
} |
| 147 |
|
| 148 |
// For each breakpoint, define the maximum width of the container in a media query |
| 149 |
@mixin container-max-widths($max-widths: $container-widths, $breakpoints: $breakpoints) { |
| 150 |
|
| 151 |
@each $breakpoint, |
| 152 |
$container-width in $max-widths { |
| 153 |
@include media-up($breakpoint) { |
| 154 |
max-width: $container-width; |
| 155 |
} |
| 156 |
} |
| 157 |
} |
| 158 |
|
| 159 |
/// Grid system |
| 160 |
// |
| 161 |
// Generate semantic grid columns with these mixins. |
| 162 |
@mixin container($name: container, $gutter: $gutter-width) { |
| 163 |
.#{$name} { |
| 164 |
width: 100%; |
| 165 |
padding-right: $gutter / 2; |
| 166 |
padding-left: $gutter / 2; |
| 167 |
margin-right: auto; |
| 168 |
margin-left: auto; |
| 169 |
@include container-max-widths(); |
| 170 |
} |
| 171 |
} |
| 172 |
|
| 173 |
@mixin container-fluid($name: container-fluid, $gutter: $gutter-width) { |
| 174 |
.#{$name} { |
| 175 |
width: 100%; |
| 176 |
padding-right: $gutter / 2; |
| 177 |
padding-left: $gutter / 2; |
| 178 |
margin-right: auto; |
| 179 |
margin-left: auto; |
| 180 |
} |
| 181 |
} |
| 182 |
|
| 183 |
// Row |
| 184 |
// |
| 185 |
// Rows contain your columns. |
| 186 |
@mixin row($name: row, $gutter: $gutter-width, $max-width: false) { |
| 187 |
@if $max-width==true { |
| 188 |
.#{$name} { |
| 189 |
margin-right: auto; |
| 190 |
margin-left: auto; |
| 191 |
display: flex; |
| 192 |
flex-flow: row wrap; |
| 193 |
@include container-max-widths(); |
| 194 |
} |
| 195 |
} @else { |
| 196 |
.#{$name} { |
| 197 |
display: flex; |
| 198 |
flex-wrap: wrap; |
| 199 |
margin-right: -$gutter / 2; |
| 200 |
margin-left: -$gutter / 2; |
| 201 |
} |
| 202 |
} |
| 203 |
} |
| 204 |
|
| 205 |
@mixin column($size, $column: $columns) { |
| 206 |
flex: 0 0 percentage($size / $column); |
| 207 |
// Add a `max-width` to ensure content within each column does not blow out |
| 208 |
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari |
| 209 |
// do not appear to require this. |
| 210 |
max-width: percentage($size / $column); |
| 211 |
} |
| 212 |
|
| 213 |
@mixin col-offset($size, $columns: $columns) { |
| 214 |
$num: $size / $columns; |
| 215 |
margin-left: if($num==0, 0, percentage($num)); |
| 216 |
} |
| 217 |
|
| 218 |
.col { |
| 219 |
position: relative; |
| 220 |
width: 100%; |
| 221 |
padding-right: $gutter-width / 2; |
| 222 |
padding-left: $gutter-width / 2; |
| 223 |
} |
| 224 |
|
| 225 |
@mixin col-ready($gutter: $gutter-width) { |
| 226 |
@extend .col; |
| 227 |
} |
| 228 |
|
| 229 |
//Gird Columns Width Responsive |
| 230 |
@mixin col($name: null, $columns: null, $breakpoint: null) { |
| 231 |
@if $name==col { |
| 232 |
@if ($breakpoint==sm, md, lg, xl, xxl) { |
| 233 |
.#{$name}-#{$breakpoint}-#{$columns} { |
| 234 |
@include col-ready(); |
| 235 |
|
| 236 |
@include media-up(#{$breakpoint}) { |
| 237 |
@include column($columns); |
| 238 |
} |
| 239 |
} |
| 240 |
} @else { |
| 241 |
.#{$name}#{$columns} { |
| 242 |
@include col-ready(); |
| 243 |
} |
| 244 |
} |
| 245 |
} @else { |
| 246 |
.#{$name} { |
| 247 |
@include col-ready(); |
| 248 |
} |
| 249 |
|
| 250 |
.#{$breakpoint}-#{$columns} { |
| 251 |
@include media-up(#{$breakpoint}) { |
| 252 |
@include column($columns); |
| 253 |
} |
| 254 |
} |
| 255 |
} |
| 256 |
} |
| 257 |
|
| 258 |
//Gird Columns Offset Width Responsive |
| 259 |
@mixin offset($name, $columns, $breakpoint: null) { |
| 260 |
@if ($breakpoint==sm, md, lg, xl, xxl) { |
| 261 |
.#{$name}-#{$breakpoint}-#{$columns} { |
| 262 |
@include media-up($breakpoint) { |
| 263 |
@include col-offset($columns); |
| 264 |
} |
| 265 |
} |
| 266 |
} @else { |
| 267 |
.#{$name}-#{$columns} { |
| 268 |
@include col-offset($columns); |
| 269 |
} |
| 270 |
} |
| 271 |
} |
| 272 |
|
| 273 |
// Mixins for controlling flex. |
| 274 |
@mixin flex($name, $value, $breakpoint: null) { |
| 275 |
@if $value==1 { |
| 276 |
@if $breakpoint { |
| 277 |
@include media-up($breakpoint) { |
| 278 |
.#{$name} { |
| 279 |
flex: 1 1 0%; |
| 280 |
} |
| 281 |
} |
| 282 |
} @else { |
| 283 |
.#{$name} { |
| 284 |
flex: 1 1 0%; |
| 285 |
} |
| 286 |
} |
| 287 |
} @else if $value==auto { |
| 288 |
@if $breakpoint { |
| 289 |
@include media-up($breakpoint) { |
| 290 |
.#{$name} { |
| 291 |
flex: 1 1 auto; |
| 292 |
} |
| 293 |
} |
| 294 |
} @else { |
| 295 |
.#{$name} { |
| 296 |
flex: 1 1 auto; |
| 297 |
} |
| 298 |
} |
| 299 |
|
| 300 |
} @else if $value==initial { |
| 301 |
@if $breakpoint { |
| 302 |
@include media-up($breakpoint) { |
| 303 |
.#{$name} { |
| 304 |
flex: 0 1 auto; |
| 305 |
} |
| 306 |
} |
| 307 |
} @else { |
| 308 |
.#{$name} { |
| 309 |
flex: 0 1 auto; |
| 310 |
} |
| 311 |
} |
| 312 |
} @else { |
| 313 |
@if $breakpoint { |
| 314 |
@include media-up($breakpoint) { |
| 315 |
.#{$name} { |
| 316 |
flex: none; |
| 317 |
} |
| 318 |
} |
| 319 |
} @else { |
| 320 |
.#{$name} { |
| 321 |
flex: none; |
| 322 |
} |
| 323 |
} |
| 324 |
} |
| 325 |
} |
| 326 |
|
| 327 |
// Controlling gutters between rows and columns. |
| 328 |
@mixin gap($size, $position: x) { |
| 329 |
@if $position==y { |
| 330 |
row-gap: $size; |
| 331 |
grid-row-gap: $size; |
| 332 |
} @else { |
| 333 |
gap: $size; |
| 334 |
grid-gap: $size; |
| 335 |
} |
| 336 |
} |
| 337 |
|
| 338 |
/*-------------------------------------- |
| 339 |
- Utilities |
| 340 |
----------------------------------------*/ |
| 341 |
@mixin hover() { |
| 342 |
&:hover { |
| 343 |
@content; |
| 344 |
} |
| 345 |
} |
| 346 |
|
| 347 |
@mixin focus() { |
| 348 |
&:focus { |
| 349 |
@content; |
| 350 |
} |
| 351 |
} |
| 352 |
|
| 353 |
@mixin hover-focus() { |
| 354 |
|
| 355 |
&:hover, |
| 356 |
&:focus { |
| 357 |
@content; |
| 358 |
} |
| 359 |
} |
| 360 |
|
| 361 |
@mixin plain-hover-focus() { |
| 362 |
|
| 363 |
&, |
| 364 |
&:hover, |
| 365 |
&:focus { |
| 366 |
@content; |
| 367 |
} |
| 368 |
} |
| 369 |
|
| 370 |
@mixin hover-focus-active() { |
| 371 |
&:hover, |
| 372 |
&:focus, |
| 373 |
&:active { |
| 374 |
@content; |
| 375 |
} |
| 376 |
} |
| 377 |
|
| 378 |
@mixin before($content: null) { |
| 379 |
@if $content { |
| 380 |
&::before { |
| 381 |
content: $content; |
| 382 |
@content; |
| 383 |
} |
| 384 |
} @else { |
| 385 |
&::before { |
| 386 |
@content; |
| 387 |
} |
| 388 |
} |
| 389 |
} |
| 390 |
|
| 391 |
@mixin after($content: null) { |
| 392 |
@if $content { |
| 393 |
&::after { |
| 394 |
content: $content; |
| 395 |
@content; |
| 396 |
} |
| 397 |
} @else { |
| 398 |
&::after { |
| 399 |
@content; |
| 400 |
} |
| 401 |
} |
| 402 |
} |
| 403 |
|
| 404 |
@mixin before-after($content: null) { |
| 405 |
@if $content { |
| 406 |
|
| 407 |
&::before, |
| 408 |
&::after { |
| 409 |
content: $content; |
| 410 |
@content; |
| 411 |
} |
| 412 |
} @else { |
| 413 |
|
| 414 |
&::before, |
| 415 |
&::after { |
| 416 |
@content; |
| 417 |
} |
| 418 |
} |
| 419 |
} |
| 420 |
|
| 421 |
@mixin pseudo($args: top 0 left 0, $loca: before, $position: absolute, $content: "") { |
| 422 |
@if ($loca==after) { |
| 423 |
@include after($content) { |
| 424 |
@if ($position==relative) { |
| 425 |
@include relative($args); |
| 426 |
@content; |
| 427 |
} @else { |
| 428 |
@include absolute($args); |
| 429 |
@content; |
| 430 |
} |
| 431 |
} |
| 432 |
} @else if ($loca==before-after) { |
| 433 |
@include before-after($content) { |
| 434 |
@if ($position==relative) { |
| 435 |
@include relative($args); |
| 436 |
@content; |
| 437 |
} @else { |
| 438 |
@include absolute($args); |
| 439 |
@content; |
| 440 |
} |
| 441 |
} |
| 442 |
} @else { |
| 443 |
@include before($content) { |
| 444 |
@if ($position==relative) { |
| 445 |
@include relative($args); |
| 446 |
@content; |
| 447 |
} @else { |
| 448 |
@include absolute($args); |
| 449 |
@content; |
| 450 |
} |
| 451 |
} |
| 452 |
} |
| 453 |
} |
| 454 |
|
| 455 |
//Create the mixin for theme colors |
| 456 |
@mixin color($name, $color) { |
| 457 |
// Define colors in your theme |
| 458 |
$primary: $color; |
| 459 |
$bg-color: $color; |
| 460 |
|
| 461 |
// Add your Prefix classes name |
| 462 |
.text-#{$name} { |
| 463 |
color: $primary !important; |
| 464 |
} |
| 465 |
|
| 466 |
.bg-#{$name} { |
| 467 |
background: $primary; |
| 468 |
} |
| 469 |
|
| 470 |
} |
| 471 |
|
| 472 |
// Gradient Color Mixin |
| 473 |
@mixin gradient($direction, $first, $last) { |
| 474 |
background-color: $first; |
| 475 |
background-image: linear-gradient($direction, $first 0%, $last 100%); |
| 476 |
} |
| 477 |
|
| 478 |
// Gradient Color Class Name with Mixin |
| 479 |
@mixin gradient-color($class, $direction, $first, $last) { |
| 480 |
.#{$class} { |
| 481 |
@include gradient($direction, $first, $last); |
| 482 |
} |
| 483 |
} |
| 484 |
|
| 485 |
// Mixins for controlling the direction of flex items. |
| 486 |
@mixin flex-direction($name, $value, $breakpoint: null) { |
| 487 |
@if $breakpoint { |
| 488 |
@include media-up($breakpoint) { |
| 489 |
.#{$name} { |
| 490 |
flex-direction: $value; |
| 491 |
} |
| 492 |
} |
| 493 |
} @else { |
| 494 |
.#{$name} { |
| 495 |
flex-direction: $value; |
| 496 |
} |
| 497 |
} |
| 498 |
} |
| 499 |
|
| 500 |
// Mixins for controlling how flex items wrap. |
| 501 |
@mixin flex-wrap($name, $value, $breakpoint: null) { |
| 502 |
@if $breakpoint { |
| 503 |
@include media-up($breakpoint) { |
| 504 |
.#{$name} { |
| 505 |
flex-wrap: $value; |
| 506 |
} |
| 507 |
} |
| 508 |
} @else { |
| 509 |
.#{$name} { |
| 510 |
flex-wrap: $value; |
| 511 |
} |
| 512 |
} |
| 513 |
} |
| 514 |
|
| 515 |
// Mixins for controlling flex. |
| 516 |
@mixin flex($name, $value, $breakpoint: null) { |
| 517 |
@if $value==1 { |
| 518 |
@if $breakpoint { |
| 519 |
@include media-up($breakpoint) { |
| 520 |
.#{$name} { |
| 521 |
flex: 1 1 0%; |
| 522 |
} |
| 523 |
} |
| 524 |
} @else { |
| 525 |
.#{$name} { |
| 526 |
flex: 1 1 0%; |
| 527 |
} |
| 528 |
} |
| 529 |
} @else if $value==auto { |
| 530 |
@if $breakpoint { |
| 531 |
@include media-up($breakpoint) { |
| 532 |
.#{$name} { |
| 533 |
flex: 1 1 auto; |
| 534 |
} |
| 535 |
} |
| 536 |
} @else { |
| 537 |
.#{$name} { |
| 538 |
flex: 1 1 auto; |
| 539 |
} |
| 540 |
} |
| 541 |
|
| 542 |
} @else if $value==initial { |
| 543 |
@if $breakpoint { |
| 544 |
@include media-up($breakpoint) { |
| 545 |
.#{$name} { |
| 546 |
flex: 0 1 auto; |
| 547 |
} |
| 548 |
} |
| 549 |
} @else { |
| 550 |
.#{$name} { |
| 551 |
flex: 0 1 auto; |
| 552 |
} |
| 553 |
} |
| 554 |
} @else { |
| 555 |
@if $breakpoint { |
| 556 |
@include media-up($breakpoint) { |
| 557 |
.#{$name} { |
| 558 |
flex: none; |
| 559 |
} |
| 560 |
} |
| 561 |
} @else { |
| 562 |
.#{$name} { |
| 563 |
flex: none; |
| 564 |
} |
| 565 |
} |
| 566 |
} |
| 567 |
} |
| 568 |
|
| 569 |
// Mixins for controlling how flex item grow. |
| 570 |
@mixin flex-grow($name, $value, $breakpoint: null) { |
| 571 |
@if $value==0 { |
| 572 |
@if $breakpoint { |
| 573 |
@include media-up($breakpoint) { |
| 574 |
.#{$name} { |
| 575 |
flex-grow: 0; |
| 576 |
} |
| 577 |
} |
| 578 |
} @else { |
| 579 |
.#{$name} { |
| 580 |
flex-grow: 0; |
| 581 |
} |
| 582 |
} |
| 583 |
} @else { |
| 584 |
@if $breakpoint { |
| 585 |
@include media-up($breakpoint) { |
| 586 |
.#{$name} { |
| 587 |
flex-grow: 1; |
| 588 |
} |
| 589 |
} |
| 590 |
} @else { |
| 591 |
.#{$name} { |
| 592 |
flex-grow: 1; |
| 593 |
} |
| 594 |
} |
| 595 |
} |
| 596 |
} |
| 597 |
|
| 598 |
// Mixins for controlling how flex item shrink. |
| 599 |
@mixin flex-shrink($name, $value, $breakpoint: null) { |
| 600 |
@if $value==0 { |
| 601 |
@if $breakpoint { |
| 602 |
@include media-up($breakpoint) { |
| 603 |
.#{$name} { |
| 604 |
flex-shrink: 0; |
| 605 |
} |
| 606 |
} |
| 607 |
} @else { |
| 608 |
.#{$name} { |
| 609 |
flex-shrink: 0; |
| 610 |
} |
| 611 |
} |
| 612 |
} @else { |
| 613 |
@if $breakpoint { |
| 614 |
@include media-up($breakpoint) { |
| 615 |
.#{$name} { |
| 616 |
flex-shrink: 1; |
| 617 |
} |
| 618 |
} |
| 619 |
} @else { |
| 620 |
.#{$name} { |
| 621 |
flex-shrink: 1; |
| 622 |
} |
| 623 |
} |
| 624 |
} |
| 625 |
} |
| 626 |
|
| 627 |
// The justify-content property. |
| 628 |
@mixin justify-content($name, $value, $breakpoint: null) { |
| 629 |
@if $breakpoint { |
| 630 |
@include media-up($breakpoint) { |
| 631 |
.#{$name} { |
| 632 |
justify-content: $value; |
| 633 |
} |
| 634 |
} |
| 635 |
} @else { |
| 636 |
.#{$name} { |
| 637 |
justify-content: $value; |
| 638 |
} |
| 639 |
} |
| 640 |
} |
| 641 |
|
| 642 |
// The justify-items property. |
| 643 |
@mixin justify-items($name, $value, $breakpoint: null) { |
| 644 |
@if $breakpoint { |
| 645 |
@include media-up($breakpoint) { |
| 646 |
.#{$name} { |
| 647 |
justify-items: $value; |
| 648 |
} |
| 649 |
} |
| 650 |
} @else { |
| 651 |
.#{$name} { |
| 652 |
justify-items: $value; |
| 653 |
} |
| 654 |
} |
| 655 |
} |
| 656 |
|
| 657 |
// The justify-self property. |
| 658 |
@mixin justify-self($name, $value, $breakpoint: null) { |
| 659 |
@if $breakpoint { |
| 660 |
@include media-up($breakpoint) { |
| 661 |
.#{$name} { |
| 662 |
justify-self: $value; |
| 663 |
} |
| 664 |
} |
| 665 |
} @else { |
| 666 |
.#{$name} { |
| 667 |
justify-self: $value; |
| 668 |
} |
| 669 |
} |
| 670 |
} |
| 671 |
|
| 672 |
// The align-content property. |
| 673 |
@mixin align-content($name, $value, $breakpoint: null) { |
| 674 |
@if $breakpoint { |
| 675 |
@include media-up($breakpoint) { |
| 676 |
.#{$name} { |
| 677 |
align-content: $value; |
| 678 |
} |
| 679 |
} |
| 680 |
} @else { |
| 681 |
.#{$name} { |
| 682 |
align-content: $value; |
| 683 |
} |
| 684 |
} |
| 685 |
} |
| 686 |
|
| 687 |
// The align-items property. |
| 688 |
@mixin align-items($name, $value, $breakpoint: null) { |
| 689 |
@if $breakpoint { |
| 690 |
@include media-up($breakpoint) { |
| 691 |
.#{$name} { |
| 692 |
align-items: $value; |
| 693 |
} |
| 694 |
} |
| 695 |
} @else { |
| 696 |
.#{$name} { |
| 697 |
align-items: $value; |
| 698 |
} |
| 699 |
} |
| 700 |
} |
| 701 |
|
| 702 |
// The align-self property. |
| 703 |
@mixin align-self($name, $value, $breakpoint: null) { |
| 704 |
@if $breakpoint { |
| 705 |
@include media-up($breakpoint) { |
| 706 |
.#{$name} { |
| 707 |
align-self: $value; |
| 708 |
} |
| 709 |
} |
| 710 |
} @else { |
| 711 |
.#{$name} { |
| 712 |
align-self: $value; |
| 713 |
} |
| 714 |
} |
| 715 |
} |
| 716 |
|
| 717 |
// The align-content property. |
| 718 |
@mixin align-content($name, $value, $breakpoint: null) { |
| 719 |
@if $breakpoint { |
| 720 |
@include media-up($breakpoint) { |
| 721 |
.#{$name} { |
| 722 |
align-content: $value; |
| 723 |
} |
| 724 |
} |
| 725 |
} @else { |
| 726 |
.#{$name} { |
| 727 |
align-content: $value; |
| 728 |
} |
| 729 |
} |
| 730 |
} |
| 731 |
|
| 732 |
// margin Name with Mixin |
| 733 |
@mixin margin($name, $value) { |
| 734 |
|
| 735 |
// Add your Prefix name |
| 736 |
@if $name==mt { |
| 737 |
@if $value==auto { |
| 738 |
margin-top: #{$value}; |
| 739 |
} @else if $value==0 { |
| 740 |
margin-top: #{$value}; |
| 741 |
} @else { |
| 742 |
margin-top: #{$value}; |
| 743 |
} |
| 744 |
} @else if $name==mb { |
| 745 |
@if $value==auto { |
| 746 |
margin-bottom: #{$value}; |
| 747 |
} @else if $value==0 { |
| 748 |
margin-bottom: #{$value}; |
| 749 |
} @else { |
| 750 |
margin-bottom: #{$value}; |
| 751 |
} |
| 752 |
} @else if $name==ml { |
| 753 |
@if $value==auto { |
| 754 |
margin-left: #{$value}; |
| 755 |
} @else if $value==0 { |
| 756 |
margin-left: #{$value}; |
| 757 |
} @else { |
| 758 |
margin-left: #{$value}; |
| 759 |
} |
| 760 |
} @else if $name==mr { |
| 761 |
@if $value==auto { |
| 762 |
margin-right: #{$value}; |
| 763 |
} @else if $value==0 { |
| 764 |
margin-right: #{$value}; |
| 765 |
} @else { |
| 766 |
margin-right: #{$value}; |
| 767 |
} |
| 768 |
} @else if $name==mx { |
| 769 |
@if $value==auto { |
| 770 |
margin-left: #{$value}; |
| 771 |
margin-right: #{$value}; |
| 772 |
} @else if $value==0 { |
| 773 |
margin-left: #{$value}; |
| 774 |
margin-right: #{$value}; |
| 775 |
} @else { |
| 776 |
margin-left: #{$value}; |
| 777 |
margin-right: #{$value}; |
| 778 |
} |
| 779 |
} @else if $name==my { |
| 780 |
@if $value==auto { |
| 781 |
margin-top: #{$value}; |
| 782 |
margin-bottom: #{$value}; |
| 783 |
} @else if $value==0 { |
| 784 |
margin-top: #{$value}; |
| 785 |
margin-bottom: #{$value}; |
| 786 |
} @else { |
| 787 |
margin-top: #{$value}; |
| 788 |
margin-bottom: #{$value}; |
| 789 |
} |
| 790 |
} @else { |
| 791 |
@if $value==auto { |
| 792 |
margin: #{$value}; |
| 793 |
} @else if $value==0 { |
| 794 |
margin: #{$value}; |
| 795 |
} @else { |
| 796 |
margin: #{$value}; |
| 797 |
} |
| 798 |
} |
| 799 |
} |
| 800 |
|
| 801 |
@mixin margin-rs($name, $breakpoint, $value) { |
| 802 |
|
| 803 |
// Add your Prefix name |
| 804 |
@if $name==mt { |
| 805 |
@if $value==auto { |
| 806 |
@include media-up(#{$breakpoint}) { |
| 807 |
margin-top: #{$value}; |
| 808 |
} |
| 809 |
} @else if $value==0 { |
| 810 |
@include media-up(#{$breakpoint}) { |
| 811 |
margin-top: #{$value}; |
| 812 |
} |
| 813 |
} @else { |
| 814 |
@include media-up(#{$breakpoint}) { |
| 815 |
margin-top: #{$value}; |
| 816 |
} |
| 817 |
} |
| 818 |
} @else if $name==mb { |
| 819 |
@if $value==auto { |
| 820 |
@include media-up(#{$breakpoint}) { |
| 821 |
margin-bottom: #{$value}; |
| 822 |
} |
| 823 |
} @else if $value==0 { |
| 824 |
@include media-up(#{$breakpoint}) { |
| 825 |
margin-bottom: #{$value}; |
| 826 |
} |
| 827 |
} @else { |
| 828 |
@include media-up(#{$breakpoint}) { |
| 829 |
margin-bottom: #{$value}; |
| 830 |
} |
| 831 |
} |
| 832 |
} @else if $name==ml { |
| 833 |
@if $value==auto { |
| 834 |
@include media-up(#{$breakpoint}) { |
| 835 |
margin-left: #{$value}; |
| 836 |
} |
| 837 |
} @else if $value==0 { |
| 838 |
@include media-up(#{$breakpoint}) { |
| 839 |
margin-left: #{$value}; |
| 840 |
} |
| 841 |
} @else { |
| 842 |
@include media-up(#{$breakpoint}) { |
| 843 |
margin-left: #{$value}; |
| 844 |
} |
| 845 |
} |
| 846 |
} @else if $name==mr { |
| 847 |
@if $value==auto { |
| 848 |
@include media-up(#{$breakpoint}) { |
| 849 |
margin-right: #{$value}; |
| 850 |
} |
| 851 |
} @else if $value==0 { |
| 852 |
@include media-up(#{$breakpoint}) { |
| 853 |
margin-right: #{$value}; |
| 854 |
} |
| 855 |
} @else { |
| 856 |
@include media-up(#{$breakpoint}) { |
| 857 |
margin-right: #{$value}; |
| 858 |
} |
| 859 |
} |
| 860 |
} @else if $name==mx { |
| 861 |
@if $value==auto { |
| 862 |
@include media-up(#{$breakpoint}) { |
| 863 |
margin-left: #{$value}; |
| 864 |
margin-right: #{$value}; |
| 865 |
} |
| 866 |
} @else if $value==0 { |
| 867 |
@include media-up(#{$breakpoint}) { |
| 868 |
margin-left: #{$value}; |
| 869 |
margin-right: #{$value}; |
| 870 |
} |
| 871 |
} @else { |
| 872 |
@include media-up(#{$breakpoint}) { |
| 873 |
margin-left: #{$value}; |
| 874 |
margin-right: #{$value}; |
| 875 |
} |
| 876 |
} |
| 877 |
} @else if $name==my { |
| 878 |
@if $value==auto { |
| 879 |
@include media-up(#{$breakpoint}) { |
| 880 |
margin-top: #{$value}; |
| 881 |
margin-bottom: #{$value}; |
| 882 |
} |
| 883 |
} @else if $value==0 { |
| 884 |
@include media-up(#{$breakpoint}) { |
| 885 |
margin-top: #{$value}; |
| 886 |
margin-bottom: #{$value}; |
| 887 |
} |
| 888 |
} @else { |
| 889 |
@include media-up(#{$breakpoint}) { |
| 890 |
margin-top: #{$value}; |
| 891 |
margin-bottom: #{$value}; |
| 892 |
} |
| 893 |
} |
| 894 |
} @else { |
| 895 |
@if $value==auto { |
| 896 |
@include media-up(#{$breakpoint}) { |
| 897 |
margin: #{$value}; |
| 898 |
} |
| 899 |
} @else if $value==0 { |
| 900 |
@include media-up(#{$breakpoint}) { |
| 901 |
margin: #{$value}; |
| 902 |
} |
| 903 |
} @else { |
| 904 |
@include media-up(#{$breakpoint}) { |
| 905 |
margin: #{$value}; |
| 906 |
} |
| 907 |
} |
| 908 |
} |
| 909 |
} |
| 910 |
|
| 911 |
// margin Class Name with Mixin |
| 912 |
@mixin margin-class($name, $property, $value, $pre: $active-prefix) { |
| 913 |
|
| 914 |
// Add your Prefix classes name |
| 915 |
@if $property==mt { |
| 916 |
@if $value==auto { |
| 917 |
.#{$name} { |
| 918 |
margin-top: #{$value}; |
| 919 |
} |
| 920 |
} @else if $value==0 { |
| 921 |
.#{$name} { |
| 922 |
margin-top: #{$value}; |
| 923 |
} |
| 924 |
} @else { |
| 925 |
.#{$name} { |
| 926 |
margin-top: #{$value}#{$pre}; |
| 927 |
} |
| 928 |
} |
| 929 |
} @else if $property==mb { |
| 930 |
@if $value==auto { |
| 931 |
.#{$name} { |
| 932 |
margin-bottom: #{$value}; |
| 933 |
} |
| 934 |
} @else if $value==0 { |
| 935 |
.#{$name} { |
| 936 |
margin-bottom: #{$value}; |
| 937 |
} |
| 938 |
} @else { |
| 939 |
.#{$name} { |
| 940 |
margin-bottom: #{$value}#{$pre}; |
| 941 |
} |
| 942 |
} |
| 943 |
} @else if $property==ml { |
| 944 |
@if $value==auto { |
| 945 |
.#{$name} { |
| 946 |
margin-left: #{$value}; |
| 947 |
} |
| 948 |
} @else if $value==0 { |
| 949 |
.#{$name} { |
| 950 |
margin-left: #{$value}; |
| 951 |
} |
| 952 |
} @else { |
| 953 |
.#{$name} { |
| 954 |
margin-left: #{$value}#{$pre}; |
| 955 |
} |
| 956 |
} |
| 957 |
} @else if $property==mr { |
| 958 |
@if $value==auto { |
| 959 |
.#{$name} { |
| 960 |
margin-right: #{$value}; |
| 961 |
} |
| 962 |
} @else if $value==0 { |
| 963 |
.#{$name} { |
| 964 |
margin-right: #{$value}; |
| 965 |
} |
| 966 |
} @else { |
| 967 |
.#{$name} { |
| 968 |
margin-right: #{$value}#{$pre}; |
| 969 |
} |
| 970 |
} |
| 971 |
} @else if $property==mx { |
| 972 |
@if $value==auto { |
| 973 |
.#{$name} { |
| 974 |
margin-left: #{$value}; |
| 975 |
margin-right: #{$value}; |
| 976 |
} |
| 977 |
} @else if $value==0 { |
| 978 |
.#{$name} { |
| 979 |
margin-left: #{$value}; |
| 980 |
margin-right: #{$value}; |
| 981 |
} |
| 982 |
} @else { |
| 983 |
.#{$name} { |
| 984 |
margin-left: #{$value}#{$pre}; |
| 985 |
margin-right: #{$value}#{$pre}; |
| 986 |
} |
| 987 |
} |
| 988 |
} @else if $property==my { |
| 989 |
@if $value==auto { |
| 990 |
.#{$name} { |
| 991 |
margin-top: #{$value}; |
| 992 |
margin-bottom: #{$value}; |
| 993 |
} |
| 994 |
} @else if $value==0 { |
| 995 |
.#{$name} { |
| 996 |
margin-top: #{$value}; |
| 997 |
margin-bottom: #{$value}; |
| 998 |
} |
| 999 |
} @else { |
| 1000 |
.#{$name} { |
| 1001 |
margin-top: #{$value}#{$pre}; |
| 1002 |
margin-bottom: #{$value}#{$pre}; |
| 1003 |
} |
| 1004 |
} |
| 1005 |
} @else { |
| 1006 |
@if $value==auto { |
| 1007 |
.#{$name} { |
| 1008 |
margin: #{$value}; |
| 1009 |
} |
| 1010 |
} @else if $value==0 { |
| 1011 |
.#{$name} { |
| 1012 |
margin: #{$value}; |
| 1013 |
} |
| 1014 |
} @else { |
| 1015 |
.#{$name} { |
| 1016 |
margin: #{$value}#{$pre}; |
| 1017 |
} |
| 1018 |
} |
| 1019 |
} |
| 1020 |
} |
| 1021 |
|
| 1022 |
// Responsive margin Class Name with Mixin |
| 1023 |
@mixin margin-class-rs($name, $property, $breakpoint, $value, $pre: $active-prefix) { |
| 1024 |
|
| 1025 |
// Add your Prefix classe name |
| 1026 |
@if $property==mt { |
| 1027 |
@if $value==auto { |
| 1028 |
.#{$name} { |
| 1029 |
@include media-up(#{$breakpoint}) { |
| 1030 |
margin-top: #{$value}; |
| 1031 |
} |
| 1032 |
} |
| 1033 |
} @else if $value==0 { |
| 1034 |
.#{$name} { |
| 1035 |
@include media-up(#{$breakpoint}) { |
| 1036 |
margin-top: #{$value}; |
| 1037 |
} |
| 1038 |
} |
| 1039 |
} @else { |
| 1040 |
.#{$name} { |
| 1041 |
@include media-up(#{$breakpoint}) { |
| 1042 |
margin-top: #{$value}#{$pre}; |
| 1043 |
} |
| 1044 |
} |
| 1045 |
} |
| 1046 |
} @else if $property==mb { |
| 1047 |
@if $value==auto { |
| 1048 |
.#{$name} { |
| 1049 |
@include media-up(#{$breakpoint}) { |
| 1050 |
margin-bottom: #{$value}; |
| 1051 |
} |
| 1052 |
} |
| 1053 |
} @else if $value==0 { |
| 1054 |
.#{$name} { |
| 1055 |
@include media-up(#{$breakpoint}) { |
| 1056 |
margin-bottom: #{$value}; |
| 1057 |
} |
| 1058 |
} |
| 1059 |
} @else { |
| 1060 |
.#{$name} { |
| 1061 |
@include media-up(#{$breakpoint}) { |
| 1062 |
margin-bottom: #{$value}#{$pre}; |
| 1063 |
} |
| 1064 |
} |
| 1065 |
} |
| 1066 |
} @else if $property==ml { |
| 1067 |
@if $value==auto { |
| 1068 |
.#{$name} { |
| 1069 |
@include media-up(#{$breakpoint}) { |
| 1070 |
margin-left: #{$value}; |
| 1071 |
} |
| 1072 |
} |
| 1073 |
} @else if $value==0 { |
| 1074 |
.#{$name} { |
| 1075 |
@include media-up(#{$breakpoint}) { |
| 1076 |
margin-left: #{$value}; |
| 1077 |
} |
| 1078 |
} |
| 1079 |
} @else { |
| 1080 |
.#{$name} { |
| 1081 |
@include media-up(#{$breakpoint}) { |
| 1082 |
margin-left: #{$value}#{$pre}; |
| 1083 |
} |
| 1084 |
} |
| 1085 |
} |
| 1086 |
} @else if $property==pr { |
| 1087 |
@if $value==auto { |
| 1088 |
.#{$name} { |
| 1089 |
@include media-up(#{$breakpoint}) { |
| 1090 |
margin-right: #{$value}; |
| 1091 |
} |
| 1092 |
} |
| 1093 |
} @else if $value==0 { |
| 1094 |
.#{$name} { |
| 1095 |
@include media-up(#{$breakpoint}) { |
| 1096 |
margin-right: #{$value}; |
| 1097 |
} |
| 1098 |
} |
| 1099 |
} @else { |
| 1100 |
.#{$name} { |
| 1101 |
@include media-up(#{$breakpoint}) { |
| 1102 |
margin-right: #{$value}#{$pre}; |
| 1103 |
} |
| 1104 |
} |
| 1105 |
} |
| 1106 |
} @else if $property==mx { |
| 1107 |
@if $value==auto { |
| 1108 |
.#{$name} { |
| 1109 |
@include media-up(#{$breakpoint}) { |
| 1110 |
margin-left: #{$value}; |
| 1111 |
margin-right: #{$value}; |
| 1112 |
} |
| 1113 |
} |
| 1114 |
} @else if $value==0 { |
| 1115 |
.#{$name} { |
| 1116 |
@include media-up(#{$breakpoint}) { |
| 1117 |
margin-left: #{$value}; |
| 1118 |
margin-right: #{$value}; |
| 1119 |
} |
| 1120 |
} |
| 1121 |
} @else { |
| 1122 |
.#{$name} { |
| 1123 |
@include media-up(#{$breakpoint}) { |
| 1124 |
margin-left: #{$value}#{$pre}; |
| 1125 |
margin-right: #{$value}#{$pre}; |
| 1126 |
} |
| 1127 |
} |
| 1128 |
} |
| 1129 |
} @else if $property==my { |
| 1130 |
@if $value==auto { |
| 1131 |
.#{$name} { |
| 1132 |
@include media-up(#{$breakpoint}) { |
| 1133 |
margin-top: #{$value}; |
| 1134 |
margin-bottom: #{$value}; |
| 1135 |
} |
| 1136 |
} |
| 1137 |
} @else if $value==0 { |
| 1138 |
.#{$name} { |
| 1139 |
@include media-up(#{$breakpoint}) { |
| 1140 |
margin-top: #{$value}; |
| 1141 |
margin-bottom: #{$value}; |
| 1142 |
} |
| 1143 |
} |
| 1144 |
} @else { |
| 1145 |
.#{$name} { |
| 1146 |
@include media-up(#{$breakpoint}) { |
| 1147 |
margin-top: #{$value}#{$pre}; |
| 1148 |
margin-bottom: #{$value}#{$pre}; |
| 1149 |
} |
| 1150 |
} |
| 1151 |
} |
| 1152 |
} @else { |
| 1153 |
@if $value==auto { |
| 1154 |
.#{$name} { |
| 1155 |
@include media-up(#{$breakpoint}) { |
| 1156 |
margin: #{$value}; |
| 1157 |
} |
| 1158 |
} |
| 1159 |
} @else if $value==0 { |
| 1160 |
.#{$name} { |
| 1161 |
@include media-up(#{$breakpoint}) { |
| 1162 |
margin: #{$value}; |
| 1163 |
} |
| 1164 |
} |
| 1165 |
} @else { |
| 1166 |
.#{$name} { |
| 1167 |
@include media-up(#{$breakpoint}) { |
| 1168 |
margin: #{$value}#{$pre}; |
| 1169 |
} |
| 1170 |
} |
| 1171 |
} |
| 1172 |
} |
| 1173 |
} |
| 1174 |
|
| 1175 |
// padding Name with Mixin |
| 1176 |
@mixin padding($name, $value) { |
| 1177 |
|
| 1178 |
// Add your Prefix name |
| 1179 |
@if $name==pt { |
| 1180 |
@if $value==auto { |
| 1181 |
padding-top: #{$value}; |
| 1182 |
} @else if $value==0 { |
| 1183 |
padding-top: #{$value}; |
| 1184 |
} @else { |
| 1185 |
padding-top: #{$value}; |
| 1186 |
} |
| 1187 |
} @else if $name==pb { |
| 1188 |
@if $value==auto { |
| 1189 |
padding-bottom: #{$value}; |
| 1190 |
} @else if $value==0 { |
| 1191 |
padding-bottom: #{$value}; |
| 1192 |
} @else { |
| 1193 |
padding-bottom: #{$value}; |
| 1194 |
} |
| 1195 |
} @else if $name==pl { |
| 1196 |
@if $value==auto { |
| 1197 |
padding-left: #{$value}; |
| 1198 |
} @else if $value==0 { |
| 1199 |
padding-left: #{$value}; |
| 1200 |
} @else { |
| 1201 |
padding-left: #{$value}; |
| 1202 |
} |
| 1203 |
} @else if $name==pr { |
| 1204 |
@if $value==auto { |
| 1205 |
padding-right: #{$value}; |
| 1206 |
} @else if $value==0 { |
| 1207 |
padding-right: #{$value}; |
| 1208 |
} @else { |
| 1209 |
padding-right: #{$value}; |
| 1210 |
} |
| 1211 |
} @else if $name==px { |
| 1212 |
@if $value==auto { |
| 1213 |
padding-left: #{$value}; |
| 1214 |
padding-right: #{$value}; |
| 1215 |
} @else if $value==0 { |
| 1216 |
padding-left: #{$value}; |
| 1217 |
padding-right: #{$value}; |
| 1218 |
} @else { |
| 1219 |
padding-left: #{$value}; |
| 1220 |
padding-right: #{$value}; |
| 1221 |
} |
| 1222 |
} @else if $name==py { |
| 1223 |
@if $value==auto { |
| 1224 |
padding-top: #{$value}; |
| 1225 |
padding-bottom: #{$value}; |
| 1226 |
} @else if $value==0 { |
| 1227 |
padding-top: #{$value}; |
| 1228 |
padding-bottom: #{$value}; |
| 1229 |
} @else { |
| 1230 |
padding-top: #{$value}; |
| 1231 |
padding-bottom: #{$value}; |
| 1232 |
} |
| 1233 |
} @else { |
| 1234 |
@if $value==auto { |
| 1235 |
padding: #{$value}; |
| 1236 |
} @else if $value==0 { |
| 1237 |
padding: #{$value}; |
| 1238 |
} @else { |
| 1239 |
padding: #{$value}; |
| 1240 |
} |
| 1241 |
} |
| 1242 |
} |
| 1243 |
|
| 1244 |
@mixin padding-rs($name, $breakpoint, $value) { |
| 1245 |
|
| 1246 |
// Add your Prefix name |
| 1247 |
@if $name==pt { |
| 1248 |
@if $value==auto { |
| 1249 |
@include media-up(#{$breakpoint}) { |
| 1250 |
padding-top: #{$value}; |
| 1251 |
} |
| 1252 |
} @else if $value==0 { |
| 1253 |
@include media-up(#{$breakpoint}) { |
| 1254 |
padding-top: #{$value}; |
| 1255 |
} |
| 1256 |
} @else { |
| 1257 |
@include media-up(#{$breakpoint}) { |
| 1258 |
padding-top: #{$value}; |
| 1259 |
} |
| 1260 |
} |
| 1261 |
} @else if $name==pb { |
| 1262 |
@if $value==auto { |
| 1263 |
@include media-up(#{$breakpoint}) { |
| 1264 |
padding-bottom: #{$value}; |
| 1265 |
} |
| 1266 |
} @else if $value==0 { |
| 1267 |
@include media-up(#{$breakpoint}) { |
| 1268 |
padding-bottom: #{$value}; |
| 1269 |
} |
| 1270 |
} @else { |
| 1271 |
@include media-up(#{$breakpoint}) { |
| 1272 |
padding-bottom: #{$value}; |
| 1273 |
} |
| 1274 |
} |
| 1275 |
} @else if $name==pl { |
| 1276 |
@if $value==auto { |
| 1277 |
@include media-up(#{$breakpoint}) { |
| 1278 |
padding-left: #{$value}; |
| 1279 |
} |
| 1280 |
} @else if $value==0 { |
| 1281 |
@include media-up(#{$breakpoint}) { |
| 1282 |
padding-left: #{$value}; |
| 1283 |
} |
| 1284 |
} @else { |
| 1285 |
@include media-up(#{$breakpoint}) { |
| 1286 |
padding-left: #{$value}; |
| 1287 |
} |
| 1288 |
} |
| 1289 |
} @else if $name==pr { |
| 1290 |
@if $value==auto { |
| 1291 |
@include media-up(#{$breakpoint}) { |
| 1292 |
padding-right: #{$value}; |
| 1293 |
} |
| 1294 |
} @else if $value==0 { |
| 1295 |
@include media-up(#{$breakpoint}) { |
| 1296 |
padding-right: #{$value}; |
| 1297 |
} |
| 1298 |
} @else { |
| 1299 |
@include media-up(#{$breakpoint}) { |
| 1300 |
padding-right: #{$value}; |
| 1301 |
} |
| 1302 |
} |
| 1303 |
} @else if $name==px { |
| 1304 |
@if $value==auto { |
| 1305 |
@include media-up(#{$breakpoint}) { |
| 1306 |
padding-left: #{$value}; |
| 1307 |
padding-right: #{$value}; |
| 1308 |
} |
| 1309 |
} @else if $value==0 { |
| 1310 |
@include media-up(#{$breakpoint}) { |
| 1311 |
padding-left: #{$value}; |
| 1312 |
padding-right: #{$value}; |
| 1313 |
} |
| 1314 |
} @else { |
| 1315 |
@include media-up(#{$breakpoint}) { |
| 1316 |
padding-left: #{$value}; |
| 1317 |
padding-right: #{$value}; |
| 1318 |
} |
| 1319 |
} |
| 1320 |
} @else if $name==py { |
| 1321 |
@if $value==auto { |
| 1322 |
@include media-up(#{$breakpoint}) { |
| 1323 |
padding-top: #{$value}; |
| 1324 |
padding-bottom: #{$value}; |
| 1325 |
} |
| 1326 |
} @else if $value==0 { |
| 1327 |
@include media-up(#{$breakpoint}) { |
| 1328 |
padding-top: #{$value}; |
| 1329 |
padding-bottom: #{$value}; |
| 1330 |
} |
| 1331 |
} @else { |
| 1332 |
@include media-up(#{$breakpoint}) { |
| 1333 |
padding-top: #{$value}; |
| 1334 |
padding-bottom: #{$value}; |
| 1335 |
} |
| 1336 |
} |
| 1337 |
} @else { |
| 1338 |
@if $value==auto { |
| 1339 |
@include media-up(#{$breakpoint}) { |
| 1340 |
padding: #{$value}; |
| 1341 |
} |
| 1342 |
} @else if $value==0 { |
| 1343 |
@include media-up(#{$breakpoint}) { |
| 1344 |
padding: #{$value}; |
| 1345 |
} |
| 1346 |
} @else { |
| 1347 |
@include media-up(#{$breakpoint}) { |
| 1348 |
padding: #{$value}; |
| 1349 |
} |
| 1350 |
} |
| 1351 |
} |
| 1352 |
} |
| 1353 |
|
| 1354 |
// padding Class Name with Mixin |
| 1355 |
@mixin padding-class($name, $property, $value, $pre: $active-prefix) { |
| 1356 |
|
| 1357 |
// Add your Prefix classes name |
| 1358 |
@if $property==pt { |
| 1359 |
@if $value==auto { |
| 1360 |
.#{$name} { |
| 1361 |
padding-top: #{$value}; |
| 1362 |
} |
| 1363 |
} @else if $value==0 { |
| 1364 |
.#{$name} { |
| 1365 |
padding-top: #{$value}; |
| 1366 |
} |
| 1367 |
} @else { |
| 1368 |
.#{$name} { |
| 1369 |
padding-top: #{$value}#{$pre}; |
| 1370 |
} |
| 1371 |
} |
| 1372 |
} @else if $property==pb { |
| 1373 |
@if $value==auto { |
| 1374 |
.#{$name} { |
| 1375 |
padding-bottom: #{$value}; |
| 1376 |
} |
| 1377 |
} @else if $value==0 { |
| 1378 |
.#{$name} { |
| 1379 |
padding-bottom: #{$value}; |
| 1380 |
} |
| 1381 |
} @else { |
| 1382 |
.#{$name} { |
| 1383 |
padding-bottom: #{$value}#{$pre}; |
| 1384 |
} |
| 1385 |
} |
| 1386 |
} @else if $property==pl { |
| 1387 |
@if $value==auto { |
| 1388 |
.#{$name} { |
| 1389 |
padding-left: #{$value}; |
| 1390 |
} |
| 1391 |
} @else if $value==0 { |
| 1392 |
.#{$name} { |
| 1393 |
padding-left: #{$value}; |
| 1394 |
} |
| 1395 |
} @else { |
| 1396 |
.#{$name} { |
| 1397 |
padding-left: #{$value}#{$pre}; |
| 1398 |
} |
| 1399 |
} |
| 1400 |
} @else if $property==pr { |
| 1401 |
@if $value==auto { |
| 1402 |
.#{$name} { |
| 1403 |
padding-right: #{$value}; |
| 1404 |
} |
| 1405 |
} @else if $value==0 { |
| 1406 |
.#{$name} { |
| 1407 |
padding-right: #{$value}; |
| 1408 |
} |
| 1409 |
} @else { |
| 1410 |
.#{$name} { |
| 1411 |
padding-right: #{$value}#{$pre}; |
| 1412 |
} |
| 1413 |
} |
| 1414 |
} @else if $property==px { |
| 1415 |
@if $value==auto { |
| 1416 |
.#{$name} { |
| 1417 |
padding-left: #{$value}; |
| 1418 |
padding-right: #{$value}; |
| 1419 |
} |
| 1420 |
} @else if $value==0 { |
| 1421 |
.#{$name} { |
| 1422 |
padding-left: #{$value}; |
| 1423 |
padding-right: #{$value}; |
| 1424 |
} |
| 1425 |
} @else { |
| 1426 |
.#{$name} { |
| 1427 |
padding-left: #{$value}#{$pre}; |
| 1428 |
padding-right: #{$value}#{$pre}; |
| 1429 |
} |
| 1430 |
} |
| 1431 |
} @else if $property==py { |
| 1432 |
@if $value==auto { |
| 1433 |
.#{$name} { |
| 1434 |
padding-top: #{$value}; |
| 1435 |
padding-bottom: #{$value}; |
| 1436 |
} |
| 1437 |
} @else if $value==0 { |
| 1438 |
.#{$name} { |
| 1439 |
padding-top: #{$value}; |
| 1440 |
padding-bottom: #{$value}; |
| 1441 |
} |
| 1442 |
} @else { |
| 1443 |
.#{$name} { |
| 1444 |
padding-top: #{$value}#{$pre}; |
| 1445 |
padding-bottom: #{$value}#{$pre}; |
| 1446 |
} |
| 1447 |
} |
| 1448 |
} @else { |
| 1449 |
@if $value==auto { |
| 1450 |
.#{$name} { |
| 1451 |
padding: #{$value}; |
| 1452 |
} |
| 1453 |
} @else if $value==0 { |
| 1454 |
.#{$name} { |
| 1455 |
padding: #{$value}; |
| 1456 |
} |
| 1457 |
} @else { |
| 1458 |
.#{$name} { |
| 1459 |
padding: #{$value}#{$pre}; |
| 1460 |
} |
| 1461 |
} |
| 1462 |
} |
| 1463 |
} |
| 1464 |
|
| 1465 |
// Responsive padding Class Name with Mixin |
| 1466 |
@mixin padding-class-rs($name, $property, $breakpoint, $value, $pre: $active-prefix) { |
| 1467 |
|
| 1468 |
// Add your Prefix classe name |
| 1469 |
@if $property==pt { |
| 1470 |
@if $value==auto { |
| 1471 |
.#{$name} { |
| 1472 |
@include media-up(#{$breakpoint}) { |
| 1473 |
padding-top: #{$value}; |
| 1474 |
} |
| 1475 |
} |
| 1476 |
} @else if $value==0 { |
| 1477 |
.#{$name} { |
| 1478 |
@include media-up(#{$breakpoint}) { |
| 1479 |
padding-top: #{$value}; |
| 1480 |
} |
| 1481 |
} |
| 1482 |
} @else { |
| 1483 |
.#{$name} { |
| 1484 |
@include media-up(#{$breakpoint}) { |
| 1485 |
padding-top: #{$value}#{$pre}; |
| 1486 |
} |
| 1487 |
} |
| 1488 |
} |
| 1489 |
} @else if $property==pb { |
| 1490 |
@if $value==auto { |
| 1491 |
.#{$name} { |
| 1492 |
@include media-up(#{$breakpoint}) { |
| 1493 |
padding-bottom: #{$value}; |
| 1494 |
} |
| 1495 |
} |
| 1496 |
} @else if $value==0 { |
| 1497 |
.#{$name} { |
| 1498 |
@include media-up(#{$breakpoint}) { |
| 1499 |
padding-bottom: #{$value}; |
| 1500 |
} |
| 1501 |
} |
| 1502 |
} @else { |
| 1503 |
.#{$name} { |
| 1504 |
@include media-up(#{$breakpoint}) { |
| 1505 |
padding-bottom: #{$value}#{$pre}; |
| 1506 |
} |
| 1507 |
} |
| 1508 |
} |
| 1509 |
} @else if $property==pl { |
| 1510 |
@if $value==auto { |
| 1511 |
.#{$name} { |
| 1512 |
@include media-up(#{$breakpoint}) { |
| 1513 |
padding-left: #{$value}; |
| 1514 |
} |
| 1515 |
} |
| 1516 |
} @else if $value==0 { |
| 1517 |
.#{$name} { |
| 1518 |
@include media-up(#{$breakpoint}) { |
| 1519 |
padding-left: #{$value}; |
| 1520 |
} |
| 1521 |
} |
| 1522 |
} @else { |
| 1523 |
.#{$name} { |
| 1524 |
@include media-up(#{$breakpoint}) { |
| 1525 |
padding-left: #{$value}#{$pre}; |
| 1526 |
} |
| 1527 |
} |
| 1528 |
} |
| 1529 |
} @else if $property==pr { |
| 1530 |
@if $value==auto { |
| 1531 |
.#{$name} { |
| 1532 |
@include media-up(#{$breakpoint}) { |
| 1533 |
padding-right: #{$value}; |
| 1534 |
} |
| 1535 |
} |
| 1536 |
} @else if $value==0 { |
| 1537 |
.#{$name} { |
| 1538 |
@include media-up(#{$breakpoint}) { |
| 1539 |
padding-right: #{$value}; |
| 1540 |
} |
| 1541 |
} |
| 1542 |
} @else { |
| 1543 |
.#{$name} { |
| 1544 |
@include media-up(#{$breakpoint}) { |
| 1545 |
padding-right: #{$value}#{$pre}; |
| 1546 |
} |
| 1547 |
} |
| 1548 |
} |
| 1549 |
} @else if $property==px { |
| 1550 |
@if $value==auto { |
| 1551 |
.#{$name} { |
| 1552 |
@include media-up(#{$breakpoint}) { |
| 1553 |
padding-left: #{$value}; |
| 1554 |
padding-right: #{$value}; |
| 1555 |
} |
| 1556 |
} |
| 1557 |
} @else if $value==0 { |
| 1558 |
.#{$name} { |
| 1559 |
@include media-up(#{$breakpoint}) { |
| 1560 |
padding-left: #{$value}; |
| 1561 |
padding-right: #{$value}; |
| 1562 |
} |
| 1563 |
} |
| 1564 |
} @else { |
| 1565 |
.#{$name} { |
| 1566 |
@include media-up(#{$breakpoint}) { |
| 1567 |
padding-left: #{$value}#{$pre}; |
| 1568 |
padding-right: #{$value}#{$pre}; |
| 1569 |
} |
| 1570 |
} |
| 1571 |
} |
| 1572 |
} @else if $property==py { |
| 1573 |
@if $value==auto { |
| 1574 |
.#{$name} { |
| 1575 |
@include media-up(#{$breakpoint}) { |
| 1576 |
padding-top: #{$value}; |
| 1577 |
padding-bottom: #{$value}; |
| 1578 |
} |
| 1579 |
} |
| 1580 |
} @else if $value==0 { |
| 1581 |
.#{$name} { |
| 1582 |
@include media-up(#{$breakpoint}) { |
| 1583 |
padding-top: #{$value}; |
| 1584 |
padding-bottom: #{$value}; |
| 1585 |
} |
| 1586 |
} |
| 1587 |
} @else { |
| 1588 |
.#{$name} { |
| 1589 |
@include media-up(#{$breakpoint}) { |
| 1590 |
padding-top: #{$value}#{$pre}; |
| 1591 |
padding-bottom: #{$value}#{$pre}; |
| 1592 |
} |
| 1593 |
} |
| 1594 |
} |
| 1595 |
} @else { |
| 1596 |
@if $value==auto { |
| 1597 |
.#{$name} { |
| 1598 |
@include media-up(#{$breakpoint}) { |
| 1599 |
padding: #{$value}; |
| 1600 |
} |
| 1601 |
} |
| 1602 |
} @else if $value==0 { |
| 1603 |
.#{$name} { |
| 1604 |
@include media-up(#{$breakpoint}) { |
| 1605 |
padding: #{$value}; |
| 1606 |
} |
| 1607 |
} |
| 1608 |
} @else { |
| 1609 |
.#{$name} { |
| 1610 |
@include media-up(#{$breakpoint}) { |
| 1611 |
padding: #{$value}#{$pre}; |
| 1612 |
} |
| 1613 |
} |
| 1614 |
} |
| 1615 |
} |
| 1616 |
} |
| 1617 |
|
| 1618 |
// Border |
| 1619 |
@mixin border($type: null, $size: 1px, $style: solid, $color: $global-color) { |
| 1620 |
@if $type==top { |
| 1621 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1622 |
} @else if $type==bottom { |
| 1623 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1624 |
} @else if $type==left { |
| 1625 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1626 |
} @else if $type==right { |
| 1627 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1628 |
} @else if $type==by { |
| 1629 |
border-top: #{$size} #{$style} #{$color}; |
| 1630 |
border-bottom: #{$size} #{$style} #{$color}; |
| 1631 |
} @else if $type==bx { |
| 1632 |
border-left: #{$size} #{$style} #{$color}; |
| 1633 |
border-right: #{$size} #{$style} #{$color}; |
| 1634 |
} @else { |
| 1635 |
border: #{$size} #{$style} #{$color}; |
| 1636 |
} |
| 1637 |
} |
| 1638 |
|
| 1639 |
// Border |
| 1640 |
@mixin border-class($type: null, $size: 1px, $style: solid, $color: $global-color) { |
| 1641 |
|
| 1642 |
// Add your Prefix classes name |
| 1643 |
@if $type==top { |
| 1644 |
.border-#{$type} { |
| 1645 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1646 |
} |
| 1647 |
} @else if $type==bottom { |
| 1648 |
.border-#{$type} { |
| 1649 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1650 |
} |
| 1651 |
} @else if $type==left { |
| 1652 |
.border-#{$type} { |
| 1653 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1654 |
} |
| 1655 |
} @else if $type==right { |
| 1656 |
.border-#{$type} { |
| 1657 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1658 |
} |
| 1659 |
} @else { |
| 1660 |
.border { |
| 1661 |
border: #{$size} #{$style} #{$color}; |
| 1662 |
} |
| 1663 |
} |
| 1664 |
} |
| 1665 |
|
| 1666 |
// Border |
| 1667 |
@mixin border-rs($breakpoint, $type: null, $size: 1px, $style: solid, $color: $global-color) { |
| 1668 |
|
| 1669 |
// Add your Prefix classes name |
| 1670 |
@if $type==top { |
| 1671 |
.border-#{$breakpoint}-#{$type} { |
| 1672 |
@include media-up(#{$breakpoint}) { |
| 1673 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1674 |
} |
| 1675 |
} |
| 1676 |
} @else if $type==bottom { |
| 1677 |
.border-#{$breakpoint}-#{$type} { |
| 1678 |
@include media-up(#{$breakpoint}) { |
| 1679 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1680 |
} |
| 1681 |
} |
| 1682 |
} @else if $type==left { |
| 1683 |
.border-#{$breakpoint}-#{$type} { |
| 1684 |
@include media-up(#{$breakpoint}) { |
| 1685 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1686 |
} |
| 1687 |
} |
| 1688 |
} @else if $type==right { |
| 1689 |
.border-#{$breakpoint}-#{$type} { |
| 1690 |
@include media-up(#{$breakpoint}) { |
| 1691 |
border#{-$type}: #{$size} #{$style} #{$color}; |
| 1692 |
} |
| 1693 |
} |
| 1694 |
} @else { |
| 1695 |
.border-#{$breakpoint} { |
| 1696 |
@include media-up(#{$breakpoint}) { |
| 1697 |
border: #{$size} #{$style} #{$color}; |
| 1698 |
} |
| 1699 |
} |
| 1700 |
} |
| 1701 |
} |
| 1702 |
|
| 1703 |
// Border Width |
| 1704 |
@mixin border-width($type: null, $size: 1px) { |
| 1705 |
@if $type==top { |
| 1706 |
border#{-$type}-width: #{$size}; |
| 1707 |
} @else if $type==right { |
| 1708 |
border#{-$type}-width: #{$size}; |
| 1709 |
} @else if $type==bottom { |
| 1710 |
border#{-$type}-width: #{$size}; |
| 1711 |
} @else if $type==left { |
| 1712 |
border#{-$type}-width: #{$size}; |
| 1713 |
} @else { |
| 1714 |
border: #{$size}; |
| 1715 |
} |
| 1716 |
} |
| 1717 |
|
| 1718 |
// Border Color |
| 1719 |
@mixin border-color($color: $global-color) { |
| 1720 |
border-color: #{$color}; |
| 1721 |
} |
| 1722 |
|
| 1723 |
// Border Style |
| 1724 |
@mixin border-style($style: solid) { |
| 1725 |
border-style: #{$style}; |
| 1726 |
} |
| 1727 |
|
| 1728 |
// Border Radius Mixin |
| 1729 |
@mixin radius($type: null, $size: 0) { |
| 1730 |
@if $type==top { |
| 1731 |
border#{-$type}-left-radius: #{$size}; |
| 1732 |
border#{-$type}-right-radius: #{$size}; |
| 1733 |
} @else if $type==right { |
| 1734 |
border-top-right-radius: #{$size}; |
| 1735 |
border-bottom-right-radius: #{$size}; |
| 1736 |
} @else if $type==bottom { |
| 1737 |
border#{-$type}-left-radius: #{$size}; |
| 1738 |
border#{-$type}-right-radius: #{$size}; |
| 1739 |
} @else if $type==left { |
| 1740 |
border-top-left-radius: #{$size}; |
| 1741 |
border-bottom-left-radius: #{$size}; |
| 1742 |
} @else { |
| 1743 |
border-radius: #{$size}; |
| 1744 |
} |
| 1745 |
} |
| 1746 |
|
| 1747 |
// Border Radius Class Mixin |
| 1748 |
@mixin radius-class($type: null, $size: 0, $num: null) { |
| 1749 |
@if $type==top { |
| 1750 |
@if $num { |
| 1751 |
.radius-#{$type}-#{$num} { |
| 1752 |
border#{-$type}-left-radius: #{$size}; |
| 1753 |
border#{-$type}-right-radius: #{$size}; |
| 1754 |
} |
| 1755 |
} @else { |
| 1756 |
.radius-#{$type} { |
| 1757 |
border#{-$type}-left-radius: #{$size}; |
| 1758 |
border#{-$type}-right-radius: #{$size}; |
| 1759 |
} |
| 1760 |
} |
| 1761 |
} @else if $type==right { |
| 1762 |
@if $num { |
| 1763 |
.radius-#{$type}-#{$num} { |
| 1764 |
border-top-right-radius: #{$size}; |
| 1765 |
border-bottom-right-radius: #{$size}; |
| 1766 |
} |
| 1767 |
} @else { |
| 1768 |
.radius-#{$type} { |
| 1769 |
border-top-right-radius: #{$size}; |
| 1770 |
border-bottom-right-radius: #{$size}; |
| 1771 |
} |
| 1772 |
} |
| 1773 |
} @else if $type==bottom { |
| 1774 |
@if $num { |
| 1775 |
.radius-#{$type}-#{$num} { |
| 1776 |
border#{-$type}-left-radius: #{$size}; |
| 1777 |
border#{-$type}-right-radius: #{$size}; |
| 1778 |
} |
| 1779 |
} @else { |
| 1780 |
.radius-#{$type} { |
| 1781 |
border#{-$type}-left-radius: #{$size}; |
| 1782 |
border#{-$type}-right-radius: #{$size}; |
| 1783 |
} |
| 1784 |
} |
| 1785 |
} @else if $type==left { |
| 1786 |
@if $num { |
| 1787 |
.radius-#{$type}-#{$num} { |
| 1788 |
border-top-left-radius: #{$size}; |
| 1789 |
border-bottom-left-radius: #{$size}; |
| 1790 |
} |
| 1791 |
} @else { |
| 1792 |
.radius-#{$type} { |
| 1793 |
border-top-left-radius: #{$size}; |
| 1794 |
border-bottom-left-radius: #{$size}; |
| 1795 |
} |
| 1796 |
} |
| 1797 |
} @else { |
| 1798 |
@if $num { |
| 1799 |
.radius-#{$num} { |
| 1800 |
border-radius: #{$size}; |
| 1801 |
} |
| 1802 |
} @else { |
| 1803 |
.radius { |
| 1804 |
border-radius: #{$size}; |
| 1805 |
} |
| 1806 |
} |
| 1807 |
} |
| 1808 |
} |
| 1809 |
|
| 1810 |
//Display mixin |
| 1811 |
@mixin display($value) { |
| 1812 |
.d-#{$value} { |
| 1813 |
display: $value; |
| 1814 |
} |
| 1815 |
} |
| 1816 |
|
| 1817 |
//Responsive Display Mixin |
| 1818 |
@mixin display-rs($breakpoint, $value) { |
| 1819 |
.d-#{$breakpoint}-#{$value} { |
| 1820 |
@include media-up(#{$breakpoint}) { |
| 1821 |
display: #{$value}; |
| 1822 |
} |
| 1823 |
} |
| 1824 |
} |
| 1825 |
|
| 1826 |
@mixin padding-divide($name, $value: 0, $device: x, $div: false) { |
| 1827 |
@if $device==y { |
| 1828 |
.#{$name} { |
| 1829 |
@if $div==true { |
| 1830 |
div + div { |
| 1831 |
@include padding(py, $value); |
| 1832 |
} |
| 1833 |
} @else { |
| 1834 |
li + li { |
| 1835 |
@include padding(py, $value); |
| 1836 |
} |
| 1837 |
} |
| 1838 |
} |
| 1839 |
} @else { |
| 1840 |
.#{$name} { |
| 1841 |
@if $div==true { |
| 1842 |
div + div { |
| 1843 |
@include padding(pl, $value); |
| 1844 |
} |
| 1845 |
} @else { |
| 1846 |
li + li { |
| 1847 |
@include padding(pl, $value); |
| 1848 |
} |
| 1849 |
} |
| 1850 |
} |
| 1851 |
} |
| 1852 |
} |
| 1853 |
|
| 1854 |
@mixin padding-divide-rs($name, $value: 0, $breakpoint: null, $divide: x, $div: false) { |
| 1855 |
@if $divide==y { |
| 1856 |
.#{$name} { |
| 1857 |
@include media-up($breakpoint) { |
| 1858 |
@if $div==true { |
| 1859 |
div + div { |
| 1860 |
@include padding(py, $value); |
| 1861 |
} |
| 1862 |
} @else { |
| 1863 |
li + li { |
| 1864 |
@include padding(py, $value); |
| 1865 |
} |
| 1866 |
} |
| 1867 |
} |
| 1868 |
} |
| 1869 |
} @else { |
| 1870 |
.#{$name} { |
| 1871 |
@include media-up($breakpoint) { |
| 1872 |
@if $div==true { |
| 1873 |
div + div { |
| 1874 |
@include padding(pl, $value); |
| 1875 |
} |
| 1876 |
} @else { |
| 1877 |
li + li { |
| 1878 |
@include padding(pl, $value); |
| 1879 |
} |
| 1880 |
} |
| 1881 |
} |
| 1882 |
} |
| 1883 |
} |
| 1884 |
} |
| 1885 |
|
| 1886 |
//Overlay Mixin |
| 1887 |
@mixin overlay($name, $width: 100%, $height: $width, $color: null, $direction: null, $gradient: null, $mode: null, $index: 999) { |
| 1888 |
.overlay { |
| 1889 |
overflow: hidden; |
| 1890 |
position: relative; |
| 1891 |
@include property; |
| 1892 |
} |
| 1893 |
|
| 1894 |
@if $gradient { |
| 1895 |
.overlay-#{$name} { |
| 1896 |
&::before { |
| 1897 |
content: ''; |
| 1898 |
@include absolute(); |
| 1899 |
@include size($width, $height: $width); |
| 1900 |
@include property; |
| 1901 |
@include gradient($direction, $gradient); |
| 1902 |
@include overlay-mode($mode: $mode); |
| 1903 |
z-index: $index; |
| 1904 |
} |
| 1905 |
} |
| 1906 |
} @else { |
| 1907 |
.overlay-#{$name} { |
| 1908 |
&::before { |
| 1909 |
content: ''; |
| 1910 |
@include absolute(); |
| 1911 |
@include size($width, $height: $width); |
| 1912 |
@include property; |
| 1913 |
background: $color; |
| 1914 |
@include overlay-mode($mode: $mode); |
| 1915 |
z-index: $index; |
| 1916 |
} |
| 1917 |
} |
| 1918 |
} |
| 1919 |
} |
| 1920 |
|
| 1921 |
//Overlay Opacity Mixin |
| 1922 |
@mixin overlay-opacity($name, $opacity: 1) { |
| 1923 |
.overlay-#{$name} { |
| 1924 |
&::before { |
| 1925 |
opacity: $opacity; |
| 1926 |
} |
| 1927 |
} |
| 1928 |
} |
| 1929 |
|
| 1930 |
//Overlay Mode Mixin |
| 1931 |
@mixin overlay-mode($name: null, $mode: null) { |
| 1932 |
@if $name { |
| 1933 |
.overlay-#{$name} { |
| 1934 |
&::before { |
| 1935 |
mix-blend-mode: $mode; |
| 1936 |
} |
| 1937 |
} |
| 1938 |
} @else { |
| 1939 |
mix-blend-mode: $mode; |
| 1940 |
} |
| 1941 |
|
| 1942 |
} |
| 1943 |
|
| 1944 |
// Size |
| 1945 |
@mixin size($width, $height: $width) { |
| 1946 |
width: $width; |
| 1947 |
height: $height; |
| 1948 |
} |
| 1949 |
|
| 1950 |
//Position mixin |
| 1951 |
@mixin position($position, $args) { |
| 1952 |
@each $o in top right bottom left inset { |
| 1953 |
$i: index($args, $o); |
| 1954 |
|
| 1955 |
@if $i and $i+1 <=length($args) and type-of(nth($args, $i + 1))==number { |
| 1956 |
#{$o}: nth($args, $i + 1); |
| 1957 |
} |
| 1958 |
} |
| 1959 |
|
| 1960 |
position: $position; |
| 1961 |
} |
| 1962 |
|
| 1963 |
// Positioning helpers |
| 1964 |
@mixin absolute($args: '') { |
| 1965 |
@include position(absolute, $args); |
| 1966 |
} |
| 1967 |
|
| 1968 |
@mixin fixed($args: '') { |
| 1969 |
@include position(fixed, $args); |
| 1970 |
} |
| 1971 |
|
| 1972 |
@mixin relative($args: '') { |
| 1973 |
@include position(relative, $args); |
| 1974 |
} |
| 1975 |
|
| 1976 |
// Position Top/Right/Bottom/Left Alignment |
| 1977 |
@mixin trbl($type, $value, $pre: null) { |
| 1978 |
|
| 1979 |
@if $type==top { |
| 1980 |
.#{$type}-#{$value} { |
| 1981 |
top: #{$value}#{$pre}; |
| 1982 |
} |
| 1983 |
} @else if $type==right { |
| 1984 |
.#{$type}-#{$value} { |
| 1985 |
right: #{$value}#{$pre}; |
| 1986 |
} |
| 1987 |
} @else if $type==bottom { |
| 1988 |
.#{$type}-#{$value} { |
| 1989 |
bottom: #{$value}#{$pre}; |
| 1990 |
} |
| 1991 |
} @else if $type==left { |
| 1992 |
.#{$type}-#{$value} { |
| 1993 |
left: #{$value}#{$pre}; |
| 1994 |
} |
| 1995 |
} |
| 1996 |
} |
| 1997 |
|
| 1998 |
// Position Top/Bottom/Left/Right Alignment |
| 1999 |
@mixin position-align($name, $position: absolute) { |
| 2000 |
|
| 2001 |
@if $name==center { |
| 2002 |
@if $position==relative { |
| 2003 |
.inset-#{$name} { |
| 2004 |
@include relative(top 50% left 50%); |
| 2005 |
transform: translate(-50%, -50%); |
| 2006 |
} |
| 2007 |
} @else { |
| 2008 |
.inset-#{$name} { |
| 2009 |
@include absolute(top 50% left 50%); |
| 2010 |
transform: translate(-50%, -50%); |
| 2011 |
} |
| 2012 |
} |
| 2013 |
} @else if $name==tl-center { |
| 2014 |
@if $position==relative { |
| 2015 |
.#{$name} { |
| 2016 |
@include relative(top 50% left 0); |
| 2017 |
transform: translateY(-50%); |
| 2018 |
} |
| 2019 |
} @else { |
| 2020 |
.#{$name} { |
| 2021 |
@include absolute(top 50% left 0); |
| 2022 |
transform: translateY(-50%); |
| 2023 |
} |
| 2024 |
} |
| 2025 |
} @else if $name==tr-center { |
| 2026 |
@if $position==relative { |
| 2027 |
.#{$name} { |
| 2028 |
@include relative(top 50% right 0); |
| 2029 |
transform: translateY(-50%); |
| 2030 |
} |
| 2031 |
} @else { |
| 2032 |
.#{$name} { |
| 2033 |
@include absolute(top 50% right 0); |
| 2034 |
transform: translateY(-50%); |
| 2035 |
} |
| 2036 |
} |
| 2037 |
} @else if $name==top-right { |
| 2038 |
@if $position==relative { |
| 2039 |
.#{$name} { |
| 2040 |
@include relative(top 0 right 0); |
| 2041 |
} |
| 2042 |
} @else { |
| 2043 |
.#{$name} { |
| 2044 |
@include absolute(top 0 right 0); |
| 2045 |
} |
| 2046 |
} |
| 2047 |
} @else if $name==bl-center { |
| 2048 |
@if $position==relative { |
| 2049 |
.#{$name} { |
| 2050 |
@include relative(bottom 0 left 50%); |
| 2051 |
transform: translateY(-50%); |
| 2052 |
} |
| 2053 |
} @else { |
| 2054 |
.#{$name} { |
| 2055 |
@include absolute(bottom 0 left 50%); |
| 2056 |
transform: translateX(-50%); |
| 2057 |
} |
| 2058 |
} |
| 2059 |
} @else if $name==bottom-left { |
| 2060 |
@if $position==relative { |
| 2061 |
.#{$name} { |
| 2062 |
@include relative(bottom 0 left 0); |
| 2063 |
} |
| 2064 |
} @else { |
| 2065 |
.#{$name} { |
| 2066 |
@include relative(bottom 0 left 0); |
| 2067 |
} |
| 2068 |
} |
| 2069 |
} @else if $name==bottom-right { |
| 2070 |
@if $position==relative { |
| 2071 |
.#{$name} { |
| 2072 |
@include relative(bottom 0 right 0); |
| 2073 |
} |
| 2074 |
} @else { |
| 2075 |
.#{$name} { |
| 2076 |
@include relative(bottom 0 right 0); |
| 2077 |
} |
| 2078 |
} |
| 2079 |
} |
| 2080 |
|
| 2081 |
} |
| 2082 |
|
| 2083 |
// Box Shadow Mixin |
| 2084 |
@mixin shadow($x: 0, $y: 0, $b: 0, $color: $black, $opacity: 1) { |
| 2085 |
-webkit-box-shadow: $x $y $b 0 rgba($color: $color, $alpha: $opacity); |
| 2086 |
-moz-box-shadow: $x $y $b 0 rgba($color: $color, $alpha: $opacity); |
| 2087 |
box-shadow: $x $y $b 0 rgba($color: $color, $alpha: $opacity); |
| 2088 |
} |
| 2089 |
|
| 2090 |
//Text mixin |
| 2091 |
@mixin text-align($value: left, $breakpoint: null, $name: null) { |
| 2092 |
@if $name { |
| 2093 |
@if $breakpoint { |
| 2094 |
.#{$name} { |
| 2095 |
@include media-up(#{$breakpoint}) { |
| 2096 |
text-align: $value; |
| 2097 |
} |
| 2098 |
} |
| 2099 |
} @else { |
| 2100 |
.#{$name} { |
| 2101 |
text-align: $value; |
| 2102 |
} |
| 2103 |
} |
| 2104 |
} @else { |
| 2105 |
@if $breakpoint { |
| 2106 |
.text-#{$breakpoint}-#{$value} { |
| 2107 |
@include media-up(#{$breakpoint}) { |
| 2108 |
text-align: $value; |
| 2109 |
} |
| 2110 |
} |
| 2111 |
} @else { |
| 2112 |
.text-#{$value} { |
| 2113 |
text-align: $value; |
| 2114 |
} |
| 2115 |
} |
| 2116 |
} |
| 2117 |
} |
| 2118 |
|
| 2119 |
// prefix declarations |
| 2120 |
@mixin prefixed($property, $value) { |
| 2121 |
@if $webkit==true { |
| 2122 |
-webkit-#{$property}: #{$value}; |
| 2123 |
} |
| 2124 |
|
| 2125 |
@if $moz==true { |
| 2126 |
-moz-#{$property}: #{$value}; |
| 2127 |
} |
| 2128 |
|
| 2129 |
@if $ms==true { |
| 2130 |
-ms-#{$property}: #{$value}; |
| 2131 |
} |
| 2132 |
|
| 2133 |
@if $o==true { |
| 2134 |
-o-#{$property}: #{$value}; |
| 2135 |
} |
| 2136 |
|
| 2137 |
#{$property}: #{$value}; |
| 2138 |
} |
| 2139 |
|
| 2140 |
// prefix keyframes |
| 2141 |
@mixin keyframes($name) { |
| 2142 |
@if $webkit==true { |
| 2143 |
@-webkit-keyframes #{$name} { |
| 2144 |
@content; |
| 2145 |
} |
| 2146 |
} |
| 2147 |
|
| 2148 |
@if $moz==true { |
| 2149 |
@-moz-keyframes #{$name} { |
| 2150 |
@content; |
| 2151 |
} |
| 2152 |
} |
| 2153 |
|
| 2154 |
@if $ms==true { |
| 2155 |
@-ms-keyframes #{$name} { |
| 2156 |
@content; |
| 2157 |
} |
| 2158 |
} |
| 2159 |
|
| 2160 |
@if $o==true { |
| 2161 |
@-o-keyframes #{$name} { |
| 2162 |
@content; |
| 2163 |
} |
| 2164 |
} |
| 2165 |
|
| 2166 |
@keyframes #{$name} { |
| 2167 |
@content; |
| 2168 |
} |
| 2169 |
} |
| 2170 |
|
| 2171 |
@mixin property($value: 0.3s) { |
| 2172 |
// Improve performance on mobile/tablet devices |
| 2173 |
// Perspective reduces blurriness of text in Chrome |
| 2174 |
@include prefixed(transition, #{$value} ease-out); |
| 2175 |
} |
| 2176 |
|
| 2177 |
@mixin transform($name: translate, $value: 0) { |
| 2178 |
// Improve performance on mobile/tablet devices |
| 2179 |
// Perspective reduces blurriness of text in Chrome |
| 2180 |
@include prefixed(transform, #{$name}(#{$value})); |
| 2181 |
} |
| 2182 |
|
| 2183 |
// -------------------------------------- |
| 2184 |
// - Component |
| 2185 |
// ---------------------------------------- |
| 2186 |
// CSS Triangle |
| 2187 |
@mixin triangle($direction: top, $width: 50px, $height: $width, $color: $global-color) { |
| 2188 |
$half: $width / 2; |
| 2189 |
|
| 2190 |
@if ($direction == top) { |
| 2191 |
width: 0; |
| 2192 |
height: 0; |
| 2193 |
border-style: solid; |
| 2194 |
border-width: 0 $half $height $half; |
| 2195 |
border-color: transparent transparent $color transparent; |
| 2196 |
display: block; |
| 2197 |
} |
| 2198 |
|
| 2199 |
@if ($direction == right) { |
| 2200 |
width: 0; |
| 2201 |
height: 0; |
| 2202 |
border-style: solid; |
| 2203 |
border-width: $half 0 $half $height; |
| 2204 |
border-color: transparent transparent transparent $color; |
| 2205 |
display: block; |
| 2206 |
} |
| 2207 |
|
| 2208 |
@if ($direction==bottom) { |
| 2209 |
width: 0; |
| 2210 |
height: 0; |
| 2211 |
border-style: solid; |
| 2212 |
border-width: $height $half 0 $half; |
| 2213 |
border-color: $color transparent transparent transparent; |
| 2214 |
display: block; |
| 2215 |
} |
| 2216 |
|
| 2217 |
@if ($direction==left) { |
| 2218 |
width: 0; |
| 2219 |
height: 0; |
| 2220 |
border-style: solid; |
| 2221 |
border-width: $half $height $half 0; |
| 2222 |
border-color: transparent $color transparent transparent; |
| 2223 |
display: block; |
| 2224 |
} |
| 2225 |
|
| 2226 |
@if ($direction==top-left) { |
| 2227 |
width: 0; |
| 2228 |
height: 0; |
| 2229 |
border-style: solid; |
| 2230 |
border-width: $width $width 0 0; |
| 2231 |
border-color: $color transparent transparent transparent; |
| 2232 |
display: block; |
| 2233 |
} |
| 2234 |
|
| 2235 |
@if ($direction==top-right) { |
| 2236 |
width: 0; |
| 2237 |
height: 0; |
| 2238 |
border-style: solid; |
| 2239 |
border-width: 0 $width $width 0; |
| 2240 |
border-color: transparent $color transparent transparent; |
| 2241 |
display: block; |
| 2242 |
} |
| 2243 |
|
| 2244 |
@if ($direction==bottom-left) { |
| 2245 |
width: 0; |
| 2246 |
height: 0; |
| 2247 |
border-style: solid; |
| 2248 |
border-width: $width 0 0 $width; |
| 2249 |
border-color: transparent transparent transparent $color; |
| 2250 |
display: block; |
| 2251 |
} |
| 2252 |
|
| 2253 |
@if ($direction==bottom-right) { |
| 2254 |
width: 0; |
| 2255 |
height: 0; |
| 2256 |
border-style: solid; |
| 2257 |
border-width: 0 0 $width $width; |
| 2258 |
border-color: transparent transparent $color transparent; |
| 2259 |
display: block; |
| 2260 |
} |
| 2261 |
} |
| 2262 |
|
| 2263 |
// Nav Menu Mixin |
| 2264 |
@mixin nav($li: inline-block, $position: relative, $ff: $font, $fs: 1rem, $fw: 400, $color: $global-color, $bg: transparent, $tt: capitalize, $td: none, $py: 0.625rem, $px: .5rem, $pt: null, $pr: null, $pb: null, $pl: null, $my: null, $mx: null, $mt: null, $mr: null, $mb: null, $ml: null, $display: block, $index: 99, $h-color: $color, $h-bg: $bg, $h-fw: null, $h-py: $py, $h-px: $px, $h-pt: $pt, $h-pr: $pr, $h-pb: $pb, $h-pl: $pl, $h-my: null, $h-mx: null, $h-mt: $mt, $h-mr: $mr, $h-mb: $mb, $h-ml: $ml, $h-td: none) { |
| 2265 |
|
| 2266 |
ul { |
| 2267 |
margin: 0; |
| 2268 |
} |
| 2269 |
|
| 2270 |
li { |
| 2271 |
display: $li; |
| 2272 |
|
| 2273 |
a { |
| 2274 |
position: $position; |
| 2275 |
font-family: $ff; |
| 2276 |
font-size: $fs; |
| 2277 |
font-weight: $fw; |
| 2278 |
color: $color; |
| 2279 |
background: $bg; |
| 2280 |
text-transform: $tt; |
| 2281 |
text-decoration: $td; |
| 2282 |
padding: $py $px; |
| 2283 |
|
| 2284 |
@if ($pt $pr $pb $pl) { |
| 2285 |
padding-top: $pt; |
| 2286 |
padding-right: $pr; |
| 2287 |
padding-bottom: $pb; |
| 2288 |
padding-left: $pl; |
| 2289 |
} |
| 2290 |
|
| 2291 |
margin: $my $mx; |
| 2292 |
|
| 2293 |
@if ($mt $mr $mb $ml) { |
| 2294 |
margin-top: $mt; |
| 2295 |
margin-right: $mr; |
| 2296 |
margin-bottom: $mb; |
| 2297 |
margin-left: $ml; |
| 2298 |
} |
| 2299 |
|
| 2300 |
display: $display; |
| 2301 |
z-index: $index; |
| 2302 |
|
| 2303 |
@if $h-color { |
| 2304 |
@include hover { |
| 2305 |
color: $h-color; |
| 2306 |
background: $h-bg; |
| 2307 |
font-weight: $h-fw; |
| 2308 |
padding: $h-py $h-px; |
| 2309 |
|
| 2310 |
@if ($h-pt $h-pr $h-pb $h-pl) { |
| 2311 |
padding-top: $h-pt; |
| 2312 |
padding-right: $h-pr; |
| 2313 |
padding-bottom: $h-pb; |
| 2314 |
padding-left: $h-pl; |
| 2315 |
} |
| 2316 |
|
| 2317 |
margin: $h-my $h-mx; |
| 2318 |
|
| 2319 |
@if ($h-mt $h-mr $h-mb $h-ml) { |
| 2320 |
margin-top: $h-mt; |
| 2321 |
margin-right: $h-mr; |
| 2322 |
margin-bottom: $h-mb; |
| 2323 |
margin-left: $h-ml; |
| 2324 |
} |
| 2325 |
|
| 2326 |
text-decoration: $h-td; |
| 2327 |
} |
| 2328 |
} |
| 2329 |
} |
| 2330 |
} |
| 2331 |
} |
| 2332 |
|
| 2333 |
// Nav Tabs Mixin |
| 2334 |
@mixin nav-tabs($name, $ff: $font, $fw: 400, $fs: 16px, $lh: null, $color: $global-color, $bg: null, $tt: capitalize, $p-name: null, $p-value:null, $m-name: null, $m-value:null, $h-color: null, $h-bg: null, $breakpoint: null, $b-fs: null, $b-p-name: null, $b-p-value:null, $b-m-name: null, $b-m-value:null) { |
| 2335 |
.#{$name} { |
| 2336 |
display: block; |
| 2337 |
font-family: $ff; |
| 2338 |
font-weight: $fw; |
| 2339 |
font-size: $fs; |
| 2340 |
line-height: $lh; |
| 2341 |
color: $color; |
| 2342 |
text-transform: $tt; |
| 2343 |
@include padding($p-name, $p-value); |
| 2344 |
@include margin($m-name, $m-value); |
| 2345 |
|
| 2346 |
@if $breakpoint { |
| 2347 |
@include media-up($breakpoint) { |
| 2348 |
font-size: $b-fs; |
| 2349 |
@include padding($b-p-name, $b-p-value); |
| 2350 |
@include margin($b-m-name, $b-m-value); |
| 2351 |
} |
| 2352 |
} |
| 2353 |
|
| 2354 |
&:hover { |
| 2355 |
color: $h-color; |
| 2356 |
background: $h-bg; |
| 2357 |
} |
| 2358 |
|
| 2359 |
// Disabled state lightens text |
| 2360 |
&.disabled { |
| 2361 |
color: $nav-link-disabled-color; |
| 2362 |
pointer-events: none; |
| 2363 |
cursor: default; |
| 2364 |
} |
| 2365 |
} |
| 2366 |
} |
| 2367 |
|
| 2368 |
// Button mixin |
| 2369 |
@mixin btn($fs: var(--btn-fs), $ff: var(--btn-ff), $fw: var(--fw-400), $lh: 1.5, $tt: capitalize, $td: none, $py: var(--btn-py), $px: var(--btn-px), $my: var(--btn-mx), $mx: var(--btn-mx), $bg: var(--btn-bg), $border-width: var(--border-width), $border-style: var(--border-style), $border-color: $bg, $radius: var(--btn-radius, var(--radius)), $display: inline-block, $position: relative) { |
| 2370 |
position: $position; |
| 2371 |
font-family: $ff; |
| 2372 |
font-size: $fs; |
| 2373 |
font-weight: $fw; |
| 2374 |
line-height: $lh; |
| 2375 |
background: var(--btn-bg); |
| 2376 |
color: var(--btn-clr); |
| 2377 |
border: var(--btn-bw, #{$border-width}) var(--btn-bs, #{$border-style}) var(--btn-bc, #{$border-color}); |
| 2378 |
text-transform: $tt; |
| 2379 |
text-decoration: $td; |
| 2380 |
border-radius: $radius; |
| 2381 |
padding: $py $px; |
| 2382 |
margin: $my $mx; |
| 2383 |
display: $display; |
| 2384 |
overflow: hidden; |
| 2385 |
text-align: center; |
| 2386 |
cursor: pointer; |
| 2387 |
@include property; |
| 2388 |
} |
| 2389 |
|
| 2390 |
// Button Color |
| 2391 |
@mixin btn-color($bg: var(--clr-black), $color: var(--clr-white), $border-color: $bg, $h-color: $bg, $h-bg: transparent, $h-border-color: $h-color, $f-width: 0.4rem, $f-color: #000000, $f-opacity: 0.25) { |
| 2392 |
--btn-bg: #{$bg}; |
| 2393 |
--btn-clr: #{$color}; |
| 2394 |
--btn-bc: #{$border-color}; |
| 2395 |
|
| 2396 |
@if $h-bg { |
| 2397 |
@include hover { |
| 2398 |
--btn-clr: #{$h-color}; |
| 2399 |
--btn-bg: #{$h-bg}; |
| 2400 |
--btn-bc: #{$h-border-color}; |
| 2401 |
} |
| 2402 |
} |
| 2403 |
|
| 2404 |
@include focus { |
| 2405 |
outline: 0; |
| 2406 |
box-shadow: 0 0 0 $f-width rgba($f-color, 0.5); |
| 2407 |
} |
| 2408 |
} |
| 2409 |
|
| 2410 |
//Button hover color |
| 2411 |
@mixin btn-hover($h-color: var(--clr-black), $h-bg: transparent, $h-border-color: $h-color, $f-width: 0.4rem, $f-color: #000000, $f-opacity: 0.25) { |
| 2412 |
@if $h-bg { |
| 2413 |
@include hover { |
| 2414 |
--btn-clr: #{$h-color}; |
| 2415 |
--btn-bg: #{$h-bg}; |
| 2416 |
--btn-bc: #{$h-border-color}; |
| 2417 |
} |
| 2418 |
} |
| 2419 |
|
| 2420 |
@include focus { |
| 2421 |
outline: 0; |
| 2422 |
box-shadow: 0 0 0 $f-width rgba($f-color, 0.5); |
| 2423 |
} |
| 2424 |
} |
| 2425 |
|
| 2426 |
@mixin btn-outline($color: var(--btn-clr), $h-color: var(--clr-white), $h-bg: $color, $border-color: $color, $h-border-color: $h-bg, $f-width: 0.4rem, $f-color: $color, $f-opacity: 0.5) { |
| 2427 |
--btn-clr: #{$color}; |
| 2428 |
--btn-bc: #{$border-color}; |
| 2429 |
|
| 2430 |
@include hover { |
| 2431 |
--btn-clr: #{$h-color}; |
| 2432 |
--btn-bg: #{$h-bg}; |
| 2433 |
--btn-bc: #{$h-border-color}; |
| 2434 |
} |
| 2435 |
|
| 2436 |
@include focus { |
| 2437 |
outline: 0; |
| 2438 |
box-shadow: 0 0 0 $f-width rgba($f-color, 0.5); |
| 2439 |
} |
| 2440 |
} |
| 2441 |
|
| 2442 |
|
| 2443 |
// Form Input mixin |
| 2444 |
@mixin form-input($ff: $font, $fs: inherit, $fw: null, $lh: null, $color: $global-color, $bg: transparent, $opacity: 1, $tt: capitalize, $py: 1rem, $px: 1.25rem, $my: 0, $mx: 0, $width: 100%, $max-width: null, $height: auto, $border-type: null, $border-size: 1px, $border-style: solid, $border-color: $global-color, $radius-type: null, $radius-size: 0, $shadow: null, $focus: false, $f-fw: null, $f-color: $color, $f-bg: null, $f-opacity: 1, $f-border-type: null, $f-border-size: $border-size, $f-border-style: $border-style, $f-border-color: $black, $f-radius-type: null, $f-radius-size: null, $f-shadow: null) { |
| 2445 |
|
| 2446 |
font-family: $ff; |
| 2447 |
font-size: $fs; |
| 2448 |
font-weight: $fw; |
| 2449 |
line-height: $lh; |
| 2450 |
color: rgba($color, $opacity); |
| 2451 |
background: $bg; |
| 2452 |
text-transform: $tt; |
| 2453 |
padding: $py $px; |
| 2454 |
margin: $my $mx; |
| 2455 |
@include size($width, $height); |
| 2456 |
max-width: $max-width; |
| 2457 |
@include border($border-type, $border-size, $border-style, $border-color); |
| 2458 |
@include radius($radius-type, $radius-size); |
| 2459 |
box-shadow: $shadow; |
| 2460 |
@include property; |
| 2461 |
|
| 2462 |
@if $focus==true { |
| 2463 |
&:focus { |
| 2464 |
outline: none; |
| 2465 |
font-weight: $f-fw; |
| 2466 |
color: rgba($f-color, $f-opacity); |
| 2467 |
background: $f-bg; |
| 2468 |
@include border($f-border-type, $f-border-size, $f-border-style, $f-border-color); |
| 2469 |
@include radius($f-radius-type, $f-radius-size); |
| 2470 |
box-shadow: $f-shadow; |
| 2471 |
} |
| 2472 |
} @else { |
| 2473 |
@include focus { |
| 2474 |
outline: none; |
| 2475 |
} |
| 2476 |
} |
| 2477 |
|
| 2478 |
} |
| 2479 |
|
| 2480 |
// Form Textarea mixin |
| 2481 |
@mixin textarea($fs: null, $fw: null, $lh: null, $color: $global-color, $bg: transparent, $opacity: 1, $tt: capitalize, $py: 15px, $px: 20px, $my: 0.9375rem, $mx: 0, $width: 100%, $max-width: null, $height: auto, $border-type: null, $border-size: 1px, $border-style: solid, $border-color: transparent, $radius-type: null, $radius-size: 0, $shadow: null, $focus: false, $f-fw: null, $f-color: $color, $f-opacity: 1, $f-border-type: null, $f-border-size: $border-size, $f-border-style: $border-style, $f-border-color: $border-color, $f-radius-type: null, $f-radius-size: null, $f-shadow: null) { |
| 2482 |
|
| 2483 |
font-size: $fs; |
| 2484 |
font-weight: $fw; |
| 2485 |
line-height: $lh; |
| 2486 |
padding: $py $px; |
| 2487 |
margin: $my $mx; |
| 2488 |
color: rgba($color, $opacity); |
| 2489 |
background: $bg; |
| 2490 |
text-transform: $tt; |
| 2491 |
@include size($width, $height); |
| 2492 |
max-width: $max-width; |
| 2493 |
@include border($border-type, $border-size, $border-style, $border-color); |
| 2494 |
@include radius($radius-type, $radius-size); |
| 2495 |
box-shadow: $shadow; |
| 2496 |
@include property; |
| 2497 |
|
| 2498 |
@if $focus==true { |
| 2499 |
&:focus { |
| 2500 |
font-weight: $f-fw; |
| 2501 |
color: rgba($f-color, $f-opacity); |
| 2502 |
@include border($f-border-type, $f-border-size, $f-border-style, $f-border-color); |
| 2503 |
@include radius($f-radius-type, $f-radius-size); |
| 2504 |
box-shadow: $f-shadow; |
| 2505 |
} |
| 2506 |
} |
| 2507 |
} |
| 2508 |
|
| 2509 |
// Dropdown Menu Mixin |
| 2510 |
@mixin dropdown-menu($position:top 100% left 0, $width: 100%, $max-width: null, $padding: 15px, $m-name: mx, $m-value: auto, $fs: 16px, $a-color: $global-color, $a-padding: 0.625rem, $a-margin: 5px, $align: left, $index: 99, $radius: null, $shadow: null, $hover-bg: $black, $hover-color: $white) { |
| 2511 |
@include absolute($position); |
| 2512 |
width: $width; |
| 2513 |
|
| 2514 |
@if $max-width { |
| 2515 |
max-width: $max-width; |
| 2516 |
@include margin($m-name, $m-value); |
| 2517 |
} |
| 2518 |
|
| 2519 |
padding: $padding; |
| 2520 |
text-align: $align; |
| 2521 |
z-index: $index; |
| 2522 |
border-radius: $radius; |
| 2523 |
box-shadow: $shadow; |
| 2524 |
opacity: 0; |
| 2525 |
visibility: hidden; |
| 2526 |
|
| 2527 |
li { |
| 2528 |
display: block; |
| 2529 |
|
| 2530 |
a { |
| 2531 |
color: $a-color; |
| 2532 |
font-size: $fs; |
| 2533 |
border-radius: $radius; |
| 2534 |
padding: $a-padding; |
| 2535 |
margin-bottom: $a-margin; |
| 2536 |
display: block; |
| 2537 |
|
| 2538 |
&:hover { |
| 2539 |
background: $hover-bg; |
| 2540 |
color: $hover-color; |
| 2541 |
} |
| 2542 |
} |
| 2543 |
} |
| 2544 |
} |
| 2545 |
|
| 2546 |
// Social Link |
| 2547 |
@mixin social($name, $display: inline-block, $m-type: ml, $m-size: .75rem, $before: false, $divide-li: false, $before-content: '', $position: null, $before-width: 1px, $before-height: 20px, $before-bg: $global-color, $fs: 20px, $bg: transparent, $color: $global-color, $width: null, $height: $width, $lh: $width, $b-type: null, $b-size: 1px, $b-style: solid, $b-color: transparent, $radius: null, $p-name: null, $p-value: null, $shadow-x: null, $shadow-y: null, $shadow-b: null, $shadow-color: $color, $shadow-opacity: 1, $h-bg: null, $h-color: $color, $hb-type: $b-type, $hb-size: $b-size, $hb-style: $b-style, $hb-color: $b-color, $hs-x: null, $hs-y: null, $hs-b: null, $hs-color: $color, $hs-opacity: 1) { |
| 2548 |
.#{$name} { |
| 2549 |
li { |
| 2550 |
+ li { |
| 2551 |
@include margin($m-type, $m-size); |
| 2552 |
} |
| 2553 |
|
| 2554 |
position: relative; |
| 2555 |
|
| 2556 |
@if $display==inline-flex { |
| 2557 |
display: inline-flex; |
| 2558 |
flex-wrap: wrap; |
| 2559 |
} @else { |
| 2560 |
display: $display; |
| 2561 |
} |
| 2562 |
|
| 2563 |
@if $before==true { |
| 2564 |
@if $divide-li==true { |
| 2565 |
& + li { |
| 2566 |
&::before { |
| 2567 |
content: $before-content; |
| 2568 |
@include absolute($position); |
| 2569 |
@include size($before-width, $before-height); |
| 2570 |
background: $before-bg; |
| 2571 |
} |
| 2572 |
} |
| 2573 |
} @else { |
| 2574 |
&::before { |
| 2575 |
content: $before-content; |
| 2576 |
@include absolute($position); |
| 2577 |
@include size($before-width, $before-height); |
| 2578 |
background: $before-bg; |
| 2579 |
} |
| 2580 |
} |
| 2581 |
} |
| 2582 |
|
| 2583 |
a { |
| 2584 |
font-size: $fs; |
| 2585 |
line-height: $lh; |
| 2586 |
background: $bg; |
| 2587 |
color: $color; |
| 2588 |
display: block; |
| 2589 |
text-align: center; |
| 2590 |
@include size($width, $height); |
| 2591 |
@include border($b-type, $b-size, $b-style, $b-color); |
| 2592 |
@include radius($size: $radius); |
| 2593 |
@include property; |
| 2594 |
|
| 2595 |
@if $p-name { |
| 2596 |
@include padding($p-name, $p-value); |
| 2597 |
} |
| 2598 |
|
| 2599 |
@if $shadow-color==true { |
| 2600 |
@include shadow($shadow-x, $shadow-y, $shadow-b, $shadow-color, $shadow-opacity); |
| 2601 |
} |
| 2602 |
|
| 2603 |
@if $h-bg { |
| 2604 |
@include hover { |
| 2605 |
background: $h-bg; |
| 2606 |
color: $h-color; |
| 2607 |
|
| 2608 |
@if $hb-color { |
| 2609 |
@include border($hb-type, $hb-size, $hb-style, $hb-color); |
| 2610 |
} |
| 2611 |
|
| 2612 |
@if $hs-color { |
| 2613 |
@include shadow($hs-x, $hs-y, $hs-b, $hs-color, $hs-opacity); |
| 2614 |
} |
| 2615 |
} |
| 2616 |
} @else { |
| 2617 |
@include hover { |
| 2618 |
color: $h-color; |
| 2619 |
} |
| 2620 |
} |
| 2621 |
} |
| 2622 |
} |
| 2623 |
} |
| 2624 |
} |
| 2625 |
|
| 2626 |
//Owl Carousel Nav |
| 2627 |
@mixin owl-nav($name: null, $fs: 20px, $bg: transparent, $color: $global-color, $position: null, $width: 50px, $height: $width, $lh: null, $radius: 0, $border: 2px solid $global-color, $transform: null, $p: 0, $owl-prev-left: null, $owl-prev-right: null, $owl-next-left: null, $owl-next-right: null, $h-bg: null, $h-color: null, $h-border: null) { |
| 2628 |
@if $name { |
| 2629 |
.#{$name} { |
| 2630 |
button { |
| 2631 |
@include absolute($position); |
| 2632 |
@include size($width, $height); |
| 2633 |
font: inherit; |
| 2634 |
font-size: $fs; |
| 2635 |
background: $bg; |
| 2636 |
color: $color; |
| 2637 |
line-height: $lh; |
| 2638 |
border-radius: $radius; |
| 2639 |
border: $border; |
| 2640 |
transform: $transform; |
| 2641 |
padding: $p; |
| 2642 |
cursor: pointer; |
| 2643 |
@include property; |
| 2644 |
|
| 2645 |
&.owl-prev { |
| 2646 |
left: $owl-prev-left; |
| 2647 |
right: $owl-prev-right; |
| 2648 |
} |
| 2649 |
|
| 2650 |
&.owl-next { |
| 2651 |
left: $owl-next-left; |
| 2652 |
right: $owl-next-right; |
| 2653 |
} |
| 2654 |
|
| 2655 |
&:focus { |
| 2656 |
outline: none; |
| 2657 |
} |
| 2658 |
|
| 2659 |
&:hover { |
| 2660 |
background: $h-bg; |
| 2661 |
color: $h-color; |
| 2662 |
border: $h-border; |
| 2663 |
} |
| 2664 |
} |
| 2665 |
} |
| 2666 |
} @else { |
| 2667 |
.owl-nav { |
| 2668 |
button { |
| 2669 |
@include absolute($position); |
| 2670 |
@include size($width, $height); |
| 2671 |
font: inherit; |
| 2672 |
font-size: $fs; |
| 2673 |
background: $bg; |
| 2674 |
color: $color; |
| 2675 |
line-height: $lh; |
| 2676 |
border-radius: $radius; |
| 2677 |
border: $border; |
| 2678 |
transform: $transform; |
| 2679 |
padding: $p; |
| 2680 |
cursor: pointer; |
| 2681 |
@include property; |
| 2682 |
|
| 2683 |
&.owl-prev { |
| 2684 |
left: $owl-prev-left; |
| 2685 |
right: $owl-prev-right; |
| 2686 |
} |
| 2687 |
|
| 2688 |
&.owl-next { |
| 2689 |
left: $owl-next-left; |
| 2690 |
right: $owl-next-right; |
| 2691 |
} |
| 2692 |
|
| 2693 |
&:focus { |
| 2694 |
outline: none; |
| 2695 |
} |
| 2696 |
|
| 2697 |
&:hover { |
| 2698 |
background: $h-bg; |
| 2699 |
color: $h-color; |
| 2700 |
border: $h-border; |
| 2701 |
} |
| 2702 |
} |
| 2703 |
} |
| 2704 |
} |
| 2705 |
} |
| 2706 |
|
| 2707 |
// OWl Carousel Dots |
| 2708 |
@mixin owl-dots($dots-position: left 50% bottom 0, $translateX: -50%, $translateY: -50%, $width: 8px, $height: $width, $display: inline-block, $text-center: center, $bg: $global-color, $border-size: 1px, $border-style: solid, $border-color: transparent, $radius-type: null, $radius-size: 50%, $p-name: null, $p-value: .25rem, $m-name: ml, $m-value: .5rem, $before: false, $b-content: '', $b-position: left -9px top -9px, $b-width: 25px, $b-height: $b-width, $b-radius-type: null, $b-radius-size: 50%, $b-border: 1px solid $global-color, $active: true, $a-width: $width, $a-height: $height, $a-bg: $bg, $a-border-size: 1px, $a-border-style: solid, $a-border-color: transparent, $active-before: false, $ab-content: '', $ab-position: left -9px top -9px, $ab-width: 25px, $ab-height: $ab-width, $ab-border: 2px solid $global-color, $ab-radius-type: null, $ab-radius-size: 50%) { |
| 2709 |
|
| 2710 |
@include absolute($dots-position); |
| 2711 |
text-align: $text-center; |
| 2712 |
|
| 2713 |
@if $translateY==true { |
| 2714 |
transform: translateY($translateY); |
| 2715 |
} @else { |
| 2716 |
transform: translateX($translateX); |
| 2717 |
} |
| 2718 |
|
| 2719 |
button { |
| 2720 |
position: relative; |
| 2721 |
@include size($width, $height); |
| 2722 |
display: $display; |
| 2723 |
background: $bg; |
| 2724 |
@include border(null, $border-size, $border-style, $border-color); |
| 2725 |
@include radius($radius-type, $radius-size); |
| 2726 |
@include padding($p-name, $p-value); |
| 2727 |
@include margin($m-name, $m-value); |
| 2728 |
|
| 2729 |
@if $before==true { |
| 2730 |
&::before { |
| 2731 |
content: $b-content; |
| 2732 |
@include absolute($b-position); |
| 2733 |
@include size($b-width, $b-height); |
| 2734 |
@include radius($b-radius-type, $b-radius-size); |
| 2735 |
border: $b-border; |
| 2736 |
} |
| 2737 |
} |
| 2738 |
|
| 2739 |
@if $active==true { |
| 2740 |
&.active { |
| 2741 |
@include size($a-width, $a-height); |
| 2742 |
background: $a-bg; |
| 2743 |
@include border(null, $a-border-size, $a-border-style, $a-border-color); |
| 2744 |
|
| 2745 |
@if $active-before==true { |
| 2746 |
&::before { |
| 2747 |
content: $ab-content; |
| 2748 |
@include absolute($ab-position); |
| 2749 |
@include size($ab-width, $ab-height); |
| 2750 |
@include radius($ab-radius-type, $ab-radius-size); |
| 2751 |
border: $ab-border; |
| 2752 |
} |
| 2753 |
} |
| 2754 |
} |
| 2755 |
} |
| 2756 |
|
| 2757 |
@include focus { |
| 2758 |
outline: none; |
| 2759 |
} |
| 2760 |
} |
| 2761 |
} |
| 2762 |
|
| 2763 |
// Footer Menu |
| 2764 |
@mixin footer-menu($size: 18px, $color: $black, $padding: 10px, $opacity: 1, $display: block, $tt: capitalize, $td: none, $h-color: $black, $h-td: none) { |
| 2765 |
li { |
| 2766 |
a { |
| 2767 |
font-size: $size; |
| 2768 |
color: $color; |
| 2769 |
opacity: $opacity; |
| 2770 |
padding-bottom: $padding; |
| 2771 |
display: $display; |
| 2772 |
text-transform: $tt; |
| 2773 |
text-decoration: $td; |
| 2774 |
|
| 2775 |
@include hover { |
| 2776 |
color: $h-color; |
| 2777 |
text-decoration: $h-td; |
| 2778 |
} |
| 2779 |
} |
| 2780 |
} |
| 2781 |
} |
| 2782 |
|
| 2783 |
// Footer Widget |
| 2784 |
@mixin footer-widget($value, $weight: 600, $prefix: top, $padding: 0) { |
| 2785 |
h3 { |
| 2786 |
font-size: $value; |
| 2787 |
padding-#{$prefix}: $padding; |
| 2788 |
font-weight: $weight; |
| 2789 |
} |
| 2790 |
|
| 2791 |
@include footer-menu; |
| 2792 |
} |
| 2793 |
|
| 2794 |
//Extra Small Screen Only |
| 2795 |
@mixin xs { |
| 2796 |
@media screen and (max-width: 767px) { |
| 2797 |
@content; |
| 2798 |
} |
| 2799 |
} |
| 2800 |
|
| 2801 |
//Small Screen |
| 2802 |
@mixin xsm { |
| 2803 |
@media screen and (min-width: 425px) { |
| 2804 |
@content; |
| 2805 |
} |
| 2806 |
} |
| 2807 |
|
| 2808 |
//Small Screen |
| 2809 |
@mixin sm { |
| 2810 |
@media screen and (min-width: 576px) { |
| 2811 |
@content; |
| 2812 |
} |
| 2813 |
} |
| 2814 |
|
| 2815 |
//Medium Screen |
| 2816 |
@mixin md { |
| 2817 |
@media screen and (min-width: 768px) { |
| 2818 |
@content; |
| 2819 |
} |
| 2820 |
} |
| 2821 |
|
| 2822 |
//Large Screen |
| 2823 |
@mixin lg { |
| 2824 |
@media screen and (min-width: 992px) { |
| 2825 |
@content; |
| 2826 |
} |
| 2827 |
} |
| 2828 |
|
| 2829 |
//Extra Large Screen |
| 2830 |
@mixin xl { |
| 2831 |
@media screen and (min-width: 1200px) { |
| 2832 |
@content; |
| 2833 |
} |
| 2834 |
} |
| 2835 |
|
| 2836 |
//Desktop Screen |
| 2837 |
@mixin xxl { |
| 2838 |
@media screen and (min-width: 1441px) { |
| 2839 |
@content; |
| 2840 |
} |
| 2841 |
} |