Skip to content

Instantly share code, notes, and snippets.

@Daniel-Walsh
Last active October 1, 2021 02:28
Show Gist options
  • Save Daniel-Walsh/0e49919ae91123f7c248503ecb53e2b0 to your computer and use it in GitHub Desktop.
Save Daniel-Walsh/0e49919ae91123f7c248503ecb53e2b0 to your computer and use it in GitHub Desktop.
Callout SCSS rules for Bootstrap 4 #bootstrap4 #scss #css
/**
* 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