diff options
| author | Chris Rebert <[email protected]> | 2016-04-06 15:19:10 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2016-04-06 15:19:10 -0700 |
| commit | 44c09cc07df131a6f5e2a8de18e94ad44a01ed34 (patch) | |
| tree | 4302d08a184965b2c0b071d21a5288492999558d | |
| parent | 18c25056a681e3b6e76557811eb1d87cd600c154 (diff) | |
| parent | 3165835a1bcfcc3b2046d883bf90e21ab3784c76 (diff) | |
| download | bootstrap-44c09cc07df131a6f5e2a8de18e94ad44a01ed34.tar.xz bootstrap-44c09cc07df131a6f5e2a8de18e94ad44a01ed34.zip | |
Merge pull request #19234 from twbs/v4-w100
Add `.w-100` as width: 100% utility class
| -rw-r--r-- | docs/components/utilities.md | 8 | ||||
| -rw-r--r-- | scss/utilities/_spacing.scss | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/components/utilities.md b/docs/components/utilities.md index 76bf5f9be..829ee4907 100644 --- a/docs/components/utilities.md +++ b/docs/components/utilities.md @@ -165,6 +165,14 @@ Sometimes contextual classes cannot be applied due to the specificity of another {% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} {{ callout-include | markdownify }} +## Widths + +Easily make an element as wide as its parent using the `.w-100` utility class, which sets `width: 100%`. + +{% example html %} +<img class="w-100" data-src="holder.js/200px100?outline=yes&text=Width%20%3D%20100%25" alt="Width = 100%"> +{% endexample %} + ## Close icon Use a generic close icon for dismissing content like modals and alerts. **Be sure to include text for screen readers**, as we've done with `aria-label`. diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss index cd543c8c9..b7ff044b6 100644 --- a/scss/utilities/_spacing.scss +++ b/scss/utilities/_spacing.scss @@ -1,3 +1,7 @@ +// Width + +.w-100 { width: 100% !important; } + // Margin and Padding .m-x-auto { |
