From 076a950442371a8c0a974fa6478efb20a69527b7 Mon Sep 17 00:00:00 2001 From: Kovah Date: Fri, 9 Sep 2016 06:48:17 +0200 Subject: Docs: Breaks out Utilities into separate section and optimizes its pages (#20678) --- docs/utilities/clearfix.md | 39 ++++++++++++++++++ docs/utilities/close-icon.md | 13 ++++++ docs/utilities/colors.md | 47 +++++++++++++++++++++ docs/utilities/display-property.md | 29 +++++++++++++ docs/utilities/image-replacement.md | 18 ++++++++ docs/utilities/invisible-content.md | 23 +++++++++++ docs/utilities/responsive-helpers.md | 70 ++++++++++++++++++++++++++++++++ docs/utilities/screenreaders.md | 23 +++++++++++ docs/utilities/sizing-and-positioning.md | 28 +++++++++++++ docs/utilities/spacing.md | 69 +++++++++++++++++++++++++++++++ docs/utilities/typography.md | 58 ++++++++++++++++++++++++++ 11 files changed, 417 insertions(+) create mode 100644 docs/utilities/clearfix.md create mode 100644 docs/utilities/close-icon.md create mode 100644 docs/utilities/colors.md create mode 100644 docs/utilities/display-property.md create mode 100644 docs/utilities/image-replacement.md create mode 100644 docs/utilities/invisible-content.md create mode 100644 docs/utilities/responsive-helpers.md create mode 100644 docs/utilities/screenreaders.md create mode 100644 docs/utilities/sizing-and-positioning.md create mode 100644 docs/utilities/spacing.md create mode 100644 docs/utilities/typography.md (limited to 'docs/utilities') diff --git a/docs/utilities/clearfix.md b/docs/utilities/clearfix.md new file mode 100644 index 000000000..8ebf214d2 --- /dev/null +++ b/docs/utilities/clearfix.md @@ -0,0 +1,39 @@ +--- +layout: docs +title: Clearfix +group: utilities +--- + +Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes [the micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/) as popularized by Nicolas Gallagher. Can also be used as a mixin. + +{% highlight html %} +
...
+{% endhighlight %} + +{% highlight scss %} +// Mixin itself +.clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} + +// Usage as a mixin +.element { + @include clearfix; +} +{% endhighlight %} + +The following example shows how the clearfix can be used. Without the clearfix the wrapping div would not span around the buttons which would cause a broken layout. + +{% example html %} +
+ + +
+{% endexample %} diff --git a/docs/utilities/close-icon.md b/docs/utilities/close-icon.md new file mode 100644 index 000000000..5ec456bcc --- /dev/null +++ b/docs/utilities/close-icon.md @@ -0,0 +1,13 @@ +--- +layout: docs +title: Close icon +group: utilities +--- + +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`. + +{% example html %} + +{% endexample %} diff --git a/docs/utilities/colors.md b/docs/utilities/colors.md new file mode 100644 index 000000000..62315e614 --- /dev/null +++ b/docs/utilities/colors.md @@ -0,0 +1,47 @@ +--- +layout: docs +title: Colors +group: utilities +--- + +Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles. + +{% example html %} +

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

+

Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

+

Maecenas sed diam eget risus varius blandit sit amet non magna.

+

Etiam porta sem malesuada magna mollis euismod.

+

Donec ullamcorper nulla non metus auctor fringilla.

+{% endexample %} + +Contextual text classes also work well on anchors with the provided hover and focus states. + +{% example html %} +Muted link +Primary link +Success link +Info link +Warning link +Danger link +{% endexample %} + +Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. + +{% example html %} +
Nullam id dolor id nibh ultricies vehicula ut id elit.
+
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
+
Maecenas sed diam eget risus varius blandit sit amet non magna.
+
Etiam porta sem malesuada magna mollis euismod.
+
Donec ullamcorper nulla non metus auctor fringilla.
+
Cras mattis consectetur purus sit amet fermentum.
+{% endexample %} + +{% callout info %} +#### Dealing with specificity + +Sometimes contextual classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a `
` with the class. +{% endcallout %} + +{% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} +{{ callout-include | markdownify }} diff --git a/docs/utilities/display-property.md b/docs/utilities/display-property.md new file mode 100644 index 000000000..8b3f6f616 --- /dev/null +++ b/docs/utilities/display-property.md @@ -0,0 +1,29 @@ +--- +layout: docs +title: Display property +group: utilities +--- + +Use `.d-block`, `.d-inline`, or `.d-inline-block` to simply set an element's [`display` property](https://developer.mozilla.org/en-US/docs/Web/CSS/display) to `block`, `inline`, or `inline-block` (respectively). + +To make an element `display: none`, use our [responsive utilities](../../layout/responsive-utilities/) instead. + +{% example html %} +
Inline
+
Inline
+{% endexample %} + +{% example html %} +Block +{% endexample %} + +{% example html %} +
+

inline-block

+ Boot that strap! +
+
+

inline-block

+ Strap that boot! +
+{% endexample %} diff --git a/docs/utilities/image-replacement.md b/docs/utilities/image-replacement.md new file mode 100644 index 000000000..720e7b5a9 --- /dev/null +++ b/docs/utilities/image-replacement.md @@ -0,0 +1,18 @@ +--- +layout: docs +title: Image replacement +group: utilities +--- + +Utilize the `.text-hide` class or mixin to help replace an element's text content with a background image. + +{% highlight html %} +

Custom heading

+{% endhighlight %} + +{% highlight scss %} +// Usage as a mixin +.heading { + @include text-hide; +} +{% endhighlight %} diff --git a/docs/utilities/invisible-content.md b/docs/utilities/invisible-content.md new file mode 100644 index 000000000..84da6ad01 --- /dev/null +++ b/docs/utilities/invisible-content.md @@ -0,0 +1,23 @@ +--- +layout: docs +title: Invisible content +group: utilities +--- + +The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document. + +{% highlight html %} + +{% endhighlight %} + +{% highlight scss %} +// Class +.invisible { + visibility: hidden; +} + +// Usage as a mixin +.element { + @include invisible; +} +{% endhighlight %} diff --git a/docs/utilities/responsive-helpers.md b/docs/utilities/responsive-helpers.md new file mode 100644 index 000000000..b9c76d59d --- /dev/null +++ b/docs/utilities/responsive-helpers.md @@ -0,0 +1,70 @@ +--- +layout: docs +title: Responsive helpers +group: utilities +--- + +## Responsive embeds + +Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device. + +Rules are directly applied to ` +
+{% endexample %} + +Aspect ratios can be customized with modifier classes. + +{% highlight html %} + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+{% endhighlight %} + +## Responsive floats + +These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!important` is included to avoid specificity issues. These use the same viewport width breakpoints as the grid system. + +Two similar non-responsive Sass mixins (`pull-left` and `pull-right`) are also available. + +{% example html %} +
Float left on all viewport sizes

+
Float right on all viewport sizes

+
Don't float on all viewport sizes

+ +
Float left on viewports sized SM (small) or wider

+
Float left on viewports sized MD (medium) or wider

+
Float left on viewports sized LG (large) or wider

+
Float left on viewports sized XL (extra-large) or wider

+{% endexample %} + +{% highlight scss %} +// Related simple non-responsive mixins +.element { + @include pull-left; +} +.another-element { + @include pull-right; +} +{% endhighlight %} diff --git a/docs/utilities/screenreaders.md b/docs/utilities/screenreaders.md new file mode 100644 index 000000000..576b0a18b --- /dev/null +++ b/docs/utilities/screenreaders.md @@ -0,0 +1,23 @@ +--- +layout: docs +title: Screenreaders +group: utilities +--- + +Hide an element to all devices **except screen readers** with `.sr-only`. Combine `.sr-only` with `.sr-only-focusable` to show the element again when it's focused (e.g. by a keyboard-only user). Can also be used as mixins. + +{% comment %} +Necessary for following [accessibility best practices](../getting-started/#accessibility). +{% endcomment %} + +{% highlight html %} +Skip to main content +{% endhighlight %} + +{% highlight scss %} +// Usage as a mixin +.skip-navigation { + @include sr-only; + @include sr-only-focusable; +} +{% endhighlight %} diff --git a/docs/utilities/sizing-and-positioning.md b/docs/utilities/sizing-and-positioning.md new file mode 100644 index 000000000..81b65d43d --- /dev/null +++ b/docs/utilities/sizing-and-positioning.md @@ -0,0 +1,28 @@ +--- +layout: docs +title: Sizing and positioning +group: utilities +--- + +## Fixed positioning + +The `.pos-f-t` class can be used to easily position elements at the top of the viewport and make them as wide as the viewport. **Be sure you understand the ramifications of fixed-position elements within your project.** Here's how the class is defined: + +{% highlight scss %} +.pos-f-t { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: $zindex-navbar-fixed; +} +{% endhighlight %} + + +## Full width + +Easily make an element as wide as its parent using the `.w-100` utility class, which sets `width: 100%`. + +{% example html %} +Width = 100% +{% endexample %} diff --git a/docs/utilities/spacing.md b/docs/utilities/spacing.md new file mode 100644 index 000000000..045c4b213 --- /dev/null +++ b/docs/utilities/spacing.md @@ -0,0 +1,69 @@ +--- +layout: docs +title: Spacing +group: utilities +--- + +Assign `margin` or `padding` to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. All classes are multiples on the global default value, `1rem`. + +The classes are named using the format: `{property}-{sides}-{size}` + +Where *property* is one of: + +* `m` - for classes that set `margin` +* `p` - for classes that set `padding` + +Where *sides* is one of: + +* `t` - for classes that set `margin-top` or `padding-top` +* `b` - for classes that set `margin-bottom` or `padding-bottom` +* `l` - for classes that set `margin-left` or `padding-left` +* `r` - for classes that set `margin-right` or `padding-right` +* `x` - for classes that set both `*-left` and `*-right` +* `y` - for classes that set both `*-top` and `*-bottom` +* `a` - for classes that set a `margin` or `padding` on all 4 sides of the element + +Where *size* is one of: + +* `0` - for classes that eliminate the `margin` or `padding` by setting it to `0` +* `1` - (by default) for classes that set the `margin` or `padding` to `$spacer-x` or `$spacer-y` +* `2` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 1.5` or `$spacer-y * 1.5` +* `3` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 3` or `$spacer-y * 3` + +(You can add more sizes by adding entries to the `$spacers` Sass map variable.) + +Here are some representative examples of these classes: + +{% highlight scss %} +.m-t-0 { + margin-top: 0 !important; +} + +.m-l-1 { + margin-left: $spacer-x !important; +} + +.p-x-2 { + padding-left: ($spacer-x * 1.5) !important; + padding-right: ($spacer-x * 1.5) !important; +} + +.p-a-3 { + padding: ($spacer-y * 3) ($spacer-x * 3) !important; +} +{% endhighlight %} + +### Horizontal centering +Additionally, Bootstrap also includes an `.m-x-auto` class for horizontally centering fixed-width block level content by setting the horizontal margins to `auto`. + +
+
+ Centered element +
+
+ +{% highlight html %} +
+ Centered element +
+{% endhighlight %} diff --git a/docs/utilities/typography.md b/docs/utilities/typography.md new file mode 100644 index 000000000..c5628dad1 --- /dev/null +++ b/docs/utilities/typography.md @@ -0,0 +1,58 @@ +--- +layout: docs +title: Typography +group: utilities +--- + +The following utilities can be used to add additional styles to texts. + +## Text alignment + +Easily realign text to components with text alignment classes. + +{% example html %} +

Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. At nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.

+{% endexample %} + +{% example html %} +
+
+ Curabitur blandit tempus ardua ridiculus sed magna. +
+
+{% endexample %} + +For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system. + +{% example html %} +

Left aligned text on all viewport sizes.

+

Center aligned text on all viewport sizes.

+

Right aligned text on all viewport sizes.

+ +

Left aligned text on viewports sized SM (small) or wider.

+

Left aligned text on viewports sized MD (medium) or wider.

+

Left aligned text on viewports sized LG (large) or wider.

+

Left aligned text on viewports sized XL (extra-large) or wider.

+{% endexample %} + +## Text transform + +Transform text in components with text capitalization classes. + +{% example html %} +

Lowercased text.

+

Uppercased text.

+

CapiTaliZed text.

+{% endexample %} + +Note how `text-capitalize` only changes the first letter of each word, leaving the case of any other letters unaffected. + +## Font weight and italics + +Quickly change the weight (boldness) of text or italicize text. + +{% example html %} +

Bold text.

+

Normal weight text.

+

Italic text.

+{% endexample %} -- cgit v1.2.3 From 0be876359ed4ed7c8a3d315a6ef9a04eede8d765 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 8 Sep 2016 22:16:28 -0700 Subject: Update docs to use new spacing util class names --- docs/utilities/spacing.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/utilities') diff --git a/docs/utilities/spacing.md b/docs/utilities/spacing.md index 045c4b213..1ee1ab7fb 100644 --- a/docs/utilities/spacing.md +++ b/docs/utilities/spacing.md @@ -6,7 +6,7 @@ group: utilities Assign `margin` or `padding` to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. All classes are multiples on the global default value, `1rem`. -The classes are named using the format: `{property}-{sides}-{size}` +The classes are named using the format: `{property}{sides}-{size}` Where *property* is one of: @@ -35,35 +35,35 @@ Where *size* is one of: Here are some representative examples of these classes: {% highlight scss %} -.m-t-0 { +.mt-0 { margin-top: 0 !important; } -.m-l-1 { +.ml-1 { margin-left: $spacer-x !important; } -.p-x-2 { +.px-2 { padding-left: ($spacer-x * 1.5) !important; padding-right: ($spacer-x * 1.5) !important; } -.p-a-3 { +.p-3 { padding: ($spacer-y * 3) ($spacer-x * 3) !important; } {% endhighlight %} ### Horizontal centering -Additionally, Bootstrap also includes an `.m-x-auto` class for horizontally centering fixed-width block level content by setting the horizontal margins to `auto`. +Additionally, Bootstrap also includes an `.mx-auto` class for horizontally centering fixed-width block level content by setting the horizontal margins to `auto`.
-
+
Centered element
{% highlight html %} -
+
Centered element
{% endhighlight %} -- cgit v1.2.3 From a96038b50aaa201271383c95bb117c14f3bc5efb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 8 Sep 2016 22:18:40 -0700 Subject: Revamp background utilities and add new .text-white utility - Rather than mix multiple properties in our color utilities, this splits all color and all background utils into separate classes. - Adds new .text-white class to help lighten text color for darker backgrounds --- docs/utilities/colors.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'docs/utilities') diff --git a/docs/utilities/colors.md b/docs/utilities/colors.md index 62315e614..216941f95 100644 --- a/docs/utilities/colors.md +++ b/docs/utilities/colors.md @@ -13,9 +13,10 @@ Convey meaning through color with a handful of emphasis utility classes. These m

Maecenas sed diam eget risus varius blandit sit amet non magna.

Etiam porta sem malesuada magna mollis euismod.

Donec ullamcorper nulla non metus auctor fringilla.

+

Etiam porta sem malesuada ultricies vehicula.

{% endexample %} -Contextual text classes also work well on anchors with the provided hover and focus states. +Contextual text classes also work well on anchors with the provided hover and focus states. **Note that the `.text-white` class has no link styling.** {% example html %} Muted link @@ -26,15 +27,15 @@ Contextual text classes also work well on anchors with the provided hover and fo Danger link {% endexample %} -Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. +Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities. {% example html %} -
Nullam id dolor id nibh ultricies vehicula ut id elit.
-
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
-
Maecenas sed diam eget risus varius blandit sit amet non magna.
-
Etiam porta sem malesuada magna mollis euismod.
-
Donec ullamcorper nulla non metus auctor fringilla.
-
Cras mattis consectetur purus sit amet fermentum.
+
Nullam id dolor id nibh ultricies vehicula ut id elit.
+
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
+
Maecenas sed diam eget risus varius blandit sit amet non magna.
+
Etiam porta sem malesuada magna mollis euismod.
+
Donec ullamcorper nulla non metus auctor fringilla.
+
Cras mattis consectetur purus sit amet fermentum.
{% endexample %} {% callout info %} -- cgit v1.2.3 From 91992ac70a7fe9e9411580d0857132f57be59e5d Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 8 Sep 2016 23:21:40 -0700 Subject: Add new border utils - Move and rename .img-rounded to .rounded, .img-circle to .rounded-circle - Add new .rounded-{direction} utils - New docs pages for border utils with TBD comments for the border property - Removes most image examples for rounding from the content/images docs in favor of new docs page --- docs/utilities/borders.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/utilities/borders.md (limited to 'docs/utilities') diff --git a/docs/utilities/borders.md b/docs/utilities/borders.md new file mode 100644 index 000000000..b47d95c97 --- /dev/null +++ b/docs/utilities/borders.md @@ -0,0 +1,29 @@ +--- +layout: docs +title: Borders +group: utilities +--- + +Use border utilities to quickly style the `border` and `border-radius` of an element. Great for images, buttons, or any other element. + +## Border-radius + +Add classes to an element to easily round its corners. + +
+ Example rounded image + Example top rounded image + Example right rounded image + Example bottom rounded image + Example left rounded image + Completely round image +
+ +{% highlight html %} +... +... +... +... +... +... +{% endhighlight %} -- cgit v1.2.3 From 3dc4b3647ce2b27b0216fe8103253ffe9633fde9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 26 Sep 2016 00:54:10 -0700 Subject: Rename pull-*-{left|right} classes to .float-*-left and .float-*-right --- docs/utilities/clearfix.md | 4 ++-- docs/utilities/responsive-helpers.md | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/utilities') diff --git a/docs/utilities/clearfix.md b/docs/utilities/clearfix.md index 8ebf214d2..e63ba3cda 100644 --- a/docs/utilities/clearfix.md +++ b/docs/utilities/clearfix.md @@ -33,7 +33,7 @@ The following example shows how the clearfix can be used. Without the clearfix t {% example html %}
- - + +
{% endexample %} diff --git a/docs/utilities/responsive-helpers.md b/docs/utilities/responsive-helpers.md index b9c76d59d..13ae8a56d 100644 --- a/docs/utilities/responsive-helpers.md +++ b/docs/utilities/responsive-helpers.md @@ -46,25 +46,25 @@ Aspect ratios can be customized with modifier classes. These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!important` is included to avoid specificity issues. These use the same viewport width breakpoints as the grid system. -Two similar non-responsive Sass mixins (`pull-left` and `pull-right`) are also available. +Two similar non-responsive Sass mixins (`float-left` and `float-right`) are also available. {% example html %} -
Float left on all viewport sizes

-
Float right on all viewport sizes

-
Don't float on all viewport sizes

- -
Float left on viewports sized SM (small) or wider

-
Float left on viewports sized MD (medium) or wider

-
Float left on viewports sized LG (large) or wider

-
Float left on viewports sized XL (extra-large) or wider

+
Float left on all viewport sizes

+
Float right on all viewport sizes

+
Don't float on all viewport sizes

+ +
Float left on viewports sized SM (small) or wider

+
Float left on viewports sized MD (medium) or wider

+
Float left on viewports sized LG (large) or wider

+
Float left on viewports sized XL (extra-large) or wider

{% endexample %} {% highlight scss %} // Related simple non-responsive mixins .element { - @include pull-left; + @include float-left; } .another-element { - @include pull-right; + @include float-right; } {% endhighlight %} -- cgit v1.2.3 From 2e69dfa8c1679238579ef6f5ec85deb755e4fb6d Mon Sep 17 00:00:00 2001 From: Bardi Harborow Date: Tue, 4 Oct 2016 02:55:59 +1000 Subject: Fix broken/redirected links, moving to HTTPS where possible. (#20557) --- docs/utilities/display-property.md | 2 +- docs/utilities/screenreaders.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/utilities') diff --git a/docs/utilities/display-property.md b/docs/utilities/display-property.md index 8b3f6f616..50ea29367 100644 --- a/docs/utilities/display-property.md +++ b/docs/utilities/display-property.md @@ -6,7 +6,7 @@ group: utilities Use `.d-block`, `.d-inline`, or `.d-inline-block` to simply set an element's [`display` property](https://developer.mozilla.org/en-US/docs/Web/CSS/display) to `block`, `inline`, or `inline-block` (respectively). -To make an element `display: none`, use our [responsive utilities](../../layout/responsive-utilities/) instead. +To make an element `display: none`, use our [responsive utilities]({{ site.baseurl }}/layout/responsive-utilities/) instead. {% example html %}
Inline
diff --git a/docs/utilities/screenreaders.md b/docs/utilities/screenreaders.md index 576b0a18b..411f3ddb2 100644 --- a/docs/utilities/screenreaders.md +++ b/docs/utilities/screenreaders.md @@ -7,7 +7,7 @@ group: utilities Hide an element to all devices **except screen readers** with `.sr-only`. Combine `.sr-only` with `.sr-only-focusable` to show the element again when it's focused (e.g. by a keyboard-only user). Can also be used as mixins. {% comment %} -Necessary for following [accessibility best practices](../getting-started/#accessibility). +Necessary for following [accessibility best practices]({{ site.baseurl }}/getting-started/#accessibility). {% endcomment %} {% highlight html %} -- cgit v1.2.3 From 909b84a289553417ef22264a9570a2a2d7ff4ad3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Oct 2016 16:35:16 -0700 Subject: Document the .bg-faded class Fixes #20550. --- docs/utilities/colors.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/utilities') diff --git a/docs/utilities/colors.md b/docs/utilities/colors.md index 216941f95..f041f6947 100644 --- a/docs/utilities/colors.md +++ b/docs/utilities/colors.md @@ -36,6 +36,7 @@ Similar to the contextual text color classes, easily set the background of an el
Etiam porta sem malesuada magna mollis euismod.
Donec ullamcorper nulla non metus auctor fringilla.
Cras mattis consectetur purus sit amet fermentum.
+
Cras mattis consectetur purus sit amet fermentum.
{% endexample %} {% callout info %} -- cgit v1.2.3 From ea57c5108281ee77a4fbb513d40f253d928171c3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Oct 2016 17:46:45 -0700 Subject: document it a bit --- docs/utilities/sizing-and-positioning.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs/utilities') diff --git a/docs/utilities/sizing-and-positioning.md b/docs/utilities/sizing-and-positioning.md index 81b65d43d..8881b177b 100644 --- a/docs/utilities/sizing-and-positioning.md +++ b/docs/utilities/sizing-and-positioning.md @@ -19,10 +19,16 @@ The `.pos-f-t` class can be used to easily position elements at the top of the v {% endhighlight %} -## Full width +## Width and height -Easily make an element as wide as its parent using the `.w-100` utility class, which sets `width: 100%`. +Easily make an element as wide or as tall as its parent using the `.w-100` and `.h-100` utility classes. {% example html %} Width = 100% {% endexample %} + +{% example html %} +
+
Full height
+
+{% endexample %} -- cgit v1.2.3