From 7a7149d2eef386912e497907e1b2322ee98c0234 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 23 Aug 2013 22:00:54 -0700 Subject: Rearrange helper classes docs section; add subnav list items to docs side nav --- css.html | 57 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 22 deletions(-) (limited to 'css.html') diff --git a/css.html b/css.html index 6947da064..3e639bf3b 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 %} +// Classes .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 %} .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 %} +
+ +
-- cgit v1.2.3