diff --git a/0.1' b/0.1' deleted file mode 100644 index e69de29..0000000 diff --git a/sass/_forms.scss b/sass/_forms.scss index b95fba6..3cf2176 100644 --- a/sass/_forms.scss +++ b/sass/_forms.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==forms */ -/* ----------------------------- */ +/*----------------------------*\ + * Forms * +\*----------------------------*/ /** * Thanks to HTML5boilerplate @@ -38,6 +38,9 @@ textarea { @include inline-block(); } +/** + * Alternative classes + */ .btn.alternate {} .btn.highlight {} .login {} diff --git a/sass/_grids.scss b/sass/_grids.scss index f6e38a6..88531db 100644 --- a/sass/_grids.scss +++ b/sass/_grids.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==grids */ -/* ----------------------------- */ +/*----------------------------*\ + * Grids * +\*----------------------------*/ /** * Equal grids with 2% gutter diff --git a/sass/_helpers.scss b/sass/_helpers.scss index 6665079..2008f72 100644 --- a/sass/_helpers.scss +++ b/sass/_helpers.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==helpers */ -/* ----------------------------- */ +/*----------------------------*\ + * Helpers * +\*----------------------------*/ /** * .{SIZE}-hidden and .{SIZE}-visible helpers @@ -65,3 +65,22 @@ $breakpoints: large, small, tiny; hyphens: auto; } +/** + * Skip links + */ +.skip-links { + position: absolute; + + a { + position: absolute; + left: -7000px; + padding: 0.5em; + background: #000; + color:#fff; + text-decoration: none; + + &:focus { + position: static; + } + } +} \ No newline at end of file diff --git a/sass/_icons.scss b/sass/_icons.scss index 9daea39..79f6c1f 100644 --- a/sass/_icons.scss +++ b/sass/_icons.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==icons */ -/* ----------------------------- */ +/*----------------------------*\ + * Icons * +\*----------------------------*/ .icon { @include inline-block(); diff --git a/sass/_iefix.scss b/sass/_iefix.scss index daacddf..ac04549 100644 --- a/sass/_iefix.scss +++ b/sass/_iefix.scss @@ -1,10 +1,18 @@ -/* HasLayout for IE6/IE7 */ +/*----------------------------*\ + * IE Fix * +\*----------------------------*/ + +/** + * HasLayout for IE6/IE7 + */ @if $legacy-support-for-ie { .row, .col { *zoom: 1; } - /* Warning: .col needs a width on IE6/IE7 */ + /** + * Warning: .col needs a width on IE6/IE7 + */ .col { *display: inline; *zoom: 1; diff --git a/sass/_layout.scss b/sass/_layout.scss index 42d84e4..dd212c0 100644 --- a/sass/_layout.scss +++ b/sass/_layout.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==layouts */ -/* ----------------------------- */ +/*----------------------------*\ + * Layout * +\*----------------------------*/ /** * Switching box-model for all elements @@ -176,10 +176,10 @@ img.right { margin-bottom: 5px; } .w300p { width: 300px; } .w400p { width: 400px; } .w500p { width: 500px; } -.w600p { width: 600px; @extend %width-helper; } -.w700p { width: 700px; @extend %width-helper; } -.w800p { width: 800px; @extend %width-helper; } -.w960p { width: 960px; @extend %width-helper; } +.w600p { width: 600px; @extend %width-helper; } +.w700p { width: 700px; @extend %width-helper; } +.w800p { width: 800px; @extend %width-helper; } +.w960p { width: 960px; @extend %width-helper; } .mw960p { max-width: 960px; } /** diff --git a/sass/_messages.scss b/sass/_messages.scss new file mode 100644 index 0000000..05dd62c --- /dev/null +++ b/sass/_messages.scss @@ -0,0 +1,45 @@ +/*----------------------------*\ + * Messages * +\*----------------------------*/ + +/** + * Shared classes between all types of messages + */ +%message { + padding: .5em; + border-radius: .1em; + border: 1px solid; + text-shadow: 0 1px 0 rgba(white, .2); +} + +/** + * Color scheming based on a single color + */ +@mixin message-scheme($color) { + color: $color; + background: lighten($color, 38%); + border-color: lighten(adjust-hue($color, -10), 20%); +} + +/** + * Message types + */ +.message-error { + @extend %message; + @include message-scheme(#b94a48); +} + +.message-ok { + @extend %message; + @include message-scheme(#468847); +} + +.message-warning { + @extend %message; + @include message-scheme(#c09853); +} + +.message-info { + @extend %message; + @include message-scheme(#3a87ad); +} \ No newline at end of file diff --git a/sass/_mixins.scss b/sass/_mixins.scss index 54db313..107d1d5 100644 --- a/sass/_mixins.scss +++ b/sass/_mixins.scss @@ -1,9 +1,9 @@ -/* ----------------------------- */ -/* ==mixins */ -/* ----------------------------- */ +/*----------------------------*\ + * Mixins * +\*----------------------------*/ /** - * Mixin to handle media queries breakpoints + * Mixin to handle media queries and retina */ @mixin mq($keyword) { @if $keyword == large { @@ -57,4 +57,14 @@ zoom: 1; *display: inline; } +} + +/** + * Mixin to prefix properties + */ +@mixin prefix($property, $value) { + $vendors: "-webkit-", "-moz-", "-ms-", "-o-", ""; + @each $v in $vendors { + #{$v}#{$property}: $value; + } } \ No newline at end of file diff --git a/sass/_print.scss b/sass/_print.scss index 20afdf1..5a09308 100644 --- a/sass/_print.scss +++ b/sass/_print.scss @@ -1,6 +1,6 @@ -/* ----------------------------- */ -/* ==print */ -/* ----------------------------- */ +/*----------------------------*\ + * Print stylesheet * +\*----------------------------*/ @media print { * { @@ -36,11 +36,7 @@ * Try turning images to black and white if supported filters */ img { - -webkit-filter: grayscale(100%); - -moz-filter: grayscale(100%); - -ms-filter: grayscale(100%); - -o-filter: grayscale(100%); - filter: grayscale(100%); + @include prefix(filter, grayscale(100%)); } /** diff --git a/sass/_reset.scss b/sass/_reset.scss index dd6f891..d45e8d0 100644 --- a/sass/_reset.scss +++ b/sass/_reset.scss @@ -1,10 +1,7 @@ -/* ----------------------------- */ -/* ==reset */ -/* ----------------------------- */ +/*----------------------------*\ + * Soft reset * +\*----------------------------*/ -/** - * Soft reset - */ html, body, textarea, figure, label { @@ -20,8 +17,7 @@ ul, ol { } } -code, pre, -samp, kbd { +code, pre, samp, kbd { white-space: pre-wrap; font-family: consolas, 'DejaVu Sans Mono', courier, monospace; line-height: 1em; @@ -55,8 +51,7 @@ mark { background: #ff0; } -sup, -sub { +sup, sub { vertical-align: 0; position: relative; } @@ -69,10 +64,6 @@ sub { top: .5ex; } -table { - margin-bottom: 1.5em; -} - /** * Avoid top margins on first content element */ @@ -124,6 +115,17 @@ img { } } +/** + * Hide script and style tags in case of table mode + */ +body > script, +body > style { + display: none !important; +} + +/** + * Force word wrapping on small screens + */ @include mq(small) { div, textarea, table, td, th, @@ -135,49 +137,4 @@ img { -moz-hyphens: auto; hyphens: auto; } -} - -/** - * Hide script and style tags in case of table mode - */ -body > script, -body > style { - display: none !important; -} - - -/* skip-links */ -.skip-links { - position: absolute; - - a { - position: absolute; - left: -7000px; - padding: 0.5em; - background: #000; - color:#fff; - text-decoration: none; - - &:focus { - position: static; - } - } -} - -/* Quick print reset */ -@media print { - p, blockquote { - orphans: 2; - widows: 2; - } - - blockquote, - ul, ol { - page-break-inside: avoid; - } - - h1, h2, h3, - caption { - page-break-after: avoid; - } } \ No newline at end of file diff --git a/sass/_rwd.scss b/sass/_rwd.scss index 105e956..4eb8706 100644 --- a/sass/_rwd.scss +++ b/sass/_rwd.scss @@ -26,14 +26,6 @@ zoom: 1.0; } -@include mq(medium) { - /* Big resources like background-images, font-faces, etc. */ -} - -@include mq(retina) { - /* Retina-specific stuff here */ -} - /* ---------------------------------- */ /* ==Responsive large / small / tiny */ /* ---------------------------------- */ diff --git a/sass/_tables.scss b/sass/_tables.scss index ba27d81..9d1b1de 100644 --- a/sass/_tables.scss +++ b/sass/_tables.scss @@ -1,8 +1,8 @@ -/* ----------------------------- */ -/* ==tables */ -/* ----------------------------- */ +/*----------------------------*\ + * Tables * +\*----------------------------*/ -$border: 1px solid #ccc; +$border: 1px solid #ccc; // Default border style for all tables table, .table { @@ -12,8 +12,18 @@ table, vertical-align: top; } +/** + * 1. Prevent reCAPTCHA from exploding + * See: https://github.com/raphaelgoetter/KNACSS/issues/18 + */ table { width: 100%; + border: $border; + margin-bottom: 1.5em; + + &#recaptcha_table { + table-layout: auto; /* 1 */ + } } .table { @@ -26,13 +36,12 @@ caption { font-style: italic; } -table { - border: $border; -} - +/** + * Remove thead on tiny screens + */ thead { @include mq(tiny) { - display: none; + display: none; /* 1 */ } } diff --git a/sass/_typography.scss b/sass/_typography.scss index a6694bb..92c09e6 100644 --- a/sass/_typography.scss +++ b/sass/_typography.scss @@ -7,17 +7,19 @@ * 2. Orientation iOS font-size fix */ html { - font-size: 62.5%; /* 1 */ + font: 62.5%/1.5 "Century Gothic", helvetica, arial, sans-serif; /* 1 */ + color: #000; + @media (orientation: landscape) and (max-device-width: 768px) { -webkit-text-size-adjust: 100%; /* 2 */ } } +/** + * 1. Put the base font-size at 14px (1.4rem) + */ body { - color: #000; - font-family: "Century Gothic", helvetica, arial, sans-serif; - @include rem(14); - line-height: 1.5; + @include rem(14); /* 1 */ } /** diff --git a/sass/knacss.scss b/sass/knacss.scss index 283c5cc..639cb90 100644 --- a/sass/knacss.scss +++ b/sass/knacss.scss @@ -1,7 +1,10 @@ -/* -* www.KNACSS.com V2.6d @author: Raphael Goetter, Alsacreations -* Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ -*/ +/** + * www.KNACSS.com V2.6d @author: Raphael Goetter, Alsacreations + * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ + * + * Sass version maintained by @HugoGiraudel + * Please report any bug or suggestion + */ /** * Enable support for old browsers @@ -14,14 +17,15 @@ $legacy-support-for-mozilla: true; /* 2 */ /** * Import modules of your choice */ -@import "mixins"; -@import "helpers"; -@import "forms"; -@import "icons"; -@import "print"; -@import "tables"; -@import "grids"; -@import "layout"; -@import "typography"; -@import "iefix"; -@import "reset"; \ No newline at end of file +@import "mixins"; // Sass only +@import "reset"; // Home made reset +@import "helpers"; // A couple of helper classes and Sass placeholders +@import "layout"; // Everything to layout your pages +@import "grids"; // Small grid system +@import "typography"; // Typography baseline and vertical rythm +@import "tables"; // Tables +@import "forms"; // Forms +@import "icons"; // Icons (unicode based) and bullets +@import "messages"; // Message system +@import "iefix"; // Some IE fixes +@import "print"; // Print stylesheet