2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Create scss-docs shortcode to get some snippets from the Scs… (#30502)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Martijn Cuppens
2020-04-06 20:13:35 +02:00
committed by GitHub
parent 98ba40dc06
commit 83b49aa688
12 changed files with 71 additions and 86 deletions
+8 -10
View File
@@ -8,21 +8,19 @@ aliases: "/docs/4.3/helpers/"
Easily clear `float`s by adding `.clearfix` **to the parent element**. Can also be used as a mixin.
Use in HTML:
{{< highlight html >}}
<div class="clearfix">...</div>
{{< /highlight >}}
{{< highlight scss >}}
// Mixin itself
@mixin clearfix() {
&::after {
display: block;
content: "";
clear: both;
}
}
The mixin source code:
// Usage as a mixin
{{< scss-docs name="clearfix" file="scss/mixins/_clearfix.scss" >}}
Use the mixin in SCSS:
{{< highlight scss >}}
.element {
@include clearfix;
}