Last active
October 1, 2021 02:28
-
-
Save Daniel-Walsh/0e49919ae91123f7c248503ecb53e2b0 to your computer and use it in GitHub Desktop.
Callout SCSS rules for Bootstrap 4 #bootstrap4 #scss #css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Import Bootstrap | |
*/ | |
@import "../../node_modules/bootstrap/scss/bootstrap"; | |
/** | |
* Callouts | |
*/ | |
// Settings | |
$callout-heading-colours: false; | |
// Rules | |
.callout { | |
padding: 1.25rem; | |
margin-top: 1.25rem; | |
margin-bottom: 1.25rem; | |
border: 1px solid #eee; | |
border-left-width: .25rem; | |
border-radius: .25rem; | |
p:last-child { | |
margin-bottom: 0; | |
} | |
code { | |
border-radius: .25rem; | |
} | |
@each $color, $value in $theme-colors { | |
&-#{$color} { | |
border-left-color: $value; | |
@if ($callout-heading-colours) { | |
h2, | |
h3, | |
h4, | |
h5 { | |
color: $value; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment