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