_features.scss 1.94 KB
Newer Older
L0r3nt's avatar
L0r3nt committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
///
/// Hyperspace by HTML5 UP
/// html5up.net | @n33co
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Features */

	.features {
		@include vendor('display', 'flex');
		@include vendor('flex-wrap', 'wrap');
		border-radius: _size(border-radius);
		border: solid 1px _palette(border);
		background: _palette(border-bg);
		margin: 0 0 _size(element-margin) 0;

		section {
			@include padding(3em, 3em, (0.5em, 0, 0, 4em));
			width: 50%;
			border-top: solid 1px _palette(border);
			position: relative;

			&:nth-child(-n + 2) {
				border-top-width: 0;
			}

			&:nth-child(2n) {
				border-left: solid 1px _palette(border);
			}

			.icon {
				@include vendor('transition', (
					'opacity #{_duration(activation) * 0.5} ease',
					'transform #{_duration(activation) * 0.5} ease'
				));
				@include vendor('transition-delay', '1s');
				@include vendor('transform', 'scale(1)');
				position: absolute;
				left: 3em;
				top: 3em;
				opacity: 1;
			}

			@for $i from 1 through _misc(max-features) {
				&:nth-child(#{$i}) {
					.icon {
						@include vendor('transition-delay', '#{(_duration(transition) * 0.75 * $i)}');
					}
				}
			}
		}

		&.inactive {
			section {
				.icon {
					@include vendor('transform', 'scale(0.5)');
					opacity: 0;
				}
			}
		}

		@include breakpoint(medium) {
			display: block;

			section {
				border-top-width: 1px !important;
				border-left-width: 0 !important;
				width: 100%;

				&:first-child {
					border-top-width: 0 !important;
				}
			}
		}

		@include breakpoint(small) {
			section {
				@include padding(2em, 1.5em, (0.5em, 0, 0, 4em));

				.icon {
					left: 1.5em;
					top: 2em;
				}
			}
		}

		@include breakpoint(xsmall) {
			section {
				@include padding(2em, 1.5em, (0, 0, 0, 0));

				.icon {
					left: 0;
					position: relative;
					top: 0;
				}
			}
		}
	}