From 7a7149d2eef386912e497907e1b2322ee98c0234 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 23 Aug 2013 22:00:54 -0700 Subject: [PATCH] Rearrange helper classes docs section; add subnav list items to docs side nav --- _includes/nav-css.html | 6 +++++ css.html | 61 +++++++++++++++++++++++++----------------- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/_includes/nav-css.html b/_includes/nav-css.html index 853b47331b..9d979bc90e 100644 --- a/_includes/nav-css.html +++ b/_includes/nav-css.html @@ -76,6 +76,12 @@
  • Helper classes +
  • Responsive utilities diff --git a/css.html b/css.html index 6947da0644..3e639bf3b0 100644 --- a/css.html +++ b/css.html @@ -2213,7 +2213,8 @@ For example, <section> should be wrapped as inline.

    Helper classes

    -

    Close icon

    + +

    Close icon

    Use the generic close icon for dismissing content like modals and alerts.

    @@ -2222,43 +2223,45 @@ For example, <section> should be wrapped as inline. {% endhighlight %} -

    .pull-left

    -

    Float an element left with a class. Can also be used as a mixin.

    + +

    Quick floats

    +

    Float an element to the left or right with a class. Classes can also be used as mixins.

    {% highlight html %}
    ...
    -{% endhighlight %} -{% highlight css %} -.pull-left { - float: left !important; -} -{% endhighlight %} -
    -

    Not for use in navbars

    -

    To left-align components in navbars, use .navbar-left instead. See the navbar docs for details.

    -
    - -

    .pull-right

    -

    Float an element right with a class. Can also be used as a mixin.

    -{% highlight html %}
    ...
    {% endhighlight %} {% highlight css %} +// Classes +.pull-left { + float: left !important; +} .pull-right { float: right !important; } + +// Usage as mixins +.element { + .pull-left(); +} +.another-element { + .pull-right(); +} {% endhighlight %} +

    Not for use in navbars

    -

    To right-align components in navbars, use .navbar-right instead. See the navbar docs for details.

    +

    To align components in navbars with utility classes, use .navbar-left or .navbar-right instead. See the navbar docs for details.

    -

    .clearfix

    -

    Clear the float on any element. Utilizes the micro clearfix as popularized by Nicolas Gallagher. Can also be used as a mixin.

    + +

    Clearfix

    +

    Clear the float on any element with the .clearfix class. Utilizes the micro clearfix as popularized by Nicolas Gallagher. Can also be used as a mixin.

    {% highlight html %} +
    ...
    {% endhighlight %} {% highlight css %} -// Mixin +// Mixin itself .clearfix() { &:before, &:after { @@ -2270,19 +2273,29 @@ For example, <section> should be wrapped as inline. } } -// Usage +// Usage as a Mixin .element { .clearfix(); } {% endhighlight %} -

    .sr-only

    -

    Hide an element to all users except screen readers. Necessary for following accessibility best practices.

    + +

    Screen reader content

    +

    Hide an element to all users except screen readers with .sr-only. Necessary for following accessibility best practices. Can also be used as a mixin.

    {% highlight html %} Skip to content {% endhighlight %} +{% highlight css %} +// Usage as a Mixin +.skip-navigation { + .sr-only(); +} +{% endhighlight %} +
    + +