2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Add Extend > Snippets docs page

This commit is contained in:
Mark Otto
2021-04-14 00:34:56 -07:00
parent 1692fc6b4b
commit dbecbf079d
4 changed files with 42 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
@each $color, $value in $theme-colors {
$btn-light-bg: shift-color($value, -80%);
$btn-light-border: shift-color($value, -80%);
.btn-light-#{$color} {
@include button-variant($btn-light-bg, $btn-light-border, shift-color($value, 50%));
}
}
+1
View File
@@ -53,6 +53,7 @@ $enable-cssgrid: true; // stylelint-disable-line scss/dollar-variable-default
@import "colors";
@import "clipboard-js";
@import "placeholder-img";
@import "snippets";
// Load docs dependencies
@import "syntax";
+33
View File
@@ -0,0 +1,33 @@
---
layout: docs
title: Snippets
description: Extend Bootstrap with some common snippets of source code not included in the main project.
group: extend
---
## Components
### Light buttons
{{< example >}}
{{< buttons.inline >}}
{{- range (index $.Site.Data "theme-colors") }}
<button type="button" class="btn btn-light-{{ .name }}">{{ .name | title }}</button>
{{- end -}}
{{< /buttons.inline >}}
{{< /example >}}
```scss
@each $color, $value in $theme-colors {
$btn-light-bg: shift-color($value, -80%);
$btn-light-border: shift-color($value, -80%);
.btn-light-#{$color} {
@include button-variant($btn-light-bg, $btn-light-border, shift-color($value, 50%));
}
}
```
## Utilities
- Opacity
- Expanded widths/heights
+1
View File
@@ -118,6 +118,7 @@
- title: Extend
pages:
- title: Approach
- title: Snippets
- title: Icons
- title: About