MAD9013-Sass Equal Spaced Layout Mixin

Size
2,538 Kb
Views
24,288

How do I make an mad9013-sass equal spaced layout mixin?

What is a mad9013-sass equal spaced layout mixin? How do you make a mad9013-sass equal spaced layout mixin? This script and codes were developed by Mobile Application Design-Development on 10 August 2022, Wednesday.

MAD9013-Sass Equal Spaced Layout Mixin Previews

MAD9013-Sass Equal Spaced Layout Mixin - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>MAD9013-Sass Equal Spaced Layout Mixin</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container"> <div class="row"> <div class="col-2"></div> <div class="col-2"></div> </div>
</div>
<hr>
<div class="container"> <!-- The class names can be anything when you are building the grid yourself. "col-container" could be "row" or "group". As long as you understand what the name means. --> <div class="row"> <div class="col-3"></div> <div class="col-3"></div> <div class="col-3"></div> </div>
</div>
<hr/>
<div class="row"> <div class="col-4"></div> <div class="col-4"></div> <div class="col-2"></div> </div>
<hr>
<h2>@include equalSpaced( $num_of_cols, $spacing, $width )</h2>
<hr>
<pre>
// -- Equal Spaced Columns -- //
// Number of Columns - First Column
// Remaining Number of Columns * Margin Spacing
// Container Width - Total Margin Spacing
// Remaining Width / Total Number of Columns
@mixin equalSpaced( $num_of_cols, $spacing, $width ){ width: ( $width - ( $spacing * ($num_of_cols - 1) ) ) / $num_of_cols; margin-left: $spacing; // Remove Spacing from First Child &:first-child{ margin-left: 0; }
}
</pre>
</body>
</html>

MAD9013-Sass Equal Spaced Layout Mixin - Script Codes CSS Codes

.clearfix:after, .row:after { content: ""; display: table; clear: both;
}
.container { max-width: 800px; background-color: #dee; margin: 5% auto; padding: 2rem 0;
}
.row { background-color: #abc;
}
.col-2 { background: #333; min-height: 100px; width: 49%; margin-left: 2%; float: left;
}
.col-2:first-child { margin-left: 0;
}
.col-3 { background: #333; min-height: 100px; width: 32%; margin-left: 2%; float: left;
}
.col-3:first-child { margin-left: 0;
}
.col-4 { background: red; min-height: 100px; width: 23.5%; margin-left: 2%; float: left;
}
.col-4:first-child { margin-left: 0;
}
MAD9013-Sass Equal Spaced Layout Mixin - Script Codes
MAD9013-Sass Equal Spaced Layout Mixin - Script Codes
Home Page Home
Developer Mobile Application Design-Development
Username mad-d
Uploaded August 10, 2022
Rating 3
Size 2,538 Kb
Views 24,288
Do you need developer help for MAD9013-Sass Equal Spaced Layout Mixin?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Mobile Application Design-Development (mad-d) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!