// $Id: README.txt,v 1.2 2008/12/14 18:23:12 dvessel Exp $
This "framework" theme is based on the 960 Grid System. It is being proposed
for the core base theme in Drupal 7.
See these pages:
Issue queue: http://drupal.org/node/293540
g.d.o discussion: http://groups.drupal.org/node/16200
960 post on g.d.o: http://groups.drupal.org/node/16457
Homepage and download for 960:
http://960.gs/
Background information on 960:
http://sonspring.com/journal/960-grid-system
General idea behind a CSS framework:
http://www.alistapart.com/articles/frameworksfordesigners
Extensive overview on working within grids:
http://www.smashingmagazine.com/2007/04/14/designing-with-grid-based-approach/
==============================================================================
Modifications:
- The 960 Grid System package has been modified so it conforms to Drupal's
coding standards. Tabs were removed for double spaces and underscores
changed to hyphens.
- Additional .push-x and .pull-x classes have been added.
- Right-to-left languages are supported. It's not part of the 960 download.
It has been extended to support Drupal's rtl language system.
- Removed ".clear-fix" and ".clear" classes from 960.css. Drupal works with
".clear-block" which uses the same technique used in .clear-fix. The .clear
class on the other hand is too commonly used as a class name and the
properties can cause confusion since anything with that property will
disappear. A standard
tag can be used in its place.
- Removed the "outline:0;" rule from reset.css. Adding it back manually
prevents OS specific outline styles from used. Specifically Webkit and
possibly others. Also removed the "a:focus {outline: 1px dotted invert;}"
from text.css where it's reapplied.
- Removed the large left margin for list items inside text.css. It interferes
in many places.
==============================================================================
Notes and rules to play nice with the grids:
- The class .container-[x] is a subdivision of the overall width (960 pixels).
It can either be .container-12 or .container-16. Depending on which is used
Each grid unit (.grid-[x] class) will either be 80px for 12 subdivisions or
60px for 16 subdivision which includes 10 pixle margin on the left and right
side.
- Add a .show-grid class to the body tag to see the grid. It will add a
background graphic to guide you. This theme includes a printable sketch
sheet and templates for Photoshop and various other formats to guide you
from start to finish. See the "extras" folder within this theme.
- Do not add left or right margins or padding to anything that's assigned a
grid unit or it may throw off the alignment.
- Use the .push-[x] and .pull-[x] classes so the order the layout is presented
does not depend on source order. If the source is [content][side1][side2],
and you wanted it to show as [side1][content][side2] add a .pull-[x] class
with the same grid unit as the content to side1. Then add a .push-[x] class
to the content with the grid unit of side1. This will in effect, swap their
display. These classes can also be used for the general shifting of content
when needed.
- Use the .prefix-[x] and .suffix-[x] classes if you need to fill empty space.
Do not confuse this with the .push/pull-[x] classes which can overlap
adjacent areas.
- Right to left languages will have the page reflow automatically. See
960-rtl.css inside the "styles" folder. As long as the theme uses the
positioning classes from this framework, it will be automatic.
- When embedding a grid within a grid, use .alpha and .omega classes. The
first block must be assigned .alpha and the last, .omega. This will chop off
the 10px margin so it fits neatly into the grid. This depends more on the
visual order than the source order when using the push/pull classes.
- All grid blocks are floated so make sure a .clear-block class is added to
any wrappers if the wrapper will have any display properties. Background
color for example.
As long as you stay within the framework, any browser positioning quirks
_especially from IE_ should be minimal.
==============================================================================
To-dos:
- * Update: see next section *
Helper function to calculate grid classes based on context. The standard
$body_classes within page.tpl.php which contains the state of the sidebars
will be less useful in this grid system. It's often used to change the width
of the content region depending on the presence of sidebars. This new helper
function will need to replace that functionality. It also gives us an
opportunity to have a more flexible system. Instead of focusing on sidebars,
it can be more fine grained in its awareness of adjacent grids and push out
classes appropriately. This helper function must be as simple as possible to
*work with*.
- Separate issue but this can help add grid classes easier.
Add $classes to hook templates: http://drupal.org/node/306358
==============================================================================
Adding classes based on context:
The function "ns()" can be used to add classes contextually. The first argument
should be the default class with the highest possible unit. The rest of the
arguments are paired by a variable and its unit used in an adjacent block of
markup.