From b8fa6cfacf61a02ab769b9031253c7b06111fa7c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 25 Jan 2012 01:22:29 -0800 Subject: move css builder and downloader to dedicated page, start to update remaining sections on LESS docs page --- docs/less.html | 361 +++++++++------------------------------------------------ 1 file changed, 58 insertions(+), 303 deletions(-) (limited to 'docs/less.html') diff --git a/docs/less.html b/docs/less.html index 55138c71a..6bb04e8d8 100644 --- a/docs/less.html +++ b/docs/less.html @@ -51,6 +51,9 @@
  • Using LESS
  • +
  • + Download +
  • @@ -69,177 +72,16 @@

    Customize and extend Bootstrap with LESS, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.

    - -
    - - -
    -
    - -
    -
    -
    -
    -

    Scaffolding

    - - - -

    Base CSS

    - - - - - - - -
    -
    -

    Components

    - - - - - - - - - - -
    -
    -

    JS Components

    - - - - - - - -
    -
    -

    Responsive

    - - - -

    Miscellaneous

    - - - - -
    -
    - -
    -
    -
    -
    -

    Links

    - - - - -

    Grid system

    - - - - - - - - - - -
    -
    -

    Typography

    - - - - - - -

    Forms

    - - - - -

    Navbar

    - - - - - - -
    -
    -

    Form states & alerts

    - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    -

    And you're set!

    -

    We've compiled your selected CSS and customized variables and have them ready to download as a tidy ZIP file. Choose from compiled or compiled and minified CSS files.

    - Download CSS Download minified CSS -
    -

    Looking to customize your javascript? Head over to the Javascript plugins page to build your own Bootstrap JS bundle.

    -
    -
    -
    -
    - -
    - - -
    @@ -249,7 +91,7 @@

    Why LESS?

    -

    Bootstrap is made with LESS at it's core, a dynamic stylesheet language created by Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.

    +

    Bootstrap is made with LESS at it's core, a dynamic stylesheet language created by our good friend, Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.

    What's included?

    @@ -283,7 +125,7 @@ ================================================== -->

    Hyperlinks

    @@ -554,85 +396,8 @@ - - - - - - - - - - - - - - - -
    - -
    -
    -

    Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less, a CSS preprocessor for faster and easier web development.

    -

    Check out how we used Preboot in Bootstrap and how you can make use of it should you choose to run Less on your next project.

    -
    -
    -

    How to use it

    -

    Use this option to make full use of Bootstrap’s Less variables, mixins, and nesting in CSS via javascript in your browser.

    -
    -<link rel="stylesheet/less" href="less/bootstrap.less" media="all" />
    -<script src="js/less-1.1.3.min.js"></script>
    -

    Not feeling the .js solution? Try the Less Mac app or use Node.js to compile when you deploy your code.

    - -

    What’s included

    -

    Here are some of the highlights of what’s included in Twitter Bootstrap as part of Bootstrap. Head over to the Bootstrap website or Github project page to download and learn more.

    -

    Variables

    -

    Variables in Less are perfect for maintaining and updating your CSS headache free. When you want to change a color value or a frequently used value, update it in one spot and you’re set.

    -
    -// Links
    -@linkColor:         #8b59c2;
    -@linkColorHover:    darken(@linkColor, 10);
    -
    -// Grays
    -@black:             #000;
    -@grayDark:          lighten(@black, 25%);
    -@gray:              lighten(@black, 50%);
    -@grayLight:         lighten(@black, 70%);
    -@grayLighter:       lighten(@black, 90%);
    -@white:             #fff;
    -
    -// Accent Colors
    -@blue:              #08b5fb;
    -@green:             #46a546;
    -@red:               #9d261d;
    -@yellow:            #ffc40d;
    -@orange:            #f89406;
    -@pink:              #c3325f;
    -@purple:            #7a43b6;
    -
    -// Baseline grid
    -@basefont:          13px;
    -@baseline:          18px;
    -
    - -

    Commenting

    -

    Less also provides another style of commenting in addition to CSS’s normal /* ... */ syntax.

    -
    -// This is a comment
    -/* This is also a comment */
    -
    -

    Mixins up the wazoo

    Mixins are basically includes or partials for CSS, allowing you to combine a block of code into one. They’re great for vendor prefixed properties like box-shadow, cross-browser gradients, font stacks, and more. Below is a sample of the mixins that are included with Bootstrap.

    Font stacks

    @@ -686,69 +451,59 @@ } -

    Compiling Less

    -

    After modifying the .less files in /lib/, you'll need to recompile them in order to regenerate the bootstrap-*.*.*.css and bootstrap-*.*.*.min.css files. If you're submitting a pull request to GitHub, you must always recompile.

    -

    Ways to compile

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MethodSteps
    Node with makefile -

    Install the LESS command line compiler with npm by running the following command:

    -
    $ npm install less
    -

    Once installed just run make from the root of your bootstrap directory and you're all set.

    -

    Additionally, if you have watchr installed, you may run make watch to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).

    -
    Javascript -

    Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.

    + + +
    + +
    + Note: If you're submitting a pull request to GitHub with modified CSS, you must recompile the CSS via any of these methods. +
    +

    Tools for compiling

    +
    +
    +

    Node with makefile

    +

    Install the LESS command line compiler with npm by running the following command:

    +
    $ npm install less
    +

    Once installed just run make from the root of your bootstrap directory and you're all set.

    +

    Additionally, if you have watchr installed, you may run make watch to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).

    +
    +
    +

    Command line

    +

    Install the LESS command line tool via Node and run the following command:

    +
    $ lessc ./lib/bootstrap.less > bootstrap.css
    +

    Be sure to include --compress in that command if you're trying to save some bytes!

    +
    +
    +

    Javascript

    +

    Download the latest Less.js and include the path to it (and Bootstrap) in the <head>.

     <link rel="stylesheet/less" href="/path/to/bootstrap.less">
     <script src="/path/to/less.js"></script>
     
    -

    To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.

    -
    Command line -

    Install the LESS command line tool via Node and run the following command:

    -
    $ lessc ./lib/bootstrap.less > bootstrap.css
    -

    Be sure to include --compress in that command if you're trying to save some bytes!

    -
    Unofficial Mac app -

    The unofficial Mac app watches directories of .less files and compiles the code to local files after every save of a watched .less file.

    -

    If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.

    -
    CrunchCrunch is a great looking LESS editor and compiler built on Adobe Air.
    CodeKitCreated by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.
    SimplessMac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.
    -
    -
    - +

    To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.

    +
    +
    +
    +
    +

    Unofficial Mac app

    +

    The unofficial Mac app watches directories of .less files and compiles the code to local files after every save of a watched .less file.

    +

    If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.

    +
    +
    +

    More Mac apps

    +

    Crunch

    +

    Crunch is a great looking LESS editor and compiler built on Adobe Air.

    +

    CodeKit

    +

    Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.

    +

    Simpless

    +

    Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.

    +
    +
    +