Dock

A non restrictive framework

Dock is a simple Bootstrap based framework made to be as non restrictive as possible. Taking a focus on layout rather than style, after all that is your job!

You won't find any of the Icing that bootstrap has but rather a more concise grid system with centring, a more functional file structure allowing you to extend rather than over ride styles.

Made to be extensible, it's possible to add your own button code or include what other UI frameworks have already made.

Why

Bootstrap is for Apps and not Websites.

A common flaw with Frameworks is that they include the core source and people will ether make edits to it, or wont want to make modifications since they would complicate the upgrade process.

Updating the variables file is a great idea, until you update to the latest version and have to manually diff the two.

Structure

The basic Dock folder structure looks like this.

  • /extend
  • /extend/style.less
  • /extend/{ project files }
  • /src
  • style.less

You should always generate css from the files in the root folder. In this eample we would compile style.less.

The /src folder contains the Dock source files and should not need to be modified.

The /extend folder will contain all of the custom code for your project, as well as the /extend/extend.less file. Think of this as Object Oriented Less.

/src/variable.less contains the default values used in the framework, as long as you copy the exact same variable name to the extend/extend.less file you can effect the compiled code without creating inheritance.

Why extending is better?

It prevents code duplication or inheritance overhead.

If Dock defaults a link to Blue, without using the Extending values, you might do something like this.

// dock.less
a:link {
	color: blue;
}

// style.less
a:link {
	color: green;
}

// Net result is a green link.

But if we use the /extend/extend.less and overwirte the default link color you would see generated css like this.

// dock.less
a:link {
color: green;
}

// Net result is a green link.

Setup

The idea here is that you are in control, so at a mimimum you need to import a few files.

The root style.less file would look something like this:

// Core Framework
@import "src/dock.less";

// Extended
@import "extend/mixins.less";
@import "extend/responsive.less";
@import "extend/ie.less";
@import "extend/style.less";

Thats it!

Extras

Along with being a flexible micro framework, It also makes for a perfect Front end starting point when developing small sites or even CMS themes.

Grunt:

http://gruntjs.com

  • sudo npm install -g grunt-cli
  • npm install
  • grunt watch

Bower:

http://bower.io/

  • bower install

Acknowledgments

This included a watered down version of Bootstrap 3.1 http://getbootstrap.com, Some Mixins from http://getpreboot.com

The Grid

.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-1
.md-8
.md-4
.md-4
.md-4
.md-4
.md-6
.md-6
.xs-12
.xs-6
.xs-6
.xs-6
.xs-6
.xs-6
.xs-6
.md-4
.md-4 .md-offset-4
.md-3 .md-offset-3
.md-3 .md-offset-3
.md-6 .md-center
.md-6 .md-center
.md-4
.md-4
.md-4

Manual Grids

.one
.one-half
.one-half
.two-thirds
.one-quarter
.one-quarter
.one-quarter
.one-quarter
.one-fifth
.one-fifth
.one-fifth
.one-fifth
.one-fifth
.one-sixth
.one-sixth
.one-sixth
.one-sixth
.one-sixth
.one-sixth
.three-quarters
.one-quarter

Headings

All HTML headings, <h1> through <h6> are available.

h1. Heading 1

h2. Heading 2

h3. Heading 3

h4. Heading 4

h5. Heading 5
h6. Heading 6

Body copy

Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

Lead body copy

Make a paragraph stand out by adding .lead.

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

Built with Less

The typographic scale is based on two LESS variables in variables.less: @baseFontSize and @baseLineHeight. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.


Emphasis

Make use of HTML's default emphasis tags with lightweight styles.

<small>

For de-emphasizing inline or blocks of text, use the small tag.

This line of text is meant to be treated as fine print.

Bold

For emphasizing a snippet of text with a heavier font-weight.

The following snippet of text is rendered as bold text.

Italics

For emphasizing a snippet of text with italics.

The following snippet of text is rendered as italicized text.

Heads up! Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

Alignment classes

Easily realign text to components with text alignment classes.

Left aligned text.

Center aligned text.

Right aligned text.


Abbreviations

Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

<abbr>

For expanded text on long hover of an abbreviation, include the title attribute.

An abbreviation of the word attribute is attr.

<abbr class="initialism">

Add .initialism to an abbreviation for a slightly smaller font-size.

HTML is the best thing since sliced bread.


Addresses

Present contact information for the nearest ancestor or the entire body of work.

<address>

Preserve formatting by ending all lines with <br>.

Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
Full Name
[email protected]

Blockquotes

For quoting blocks of content from another source within your document.

Default blockquote

Wrap <blockquote> around any HTML as the quote. For straight quotes we recommend a <p>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Blockquote options

Style and content changes for simple variations on a standard blockquote.

Naming a source

Add <small> tag for identifying the source. Wrap the name of the source work in <cite>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Alternate displays

Use .pull-right for a floated, right-aligned blockquote.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Lists

Unordered

A list of items in which the order does not explicitly matter.

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Ordered

A list of items in which the order does explicitly matter.

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  4. Facilisis in pretium nisl aliquet
  5. Nulla volutpat aliquam velit
  6. Faucibus porta lacus fringilla vel
  7. Aenean sit amet erat nunc
  8. Eget porttitor lorem

Unstyled

Remove the default list-style and left padding on list items (immediate children only).

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Inline

Place all list items on a single line with inline-block and some light padding.

  • Lorem ipsum
  • Phasellus iaculis
  • Nulla volutpat

Description

A list of terms with their associated descriptions.

Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.

Horizontal description

Make terms and descriptions in <dl> line up side-by-side.

Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
Felis euismod semper eget lacinia
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

Heads up! Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout.