From d8cafeacb5c8eda03360c005bbbabe8bb1ff6ab9 Mon Sep 17 00:00:00 2001 From: Mark Perkins Date: Fri, 22 Jun 2012 17:58:57 +0100 Subject: [PATCH] Lots of grid improvements, a few sprite tweaks --- README.md | 4 +- _compiled/example.css | 119 ++++++++++++++++++++++++++---- examples/example.less | 147 ++++++++++++++++++++++++++++++------- examples/grids.html | 44 ++++++++++- examples/index.html | 19 +++-- examples/nested-grids.html | 61 +++++++++++++++ examples/other.html | 28 +++++++ examples/sprite.png | Bin 3009 -> 3711 bytes examples/sprites.html | 13 +++- mixins/grids.less | 31 ++++++++ mixins/helpers.less | 9 ++- mixins/settings.less | 2 +- mixins/sprites.less | 16 ++-- 13 files changed, 431 insertions(+), 62 deletions(-) create mode 100644 examples/other.html diff --git a/README.md b/README.md index 7800359..76ac55f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ClearLESS ========= -A reuseable collection of carefully-considered LESS mixins to help speed up development and increase maintainability. +A reuseable collection of carefully-considered LESS mixins to help speed up development and increase maintainability of stylesheets in large projects. + + diff --git a/_compiled/example.css b/_compiled/example.css index 0032f47..bf7a3ff 100644 --- a/_compiled/example.css +++ b/_compiled/example.css @@ -13,10 +13,57 @@ body { padding: 20px; margin: 0; background: #DDD; + font-size: 10px; + font-family: sans-serif; + min-width: 320px; +} +p, +li { + font-size: 10px; + font-size: 1rem; +} +h1 { + font-size: 15px; + font-size: 1.5rem; +} +h2 { + font-size: 12px; + font-size: 1.2rem; } .receptacle { max-width: 1200px; margin: 0 auto; + border-bottom: 1px dashed #666; +} +.nav { + padding: 10px 0 10px 10px; +} +.nav li { + margin-bottom: 5px; + list-style: none; + padding: 0; +} +.nav a { + display: inline-block; + position: relative; + padding-left: 16px; +} +.ie6 .nav a, +.ie7 .nav a { + display: inline; + zoom: 1; +} +.nav a:before { + position: absolute; + display: block; + content: ' '; + background-image: url('/examples/sprite.png'); + background-repeat: no-repeat; + background-position: -100px -50px; + height: 11px; + width: 6px; + top: 4px; + left: 0; } /* ---- grids ---- */ .primary, @@ -29,8 +76,6 @@ body { margin-bottom: 2%; } .segment { - box-sizing: border-box; - padding: 10px; margin-bottom: 2%; overflow: hidden; } @@ -88,8 +133,13 @@ body { .section-3 .segment { width: 49.2063492063492%; } +.section-4 .segment { + width: 49.2063492063492%; +} +/* media query example */ @media all and (max-width: 40em) { - .section-3 .segment:nth-child(2n) { + .section-3 .segment:nth-child(2n), + .section-4 .segment:nth-child(2n) { margin-right: 0; float: right; } @@ -128,13 +178,28 @@ body { margin-right: 0; float: right; } + .section-4 .primary { + width: 11.11111111111111%; + padding-right: 6.349206349206349%; + } + .section-4 .secondary { + width: 11.11111111111111%; + padding-left: 6.349206349206349%; + margin-left: 6.349206349206349%; + } + .section-4 .tertiary { + width: 17.46031746031746%; + margin-left: 6.349206349206349%; + } + .section-4 .quaternary { + width: 17.46031746031746%; + padding-left: 6.349206349206349%; + margin-right: 6.349206349206349%; + } } /* Nested Grids */ .section-parent .segment { - display: inline; - float: left; width: 49.2063492063492%; - margin-right: 1.5873015873015872%; } .section-parent > .secondary { background-color: transparent; @@ -143,16 +208,19 @@ body { float: right; } .section-nested .segment { - display: inline; - float: left; width: 22.58064516129032%; margin-right: 3.225806451612903%; background: #999; } -.section-nested .segment:nth-child(4n) { +.floated .section-nested .segment > .secondary, +.floated .section-parent .segment:nth-child(4n) { margin-right: 0; float: right; } +.inline .section-nested .segment > .secondary, +.inline .section-parent .segment:nth-child(4n) { + margin-right: 0; +} /* Sprites & Icons */ .more { display: inline-block; @@ -176,13 +244,19 @@ body { top: 4px; right: 0; } -.nav li { +.icon-nav a { + display: inline-block; padding-top: 10px; padding-bottom: 10px; position: relative; padding-left: 38px; } -.nav li:before { +.ie6 .icon-nav a, +.ie7 .icon-nav a { + display: inline; + zoom: 1; +} +.icon-nav a:before { position: absolute; display: block; content: ' '; @@ -194,13 +268,28 @@ body { top: 2px; left: 0; } -.nav li.rockets:before { - background-position: 0px -50px; +.icon-nav .robots a:before { + background-position: 0px 0px; } -.nav li.runners:before { +.icon-nav .robots a:hover:before { background-position: -50px 0px; } -.nav li.ghosts:before { +.icon-nav .rockets a:before { + background-position: 0px -50px; +} +.icon-nav .rockets a:hover:before { background-position: -50px -50px; } +.icon-nav .runners a:before { + background-position: 0px -100px; +} +.icon-nav .runners a:hover:before { + background-position: -50px -100px; +} +.icon-nav .ghosts a:before { + background-position: 0px -150px; +} +.icon-nav .ghosts a:hover:before { + background-position: -50px -150px; +} /* Other Helpers */ diff --git a/examples/example.less b/examples/example.less index 9ddcee8..8907a44 100644 --- a/examples/example.less +++ b/examples/example.less @@ -1,14 +1,18 @@ @import "../mixins/all"; // Default settings override + @sprite-image: url('/examples/sprite.png'); @using-modernizr: false; @using-ieclasses: true; -@column-width: 60px; -@gutter-width: 20px; +@column-width: 60; +@gutter-width: 20; + +@base-font-size: 10; // Project settings + @mobile-width: 40em; /* ---- setup ---- */ @@ -17,11 +21,40 @@ body { padding: 20px; margin: 0; background: #DDD; + font-size: ~"@{base-font-size}px"; + font-family: sans-serif; + min-width: 320px; +} + +p, li { + .font-size-rems(1); +} + +h1 { + .font-size-rems(1.5); +} + +h2 { + .font-size-rems(1.2); } .receptacle { max-width: 1200px; margin: 0 auto; + border-bottom: 1px dashed #666; +} + +.nav { + padding: 10px 0 10px 10px; + li { + margin-bottom: 5px; + list-style: none; + padding: 0; + } + a { + .inline-block(); + .icon(2, 1, 6px, 11px, 10px, 0, 4px); + } } /* ---- grids ---- */ @@ -38,8 +71,6 @@ body { } .segment { - box-sizing: border-box; - padding: 10px; margin-bottom: 2%; overflow: hidden; } @@ -87,8 +118,18 @@ body { } } +.section-4 { + .segment { + .span(8); + } +} + + +/* media query example */ + @media all and ( max-width: @mobile-width ) { - .section-3 .segment:nth-child(2n) { + .section-3 .segment:nth-child(2n), + .section-4 .segment:nth-child(2n) { .end-column(); } } @@ -110,7 +151,7 @@ body { } .secondary { .span(6); - .end-column() + .end-column(); } } @@ -129,17 +170,40 @@ body { } .quaternary { .span(3); - .end-column() + .end-column(); } } - + + .section-4 { + .primary { + .span(2); + .post-pad(1); + } + .secondary { + .span(2); + .pre-pad(1); + .pre-push(1); + } + .tertiary { + .span(3); + .pre-push(1); + } + + .quaternary { + .span(3); + .pre-pad(1); + .post-push-end(1); + } + + } + } /* Nested Grids */ .section-parent { .segment { - .column(8); + .span(8); } > .secondary { background-color: transparent; @@ -150,37 +214,64 @@ body { .section-nested { .segment { - .column(2,8); + .span(2,8); background: #999; } - .segment:nth-child(4n) { +} + +.floated { + .section-nested .segment > .secondary, + .section-parent .segment:nth-child(4n) { .end-column(); } } +.inline { + .section-nested .segment > .secondary, + .section-parent .segment:nth-child(4n) { + .inline-end-column(); + } +} + + /* Sprites & Icons */ .more { .inline-block(); - .icon-right(2, 1, 6px, 11px, 10px, 0, 4px); -} - -.nav li { - padding-top: 10px; - padding-bottom: 10px; - .icon-left(0, 0, 28px, 28px, 10px, 0, 2px); + .right-icon(2, 1, 6px, 11px, 10px, 0, 4px); } -.nav li.rockets { - .icon-left-pos(0,1); -} - -.nav li.runners { - .icon-left-pos(1,0); -} - -.nav li.ghosts { - .icon-left-pos(1,1); +.icon-nav { + a { + .inline-block(); + padding-top: 10px; + padding-bottom: 10px; + .icon(0, 0, 28px, 28px, 10px, 0, 2px); + } + .robots a { + .icon-pos(0,0); + &:hover { + .icon-pos(1,0); + } + } + .rockets a { + .icon-pos(0,1); + &:hover { + .icon-pos(1,1); + } + } + .runners a { + .icon-pos(0,2); + &:hover { + .icon-pos(1,2); + } + } + .ghosts a { + .icon-pos(0,3); + &:hover { + .icon-pos(1,3); + } + } } /* Other Helpers */ diff --git a/examples/grids.html b/examples/grids.html index d9d0ae4..3a52e7f 100644 --- a/examples/grids.html +++ b/examples/grids.html @@ -2,7 +2,8 @@ - + + @@ -72,6 +73,26 @@ +
+ +
+

primary

+
+ +
+

secondary

+
+ +
+

tertiary

+
+ +
+

quaternary

+
+ +
+
@@ -130,6 +151,27 @@
+
+ +
+

primary

+
+ +
+

secondary

+
+ +
+

tertiary

+
+ +
+

quaternary

+
+ +
+ + diff --git a/examples/index.html b/examples/index.html index e688c50..4fbb1cd 100644 --- a/examples/index.html +++ b/examples/index.html @@ -2,6 +2,7 @@ + @@ -11,12 +12,20 @@ -

ClearLESS Examples

+
+

ClearLESS Examples

+
+ +
- + + +
diff --git a/examples/nested-grids.html b/examples/nested-grids.html index 7c9b4b6..dd20607 100644 --- a/examples/nested-grids.html +++ b/examples/nested-grids.html @@ -2,6 +2,7 @@ + @@ -75,5 +76,65 @@ +
+ +

Inline

+ +
+ +
+

primary

+
+ +
+

secondary

+
+ +
+

tertiary

+
+ +
+

quaternary

+
+ +
+ + +
+ +
+

primary

+
+ +
+ +
+ +
+

primary

+
+ +
+

secondary

+
+ +
+

tertiary

+
+ +
+

quaternary

+
+ +
+ +
+ +
+ +
+ + diff --git a/examples/other.html b/examples/other.html new file mode 100644 index 0000000..b992a88 --- /dev/null +++ b/examples/other.html @@ -0,0 +1,28 @@ + + + + + + + + + + ClearLESS Examples + + + +
+ +

Other Examples

+ +
+ + +
+ + + +
+ + + diff --git a/examples/sprite.png b/examples/sprite.png index 46bebccb27f70ce4e2be8ffbe04c230c6ccc24c8..9d704cb274825d238250f37e5a72a44e7602e92a 100644 GIT binary patch delta 2566 zcmV+h3iEnxP#GRhIwL1;@@Wy(0kE=}Sy!GRbz1-JSK z(DO)-PP)@{e0M%QpZ71(`DL9??|h%HzV|FCN(9|?b)^)VVQA&fh_ip;(miiIp7RHY z?YdUEGpJ#ZCI7h%ufBZG^z_~l zl)$>*i!a~foAQ`xd3^XzOL&`sq8asixj<1hN;S3QpSi<__D+W!n3-j=TKnF1=aO$T zP>iO_X&Ob(&~$^N7Z-oL>cowsJH9g`!s@`GmhY<7n*H&sZoj0@JpgE+itD09&Je1K z>soc>;_%5Mu7;cOL!KE27a&6slBR9om9X@=x zb=|?%tca>Z*Zt}be_p)pJxUT^Vjd2 z@nhZ*J>aC19=Lk#x_jJR`Ru%hXK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

+ +

Read more

-
+ +
+ +
  • Robots
  • Rockets
  • Runners
  • diff --git a/mixins/grids.less b/mixins/grids.less index c3fc76a..e11829a 100644 --- a/mixins/grids.less +++ b/mixins/grids.less @@ -21,6 +21,10 @@ float: right; } +.inline-end-column() { + margin-right: 0; +} + .span( @span ) { .column-width(@span, @total-columns); @@ -88,6 +92,33 @@ } +.pre-pad( @span ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + padding-left: @calc-column-width; +} + +.post-pad( @span ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + padding-right: @calc-column-width; +} + +.pre-push( @span ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + margin-left: @calc-column-width; +} + +.post-push( @span ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)+@gutter-width) / @grid-width); + margin-right: @calc-column-width; +} + +.post-push-end( @span ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + margin-right: @calc-column-width; +} + + + .column-width(@span, @total-columns:@total-columns) { @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)-@gutter-width) / @grid-width); width: @calc-column-width; diff --git a/mixins/helpers.less b/mixins/helpers.less index 7e1fdec..25e6efe 100644 --- a/mixins/helpers.less +++ b/mixins/helpers.less @@ -13,7 +13,14 @@ } } -.font-size-ems(@target-px-size, @context-px-size:@base-font-size-px) { +.font-size-rems(@px-size, @context-px-size:@base-font-size){ + @rem-value: @px-size; + @px-value: (@px-size * @context-px-size); + font-size: ~"@{px-value}px"; + font-size: ~"@{rem-value}rem"; +} + +.font-size-ems(@target-px-size, @context-px-size:@base-font-size) { font-size: (@target-px-size / @context-px-size) * 1em; } diff --git a/mixins/settings.less b/mixins/settings.less index 6ab6d08..5048516 100644 --- a/mixins/settings.less +++ b/mixins/settings.less @@ -9,7 +9,7 @@ @using-ieclasses: true; // whether or not the markup has html5-boilerplate style IE classes in it or not @using-modernizr: false; // whether or not modernizer feature-detection classes are being used -@base-font-size-px: 16; // base pixel font size. Used as a default for px-em conversions +@base-font-size: 16; // base pixel font size. Used as a default for px-em conversions // Sprites -------------------------------- diff --git a/mixins/sprites.less b/mixins/sprites.less index 00290d3..a4ac861 100644 --- a/mixins/sprites.less +++ b/mixins/sprites.less @@ -32,7 +32,7 @@ // These can only be used on block or inline-block elements. // ============================================== -.icon-left(@x, @y, @width, @height, @pad:10, @nudge-left:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { +.icon(@x, @y, @width, @height, @pad:10, @nudge-left:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { .generatedcontent & { position: relative; padding-left: (@width + @pad) * 1px; @@ -44,7 +44,7 @@ } } -.icon-left(@x, @y, @width, @height, @pad:10, @nudge-left:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr = false) { +.icon(@x, @y, @width, @height, @pad:10, @nudge-left:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr = false) { position: relative; padding-left: (@width + @pad) * 1px; &:before { @@ -54,7 +54,7 @@ } } -.icon-right(@x, @y, @width, @height, @pad:10, @nudge-right:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { +.right-icon(@x, @y, @width, @height, @pad:10, @nudge-right:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { .generatedcontent & { padding-right: (@width + @pad) * 1px; position: relative; @@ -66,7 +66,7 @@ } } -.icon-right(@x, @y, @width, @height, @pad:10, @nudge-right:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr = false) { +.right-icon(@x, @y, @width, @height, @pad:10, @nudge-right:0, @nudge-top:0, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr = false) { position: relative; padding-right: (@width + @pad) * 1px; &:before { @@ -76,7 +76,7 @@ } } -.icon-left-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { +.icon-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { .generatedcontent &:before { .sprite-pos(@x, @y, @sprite-grid); .nudge-l(@nudge-left); @@ -84,7 +84,7 @@ } } -.icon-left-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) { +.icon-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) { &:before { .sprite-pos(@x, @y, @sprite-grid); .nudge-l(@nudge-left); @@ -92,7 +92,7 @@ } } -.icon-right-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { +.right-icon-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { .generatedcontent &:before { .sprite-pos(@x, @y, @sprite-grid); .nudge-r(@nudge-right); @@ -100,7 +100,7 @@ } } -.icon-right-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) { +.right-icon-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) { &:before { .sprite-pos(@x, @y, @sprite-grid); .nudge-r(@nudge-right);