From 4a907709ba38767b118c1a880dadfb58df8ae1d6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 9 Jun 2012 23:26:46 -0700 Subject: [PATCH] redo icons section --- docs/base-css.html | 96 +++++++++++------------- docs/templates/pages/base-css.mustache | 100 +++++++++++-------------- 2 files changed, 86 insertions(+), 110 deletions(-) diff --git a/docs/base-css.html b/docs/base-css.html index 618dee29a4..ee12d62e2f 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -1341,6 +1341,9 @@ For example, <code>section</code> should be wrapped as inline. + +

Icon glyphs

+

140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.

    @@ -1504,16 +1507,12 @@ For example, <code>section</code> should be wrapped as inline.
-
+ +
-

Built as a sprite

-

Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.

-

All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.

-

Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.

- -

How to use

-

Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:

+

How to use

+

All icons require an <i> tag with a unique class, prefixed with icon-. To use, place the following code just about anywhere:

 <i class="icon-search"></i>
 
@@ -1521,66 +1520,55 @@ For example, <code>section</code> should be wrapped as inline.
 <i class="icon-search icon-white"></i>
 
-

There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.

Heads up! When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.

-

Use cases

-

Icons are great, but where would one use them? Here are a few ideas:

- -

Essentially, anywhere you can put an <i> tag, you can put an icon.

+ +
-

Examples

+

Icon examples

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

-
-
- - - - +

Buttons

+
+
+
+ + + + +
+
- + +

Navigation

+ -

- Refresh - Checkout - Delete -

-

- Comment - Settings - More Info -

- - -
+

Form fields

+
diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 48043cbc8a..a1f4a3501d 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -1272,6 +1272,9 @@ + +

{{_i}}Icon glyphs{{/i}}

+

{{_i}}140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.{{/i}}

    @@ -1435,16 +1438,12 @@
-
+ +
-

{{_i}}Built as a sprite{{/i}}

-

{{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}

-

{{_i}}All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.{{/i}}

-

{{_i}}Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.{{/i}}

- -

{{_i}}How to use{{/i}}

-

{{_i}}Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:{{/i}}

+

{{_i}}How to use{{/i}}

+

{{_i}}All icons require an <i> tag with a unique class, prefixed with icon-. To use, place the following code just about anywhere:{{/i}}

 <i class="icon-search"></i>
 
@@ -1452,66 +1451,55 @@
 <i class="icon-search icon-white"></i>
 
-

{{_i}}There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}

{{_i}}Heads up!{{/i}} {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.{{/i}}

-

{{_i}}Use cases{{/i}}

-

{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}

-
    -
  • {{_i}}As visuals for your sidebar navigation{{/i}}
  • -
  • {{_i}}For a purely icon-driven navigation{{/i}}
  • -
  • {{_i}}For buttons to help convey the meaning of an action{{/i}}
  • -
  • {{_i}}With links to share context on a user's destination{{/i}}
  • -
-

{{_i}}Essentially, anywhere you can put an <i> tag, you can put an icon.{{/i}}

+ +
-

{{_i}}Examples{{/i}}

+

{{_i}}Icon examples{{/i}}

{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}

-