booleans variables added

This commit is contained in:
Raphael Goetter 2014-04-20 20:34:39 +02:00
parent a20f157800
commit dfbaaca2a5
8 changed files with 394 additions and 350 deletions

View file

@ -141,47 +141,12 @@ kbd {
font-family: Consolas, 'DejaVu Sans Mono', Courier, monospace; font-family: Consolas, 'DejaVu Sans Mono', Courier, monospace;
line-height: normal; line-height: normal;
} }
code,
kbd,
mark {
border-radius: 2px;
}
em { em {
font-style: italic; font-style: italic;
} }
strong { strong {
font-weight: bold; font-weight: bold;
} }
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0, 0, 0, 0.04);
color: #b11;
}
pre code {
padding: none;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding: 2px 4px;
background: #ff0;
}
sup,
sub {
vertical-align: 0;
position: relative;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
/* ----------------------------- */ /* ----------------------------- */
/* == hiding content */ /* == hiding content */
/* ----------------------------- */ /* ----------------------------- */
@ -196,23 +161,6 @@ sub {
width: 1px; width: 1px;
} }
/* ----------------------------- */ /* ----------------------------- */
/* == skip links styling */
/* ----------------------------- */
.skip-links {
position: absolute;
}
.skip-links a {
position: absolute;
left: -7000px;
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
}
.skip-links a:focus {
position: static;
}
/* ----------------------------- */
/* == browsers consistency */ /* == browsers consistency */
/* ----------------------------- */ /* ----------------------------- */
/* avoid top margins on first content element */ /* avoid top margins on first content element */
@ -346,10 +294,6 @@ img.end {
.txtcenter { .txtcenter {
text-align: center; text-align: center;
} }
/* ----------------------------- */
/* == width helpers */
/* .. use only when needed */
/* ----------------------------- */
/* blocks widths (percentage and pixels) */ /* blocks widths (percentage and pixels) */
.w10 { .w10 {
width: 10%; width: 10%;
@ -438,15 +382,10 @@ img.end {
.wauto { .wauto {
width: auto; width: auto;
} }
/* ----------------------------- */
/* == spacing helpers */
/* .. use only when needed */
/* ----------------------------- */
/* spacing helpers /* spacing helpers
p,m = padding,margin p,m = padding,margin
a,t,r,b,l = all,top,right,bottom,left a,t,r,b,l = all,top,right,bottom,left
s,m,l,n = small(10px),medium(20px),large(30px),none(0) s,m,l,n = small, medium, large, none
source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css
*/ */
.m-reset, .m-reset,
.ma0 { .ma0 {
@ -609,62 +548,6 @@ source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css
padding-left: 4em; padding-left: 4em;
} }
/* ----------------------------- */ /* ----------------------------- */
/* == iefix */
/* ----------------------------- */
/* Make sure you are using Conditional Classes in your HTML */
/* see : http://www.alsacreations.com/astuce/lire/988-classes-conditionnelles-HTML.html */
.ie678 h1,
.ie678 .h1-like {
font-size: 2.28571429em;
}
.ie678 h2,
.ie678 .h2-like {
font-size: 2em;
}
.ie678 h3,
.ie678 .h3-like {
font-size: 1.71428571em;
}
.ie678 h4,
.ie678 .h4-like {
font-size: 1.42857143em;
}
.ie678 h5,
.ie678 .h5-like {
font-size: 1.28571429em;
}
.ie678 h6,
.ie678 .h6-like {
font-size: 1.14285714em;
}
/* hasLayout for IE6/IE7 */
.ie67 .clearfix,
.ie67 .line,
.ie67 .mod,
.ie67 .row,
.ie67 .col {
zoom: 1;
}
/* inline-block and table-cell for IE6/IE7 */
/* warning: .col needs width on IE6/IE7 */
.ie67 .btn,
.ie67 .col,
.ie67 .inbl {
display: inline;
zoom: 1;
}
.ie8 img {
width: auto;
/* @bugfix for IE8 */
}
/* Active box-sizing for IE6/IE7 */
/* @source https://github.com/Schepp/box-sizing-polyfill */
/*
.ie67 * {
behavior: url(/lib/box-sizing-polyfill/boxsizing.htc);
}
*/
/* ----------------------------- */
/* == quick print reset */ /* == quick print reset */
/* ----------------------------- */ /* ----------------------------- */
@media print { @media print {

View file

@ -100,18 +100,6 @@
display: table-cell !important; display: table-cell !important;
vertical-align: top !important; vertical-align: top !important;
} }
/* you shall not pass */
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
hyphens: auto;
}
/* widths for small screens */ /* widths for small screens */
.small-w25 { .small-w25 {
width: 25% !important; width: 25% !important;

141
css/09-booleans.css Normal file
View file

@ -0,0 +1,141 @@
code,
kbd,
mark {
border-radius: 2px;
}
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0, 0, 0, 0.04);
color: #b11;
}
pre code {
padding: none;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding: 2px 4px;
background: #ff0;
}
sup,
sub {
vertical-align: 0;
position: relative;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
blockquote {
margin-left: 0;
padding-left: 1em;
border-left: 4px solid rgba(0, 0, 0, 0.15);
font-style: italic;
}
q {
font-style: normal;
}
q,
.q {
quotes: "“\00a0" "\00a0”";
}
q:lang(fr),
.q:lang(fr) {
quotes: "«\00a0" "\00a0»";
}
hr {
display: block;
clear: both;
height: 1px;
margin: 1em 0 2em;
padding: 0;
border: 0;
color: #ccc;
background-color: #ccc;
}
.ie678 h1,
.ie678 .h1-like {
font-size: 2.28571429em;
}
.ie678 h2,
.ie678 .h2-like {
font-size: 2em;
}
.ie678 h3,
.ie678 .h3-like {
font-size: 1.71428571em;
}
.ie678 h4,
.ie678 .h4-like {
font-size: 1.42857143em;
}
.ie678 h5,
.ie678 .h5-like {
font-size: 1.28571429em;
}
.ie678 h6,
.ie678 .h6-like {
font-size: 1.14285714em;
}
.ie678 img {
width: auto;
/* @bugfix for IE8 */
}
/* hasLayout for IE6/IE7 */
.clearfix,
.line,
.mod,
.row,
.col {
*zoom: 1;
}
/* inline-block and table-cell for IE6/IE7 */
/* warning: .col needs width on IE6/IE7 */
.btn,
.col,
.inbl {
*display: inline;
*zoom: 1;
}
/* Active box-sizing for IE6/IE7 */
/* @source https://github.com/Schepp/box-sizing-polyfill */
/*
.ie67 * {
behavior: url(/lib/box-sizing-polyfill/boxsizing.htc);
}
*/
.skip-links {
position: absolute;
}
.skip-links a {
position: absolute;
left: -7000px;
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
}
.skip-links a:focus {
position: static;
}
@media (max-width: 480px) {
/* you shall not pass */
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
hyphens: auto;
}
}

View file

@ -1,5 +1,14 @@
// Config file : variables, mixins, ... // Config file : variables, mixins, ...
// booleans
@ie678 : true; // "true" to activate IE6/IE7/IE8 support
@styling : true; // "true" to design basic elements like code, mark, blockquotes, etc.
@skip-links : true; // "true" to design skip links for accessibility concerns
@hyphens : true; // activate automatic hyphens on small screens
@helpers-width : true; // decide whether or not you need width helpers
@helpers-spacing : true; // decide whether or not you need spacing helpers
// font sizes // font sizes
@basefont : 14px; // if "14px" then 1em = 14px @basefont : 14px; // if "14px" then 1em = 14px
@lh : 1.5; // equiv line-height 1.5em @lh : 1.5; // equiv line-height 1.5em

View file

@ -126,46 +126,12 @@ kbd {
font-family: @fontstack2; font-family: @fontstack2;
line-height: normal; line-height: normal;
} }
code, kbd, mark {
border-radius: 2px;
}
em { em {
font-style: italic; font-style: italic;
} }
strong { strong {
font-weight: bold; font-weight: bold;
} }
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0,0,0,.04);
color: #b11;
}
pre code {
padding: none;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding:2px 4px;
background: #ff0;
}
sup,
sub {
vertical-align: 0;
position: relative;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
/* ----------------------------- */ /* ----------------------------- */
/* == hiding content */ /* == hiding content */
@ -180,29 +146,6 @@ sub {
height: 1px; width: 1px; height: 1px; width: 1px;
} }
/* ----------------------------- */
/* == skip links styling */
/* ----------------------------- */
.skip-links {
position: absolute;
a {
position: absolute;
left: -7000px;
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
&:focus {
position: static;
}
}
}
/* ----------------------------- */ /* ----------------------------- */
/* == browsers consistency */ /* == browsers consistency */
/* ----------------------------- */ /* ----------------------------- */
@ -324,11 +267,8 @@ img.start, img.end {
.txtcenter { text-align: center; } .txtcenter { text-align: center; }
/* ----------------------------- */ // width helpers boolean
/* == width helpers */ & when (@helpers-width = true) {
/* .. use only when needed */
/* ----------------------------- */
/* blocks widths (percentage and pixels) */ /* blocks widths (percentage and pixels) */
.w10 { width: 10%; } .w10 { width: 10%; }
.w20 { width: 20%; } .w20 { width: 20%; }
@ -360,18 +300,15 @@ img.start, img.end {
.w1140p { width: 1140px; } .w1140p { width: 1140px; }
.mw1140p { max-width: 1140px; } .mw1140p { max-width: 1140px; }
.wauto { width: auto; } .wauto { width: auto; }
}
/* ----------------------------- */ // spacing helpers boolean
/* == spacing helpers */ & when (@helpers-spacing = true) {
/* .. use only when needed */
/* ----------------------------- */
/* spacing helpers /* spacing helpers
p,m = padding,margin p,m = padding,margin
a,t,r,b,l = all,top,right,bottom,left a,t,r,b,l = all,top,right,bottom,left
s,m,l,n = small(10px),medium(20px),large(30px),none(0) s,m,l,n = small, medium, large, none
source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css
*/ */
.m-reset, .ma0 { margin: 0; } .m-reset, .ma0 { margin: 0; }
.p-reset, .pa0 { padding: 0; } .p-reset, .pa0 { padding: 0; }
@ -415,63 +352,7 @@ source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css
.pl1, .pls { padding-left: @small-value; } .pl1, .pls { padding-left: @small-value; }
.pl2, .plm { padding-left: @medium-value; } .pl2, .plm { padding-left: @medium-value; }
.pl3, .pll { padding-left: @large-value; } .pl3, .pll { padding-left: @large-value; }
/* ----------------------------- */
/* == iefix */
/* ----------------------------- */
/* Make sure you are using Conditional Classes in your HTML */
/* see : http://www.alsacreations.com/astuce/lire/988-classes-conditionnelles-HTML.html */
.ie678 h1, .ie678 .h1-like {
.em(@h1-size);
} }
.ie678 h2, .ie678 .h2-like {
.em(@h2-size);
}
.ie678 h3, .ie678 .h3-like {
.em(@h3-size);
}
.ie678 h4, .ie678 .h4-like {
.em(@h4-size);
}
.ie678 h5, .ie678 .h5-like {
.em(@h5-size);
}
.ie678 h6, .ie678 .h6-like {
.em(@h6-size);
}
/* hasLayout for IE6/IE7 */
.ie67 .clearfix,
.ie67 .line,
.ie67 .mod,
.ie67 .row,
.ie67 .col {
zoom: 1;
}
/* inline-block and table-cell for IE6/IE7 */
/* warning: .col needs width on IE6/IE7 */
.ie67 .btn,
.ie67 .col,
.ie67 .inbl {
display: inline;
zoom: 1;
}
.ie8 img {
width: auto; /* @bugfix for IE8 */
}
/* Active box-sizing for IE6/IE7 */
/* @source https://github.com/Schepp/box-sizing-polyfill */
/*
.ie67 * {
behavior: url(/lib/box-sizing-polyfill/boxsizing.htc);
}
*/
/* ----------------------------- */ /* ----------------------------- */
/* == quick print reset */ /* == quick print reset */

View file

@ -87,12 +87,6 @@
vertical-align: top !important; vertical-align: top !important;
} }
/* you shall not pass */
div, textarea, table, td, th, code, pre, samp {
word-wrap: break-word;
hyphens: auto;
}
/* widths for small screens */ /* widths for small screens */
.small-w25 { width: 25% !important; } .small-w25 { width: 25% !important; }
.small-w33 { width: 33.3333% !important; } .small-w33 { width: 33.3333% !important; }

147
less/09-booleans.less Normal file
View file

@ -0,0 +1,147 @@
@import "00-config";
// Styling boolean
& when (@styling = true) {
code, kbd, mark {
border-radius: 2px;
}
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0,0,0,.04);
color: #b11;
}
pre code {
padding: none;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding:2px 4px;
background: #ff0;
}
sup,
sub {
vertical-align: 0;
position: relative;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
blockquote {
margin-left: 0;
padding-left: 1em;
border-left: 4px solid rgba(0,0,0,.15);
font-style: italic;
}
q {
font-style: normal;
}
q,
.q {
quotes: "“\00a0" "\00a0”";
}
q:lang(fr),
.q:lang(fr) {
quotes: "«\00a0" "\00a0»";
}
hr {
display: block;
clear: both;
height: 1px;
margin: 1em 0 2em;
padding: 0;
border: 0;
color: #ccc;
background-color: #ccc;
}
}
// IE6, 7, 8 support boolean
& when (@ie678 = true) {
.ie678 h1, .ie678 .h1-like {
.em(@h1-size);
}
.ie678 h2, .ie678 .h2-like {
.em(@h2-size);
}
.ie678 h3, .ie678 .h3-like {
.em(@h3-size);
}
.ie678 h4, .ie678 .h4-like {
.em(@h4-size);
}
.ie678 h5, .ie678 .h5-like {
.em(@h5-size);
}
.ie678 h6, .ie678 .h6-like {
.em(@h6-size);
}
.ie678 img {
width: auto; /* @bugfix for IE8 */
}
/* hasLayout for IE6/IE7 */
.clearfix,
.line,
.mod,
.row,
.col {
*zoom: 1;
}
/* inline-block and table-cell for IE6/IE7 */
/* warning: .col needs width on IE6/IE7 */
.btn,
.col,
.inbl {
*display: inline;
*zoom: 1;
}
/* Active box-sizing for IE6/IE7 */
/* @source https://github.com/Schepp/box-sizing-polyfill */
/*
.ie67 * {
behavior: url(/lib/box-sizing-polyfill/boxsizing.htc);
}
*/
}
// skip-links boolean
& when (@skip-links = true) {
.skip-links {
position: absolute;
a {
position: absolute;
left: -7000px;
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
&:focus {
position: static;
}
}
}
}
// hyphens boolean
& when (@hyphens = true) {
@media (max-width: @small-screen) {
/* you shall not pass */
div, textarea, table, td, th, code, pre, samp {
word-wrap: break-word;
hyphens: auto;
}
}
}

View file

@ -12,6 +12,7 @@
@import "06-rwd"; @import "06-rwd";
@import "07-flexbox"; @import "07-flexbox";
@import "08-print"; @import "08-print";
@import "09-booleans";
/* ----------------------------- */ /* ----------------------------- */
/* ==own stylesheet */ /* ==own stylesheet */