From 650251228bfda8d57a09b4b350ce2b9f1e0efcc1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 27 Aug 2011 15:30:18 -0700 Subject: redefine the grid to use attribute selectors with css regex, make previously fixed grid values use variables we use elsewhere --- lib/scaffolding.less | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index d1b621c13..0833e0c83 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -9,28 +9,14 @@ .row { .clearfix(); - margin-left: -20px; + margin-left: -1 * @gridGutterWidth; - // Default columns - .span1, - .span2, - .span3, - .span4, - .span5, - .span6, - .span7, - .span8, - .span9, - .span10, - .span11, - .span12, - .span13, - .span14, - .span15, - .span16 { + // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7) + // Credit to @dhg for the idea + [class^="span"] { display: inline; float: left; - margin-left: 20px; + margin-left: @gridGutterWidth; } // Default columns @@ -64,6 +50,12 @@ .offset10 { .offset(10); } .offset11 { .offset(11); } .offset12 { .offset(12); } + + // Unique column sizes for 16-column grid + .span-one-third { width: 300px; } + .span-two-thirds { width: 620px; } + .offset-one-third { margin-left: 320px; } + .offset-two-thirds { margin-left: 640px; } } -- cgit v1.2.3 From f17fc367f724ef68e287c45c129558fb62fc6b8e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 29 Aug 2011 21:26:53 -0700 Subject: le merging conflicts --- lib/scaffolding.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index 0833e0c83..2bbb1dc6c 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -46,7 +46,7 @@ .offset6 { .offset(6); } .offset7 { .offset(7); } .offset8 { .offset(8); } - .offset9 { .offset(8); } + .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } .offset12 { .offset(12); } -- cgit v1.2.3 From 589204803bc34575a8ca2c3e624864d3dc8e63ba Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 29 Aug 2011 21:41:12 -0700 Subject: remove duplicate defined btn class O_O --- lib/scaffolding.less | 88 +--------------------------------------------------- 1 file changed, 1 insertion(+), 87 deletions(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index 2bbb1dc6c..c0272908f 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -107,90 +107,4 @@ a { color: @linkColorHover; text-decoration: underline; } -} - -// Buttons -.btn { - display: inline-block; - #gradient > .vertical-three-colors(#fff, #fff, 0.25, darken(#fff, 10%)); - padding: 4px 14px; - text-shadow: 0 1px 1px rgba(255,255,255,.75); - color: #333; - font-size: 13px; - line-height: @baseline; - border: 1px solid #ccc; - border-bottom-color: #bbb; - .border-radius(4px); - @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); - &:hover { - background-position: 0 -15px; - color: #333; - text-decoration: none; - } -} -.primary { - #gradient > .vertical(#049CDB, #0064CD); - color: #fff; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - border: 1px solid darken(#0064CD, 10%); - border-bottom-color: darken(#0064CD, 15%); - &:hover { - color: #fff; - } -} - -.btn { - //.button(#1174C6); - .transition(.1s linear all); - &.primary { - //#gradient > .vertical(@blue, @blueDark); - color: #fff; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - border-color: @blueDark @blueDark darken(@blueDark, 15%); - border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); - &:hover { - color: #fff; - } - } - &.large { - font-size: 16px; - line-height: 28px; - .border-radius(6px); - } - &.small { - padding-right: 9px; - padding-left: 9px; - font-size: 11px; - } - &.disabled { - background-image: none; - .opacity(65); - cursor: default; - .box-shadow(none); - } - - // this can't be included with the .disabled def because IE8 and below will drop it ;_; - &:disabled { - background-image: none; - .opacity(65); - cursor: default; - .box-shadow(none); - &.primary { - color: #fff; - } - } - &:active { - @shadow: inset 0 3px 7px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); - } -} - -// Help Firefox not be a jerk about adding extra padding to buttons -button.btn, -input[type=submit].btn { - &::-moz-focus-inner { - padding: 0; - border: 0; - } -} +} \ No newline at end of file -- cgit v1.2.3 From 7070d44aed65344ed52ffbf2a3a9c1ce91c69035 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 29 Aug 2011 21:41:32 -0700 Subject: adding more grid docs --- lib/scaffolding.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index 2bbb1dc6c..7fbab7d43 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -54,8 +54,8 @@ // Unique column sizes for 16-column grid .span-one-third { width: 300px; } .span-two-thirds { width: 620px; } - .offset-one-third { margin-left: 320px; } - .offset-two-thirds { margin-left: 640px; } + .offset-one-third { margin-left: 340px; } + .offset-two-thirds { margin-left: 660px; } } -- cgit v1.2.3 From 02abdd60378aa5aecbb9d8bafe23f0cd2b86141a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 00:02:44 -0700 Subject: remove inset shadow from disabled buttons --- lib/scaffolding.less | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index 7f2af56ba..b84b43721 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -69,7 +69,6 @@ body { margin: 0; #font > .sans-serif(normal,@basefont,@baseline); color: @gray; - text-rendering: optimizeLegibility; } // Container (centered, fixed-width layouts) @@ -107,4 +106,4 @@ a { color: @linkColorHover; text-decoration: underline; } -} +} \ No newline at end of file -- cgit v1.2.3 From 5960afc3490a174cadaf3bc0f4fe3cf605666756 Mon Sep 17 00:00:00 2001 From: pthrasher Date: Fri, 2 Sep 2011 12:45:03 -0400 Subject: incorporated idea from @markdotto in #138 --- lib/scaffolding.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/scaffolding.less') diff --git a/lib/scaffolding.less b/lib/scaffolding.less index ded9a1e5f..5863659c2 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -90,11 +90,11 @@ body { .container-fluid { padding: 0 20px; .clearfix(); - .sidebar { + > .sidebar { float: left; width: 220px; } - .content { + > .content { min-width: 700px; max-width: 1180px; margin-left: 240px; -- cgit v1.2.3