diff --git a/README.md b/README.md index ee75b83..56d91a7 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ A minimal, responsive CSS framework to get you started. ## Components - **base**: normalize.css & basic typography `GZIPPED SIZE`: 1,183 bytes -- **button**: button styles `GZIPPED SIZE`: 334 bytes +- **button**: button styles `GZIPPED SIZE`: 443 bytes - **form**: coming soon -- **grid**: coming soon +- **grid**: default 12-column grid `GZIPPED SIZE`: 447 bytes - **nav**: coming soon - **table**: coming soon diff --git a/css/mini-base-button.css b/css/mini-base-button.css index 56d0717..4df6513 100644 --- a/css/mini-base-button.css +++ b/css/mini-base-button.css @@ -203,43 +203,44 @@ textarea { -webkit-appearance: button; font: inherit; } -.btn { +.btn, a.btn, a.btn:visited { border-radius: 4px; cursor: pointer; display: inline-block; margin: 2px 0; padding: 6px 12px; border: 0; + text-decoration: none; color: #2a2a2a; - background: #dbdbdb; } - .btn:hover, .btn:active, .btn:focus { - background: #eeeeee; } - .btn.disabled, .btn[disabled], .btnfieldset[disabled] { + background: #c2c2c2; } + .btn:hover, .btn:active, .btn:focus, a.btn:hover, a.btn:active, a.btn:focus, a.btn:visited:hover, a.btn:visited:active, a.btn:visited:focus { + background: #d5d5d5; } + .btn.disabled, .btn[disabled], .btnfieldset[disabled], a.btn.disabled, a.btn[disabled], a.btnfieldset[disabled], a.btn:visited.disabled, a.btn:visited[disabled], a.btn:visitedfieldset[disabled] { cursor: not-allowed; opacity: .65; } -.btn.btn-b { +.btn.blue, a.btn.blue, a.btn.blue:visited { color: #eeeeee; background: #3f84b3; } - .btn.btn-b:hover, .btn.btn-b:active, .btn.btn-b:focus { + .btn.blue:hover, .btn.blue:active, .btn.blue:focus, a.btn.blue:hover, a.btn.blue:active, a.btn.blue:focus, a.btn.blue:visited:hover, a.btn.blue:visited:active, a.btn.blue:visited:focus { background: #5597c3; } -.btn.btn-g { +.btn.green, a.btn.green, a.btn.green:visited { color: #eeeeee; background: #2db747; } - .btn.btn-g:hover, .btn.btn-g:active, .btn.btn-g:focus { + .btn.green:hover, .btn.green:active, .btn.green:focus, a.btn.green:hover, a.btn.green:active, a.btn.green:focus, a.btn.green:visited:hover, a.btn.green:visited:active, a.btn.green:visited:focus { background: #3bcf57; } -.btn.btn-r { +.btn.red, a.btn.red, a.btn.red:visited { color: #eeeeee; background: #ea4848; } - .btn.btn-r:hover, .btn.btn-r:active, .btn.btn-r:focus { + .btn.red:hover, .btn.red:active, .btn.red:focus, a.btn.red:hover, a.btn.red:active, a.btn.red:focus, a.btn.red:visited:hover, a.btn.red:visited:active, a.btn.red:visited:focus { background: #ee6a6a; } -.btn.btn-lg { +.btn.lg { padding: 9px 15px; font-size: 135%; } -.btn.btn-sm { +.btn.sm { padding: 4px 8px; font-size: 80%; } diff --git a/css/mini-base-button.min.css b/css/mini-base-button.min.css index c13464c..159161b 100644 --- a/css/mini-base-button.min.css +++ b/css/mini-base-button.min.css @@ -1 +1 @@ -html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#eee}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1,h2,h3,h4,h5,h6,hr{line-height:1.3;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,hr small{color:#484848;font-weight:200}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.8em}h6{font-size:.7em}small{font-size:75%}p,pre{margin:0 0 .6em}ol,ul{margin-top:0;margin-bottom:.6em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}hr{box-sizing:content-box;height:0;border:0;border-top:1px solid #c8c8c8}code,kbd,pre,samp{font-family:monospace;font-size:1em}code,pre{padding:2px 4px;background-color:#d8d8d8;border-radius:4px}kbd{padding:2px 4px;color:#eee;background-color:#2b2b2b;border-radius:4px}pre{display:block;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}a{background-color:transparent;-webkit-text-decoration-skip:objects;color:#2678b3}a:active,a:hover{outline-width:0;color:#3793d5}a:visited{color:#1d5c89}a:visited:active,a:visited:hover{color:#2678b3}figure{margin:1em 40px}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff3;color:#222}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}.hidden,[hidden],template{display:none}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:100%;line-height:1.3;margin:0}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner,html [type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring,html [type=button]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c8c8c8;border-radius:4px;margin:0 2px;padding:.35em .65em .75em}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}legend{color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.btn{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;color:#2a2a2a;background:#dbdbdb}.btn:active,.btn:focus,.btn:hover{background:#eee}.btn.disabled,.btn[disabled],.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.btn-b{color:#eee;background:#3f84b3}.btn.btn-b:active,.btn.btn-b:focus,.btn.btn-b:hover{background:#5597c3}.btn.btn-g{color:#eee;background:#2db747}.btn.btn-g:active,.btn.btn-g:focus,.btn.btn-g:hover{background:#3bcf57}.btn.btn-r{color:#eee;background:#ea4848}.btn.btn-r:active,.btn.btn-r:focus,.btn.btn-r:hover{background:#ee6a6a}.btn.btn-lg{padding:9px 15px;font-size:135%}.btn.btn-sm{padding:4px 8px;font-size:80%} \ No newline at end of file +html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#eee}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1,h2,h3,h4,h5,h6,hr{line-height:1.3;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,hr small{color:#484848;font-weight:200}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.8em}h6{font-size:.7em}small{font-size:75%}p,pre{margin:0 0 .6em}ol,ul{margin-top:0;margin-bottom:.6em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}hr{box-sizing:content-box;height:0;border:0;border-top:1px solid #c8c8c8}code,kbd,pre,samp{font-family:monospace;font-size:1em}code,pre{padding:2px 4px;background-color:#d8d8d8;border-radius:4px}kbd{padding:2px 4px;color:#eee;background-color:#2b2b2b;border-radius:4px}pre{display:block;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}a{background-color:transparent;-webkit-text-decoration-skip:objects;color:#2678b3}a:active,a:hover{outline-width:0;color:#3793d5}a:visited{color:#1d5c89}a:visited:active,a:visited:hover{color:#2678b3}figure{margin:1em 40px}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff3;color:#222}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}.hidden,[hidden],template{display:none}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:100%;line-height:1.3;margin:0}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner,html [type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring,html [type=button]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c8c8c8;border-radius:4px;margin:0 2px;padding:.35em .65em .75em}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}legend{color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.btn,a.btn,a.btn:visited{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;text-decoration:none;color:#2a2a2a;background:#c2c2c2}.btn:active,.btn:focus,.btn:hover,a.btn:active,a.btn:focus,a.btn:hover,a.btn:visited:active,a.btn:visited:focus,a.btn:visited:hover{background:#d5d5d5}.btn.disabled,.btn[disabled],.btnfieldset[disabled],a.btn.disabled,a.btn:visited.disabled,a.btn:visited[disabled],a.btn:visitedfieldset[disabled],a.btn[disabled],a.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.blue,a.btn.blue,a.btn.blue:visited{color:#eee;background:#3f84b3}.btn.blue:active,.btn.blue:focus,.btn.blue:hover,a.btn.blue:active,a.btn.blue:focus,a.btn.blue:hover,a.btn.blue:visited:active,a.btn.blue:visited:focus,a.btn.blue:visited:hover{background:#5597c3}.btn.green,a.btn.green,a.btn.green:visited{color:#eee;background:#2db747}.btn.green:active,.btn.green:focus,.btn.green:hover,a.btn.green:active,a.btn.green:focus,a.btn.green:hover,a.btn.green:visited:active,a.btn.green:visited:focus,a.btn.green:visited:hover{background:#3bcf57}.btn.red,a.btn.red,a.btn.red:visited{color:#eee;background:#ea4848}.btn.red:active,.btn.red:focus,.btn.red:hover,a.btn.red:active,a.btn.red:focus,a.btn.red:hover,a.btn.red:visited:active,a.btn.red:visited:focus,a.btn.red:visited:hover{background:#ee6a6a}.btn.lg{padding:9px 15px;font-size:135%}.btn.sm{padding:4px 8px;font-size:80%} \ No newline at end of file diff --git a/css/mini-button.css b/css/mini-button.css index 2497b53..0dbf59d 100644 --- a/css/mini-button.css +++ b/css/mini-button.css @@ -1,42 +1,43 @@ /* Base */ /* Button */ -.btn { +.btn, a.btn, a.btn:visited { border-radius: 4px; cursor: pointer; display: inline-block; margin: 2px 0; padding: 6px 12px; border: 0; + text-decoration: none; color: #2a2a2a; - background: #dbdbdb; } - .btn:hover, .btn:active, .btn:focus { - background: #eeeeee; } - .btn.disabled, .btn[disabled], .btnfieldset[disabled] { + background: #c2c2c2; } + .btn:hover, .btn:active, .btn:focus, a.btn:hover, a.btn:active, a.btn:focus, a.btn:visited:hover, a.btn:visited:active, a.btn:visited:focus { + background: #d5d5d5; } + .btn.disabled, .btn[disabled], .btnfieldset[disabled], a.btn.disabled, a.btn[disabled], a.btnfieldset[disabled], a.btn:visited.disabled, a.btn:visited[disabled], a.btn:visitedfieldset[disabled] { cursor: not-allowed; opacity: .65; } -.btn.btn-b { +.btn.blue, a.btn.blue, a.btn.blue:visited { color: #eeeeee; background: #3f84b3; } - .btn.btn-b:hover, .btn.btn-b:active, .btn.btn-b:focus { + .btn.blue:hover, .btn.blue:active, .btn.blue:focus, a.btn.blue:hover, a.btn.blue:active, a.btn.blue:focus, a.btn.blue:visited:hover, a.btn.blue:visited:active, a.btn.blue:visited:focus { background: #5597c3; } -.btn.btn-g { +.btn.green, a.btn.green, a.btn.green:visited { color: #eeeeee; background: #2db747; } - .btn.btn-g:hover, .btn.btn-g:active, .btn.btn-g:focus { + .btn.green:hover, .btn.green:active, .btn.green:focus, a.btn.green:hover, a.btn.green:active, a.btn.green:focus, a.btn.green:visited:hover, a.btn.green:visited:active, a.btn.green:visited:focus { background: #3bcf57; } -.btn.btn-r { +.btn.red, a.btn.red, a.btn.red:visited { color: #eeeeee; background: #ea4848; } - .btn.btn-r:hover, .btn.btn-r:active, .btn.btn-r:focus { + .btn.red:hover, .btn.red:active, .btn.red:focus, a.btn.red:hover, a.btn.red:active, a.btn.red:focus, a.btn.red:visited:hover, a.btn.red:visited:active, a.btn.red:visited:focus { background: #ee6a6a; } -.btn.btn-lg { +.btn.lg { padding: 9px 15px; font-size: 135%; } -.btn.btn-sm { +.btn.sm { padding: 4px 8px; font-size: 80%; } diff --git a/css/mini-button.min.css b/css/mini-button.min.css index 8738b4f..750bcab 100644 --- a/css/mini-button.min.css +++ b/css/mini-button.min.css @@ -1 +1 @@ -.btn{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;color:#2a2a2a;background:#dbdbdb}.btn:active,.btn:focus,.btn:hover{background:#eee}.btn.disabled,.btn[disabled],.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.btn-b{color:#eee;background:#3f84b3}.btn.btn-b:active,.btn.btn-b:focus,.btn.btn-b:hover{background:#5597c3}.btn.btn-g{color:#eee;background:#2db747}.btn.btn-g:active,.btn.btn-g:focus,.btn.btn-g:hover{background:#3bcf57}.btn.btn-r{color:#eee;background:#ea4848}.btn.btn-r:active,.btn.btn-r:focus,.btn.btn-r:hover{background:#ee6a6a}.btn.btn-lg{padding:9px 15px;font-size:135%}.btn.btn-sm{padding:4px 8px;font-size:80%} \ No newline at end of file +.btn,a.btn,a.btn:visited{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;text-decoration:none;color:#2a2a2a;background:#c2c2c2}.btn:active,.btn:focus,.btn:hover,a.btn:active,a.btn:focus,a.btn:hover,a.btn:visited:active,a.btn:visited:focus,a.btn:visited:hover{background:#d5d5d5}.btn.disabled,.btn[disabled],.btnfieldset[disabled],a.btn.disabled,a.btn:visited.disabled,a.btn:visited[disabled],a.btn:visitedfieldset[disabled],a.btn[disabled],a.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.blue,a.btn.blue,a.btn.blue:visited{color:#eee;background:#3f84b3}.btn.blue:active,.btn.blue:focus,.btn.blue:hover,a.btn.blue:active,a.btn.blue:focus,a.btn.blue:hover,a.btn.blue:visited:active,a.btn.blue:visited:focus,a.btn.blue:visited:hover{background:#5597c3}.btn.green,a.btn.green,a.btn.green:visited{color:#eee;background:#2db747}.btn.green:active,.btn.green:focus,.btn.green:hover,a.btn.green:active,a.btn.green:focus,a.btn.green:hover,a.btn.green:visited:active,a.btn.green:visited:focus,a.btn.green:visited:hover{background:#3bcf57}.btn.red,a.btn.red,a.btn.red:visited{color:#eee;background:#ea4848}.btn.red:active,.btn.red:focus,.btn.red:hover,a.btn.red:active,a.btn.red:focus,a.btn.red:hover,a.btn.red:visited:active,a.btn.red:visited:focus,a.btn.red:visited:hover{background:#ee6a6a}.btn.lg{padding:9px 15px;font-size:135%}.btn.sm{padding:4px 8px;font-size:80%} \ No newline at end of file diff --git a/css/mini-full.css b/css/mini-full.css index bcfd859..ee19a67 100644 --- a/css/mini-full.css +++ b/css/mini-full.css @@ -203,49 +203,77 @@ textarea { -webkit-appearance: button; font: inherit; } -.btn { +.btn, a.btn, a.btn:visited { border-radius: 4px; cursor: pointer; display: inline-block; margin: 2px 0; padding: 6px 12px; border: 0; + text-decoration: none; color: #2a2a2a; - background: #dbdbdb; } - .btn:hover, .btn:active, .btn:focus { - background: #eeeeee; } - .btn.disabled, .btn[disabled], .btnfieldset[disabled] { + background: #c2c2c2; } + .btn:hover, .btn:active, .btn:focus, a.btn:hover, a.btn:active, a.btn:focus, a.btn:visited:hover, a.btn:visited:active, a.btn:visited:focus { + background: #d5d5d5; } + .btn.disabled, .btn[disabled], .btnfieldset[disabled], a.btn.disabled, a.btn[disabled], a.btnfieldset[disabled], a.btn:visited.disabled, a.btn:visited[disabled], a.btn:visitedfieldset[disabled] { cursor: not-allowed; opacity: .65; } -.btn.btn-b { +.btn.blue, a.btn.blue, a.btn.blue:visited { color: #eeeeee; background: #3f84b3; } - .btn.btn-b:hover, .btn.btn-b:active, .btn.btn-b:focus { + .btn.blue:hover, .btn.blue:active, .btn.blue:focus, a.btn.blue:hover, a.btn.blue:active, a.btn.blue:focus, a.btn.blue:visited:hover, a.btn.blue:visited:active, a.btn.blue:visited:focus { background: #5597c3; } -.btn.btn-g { +.btn.green, a.btn.green, a.btn.green:visited { color: #eeeeee; background: #2db747; } - .btn.btn-g:hover, .btn.btn-g:active, .btn.btn-g:focus { + .btn.green:hover, .btn.green:active, .btn.green:focus, a.btn.green:hover, a.btn.green:active, a.btn.green:focus, a.btn.green:visited:hover, a.btn.green:visited:active, a.btn.green:visited:focus { background: #3bcf57; } -.btn.btn-r { +.btn.red, a.btn.red, a.btn.red:visited { color: #eeeeee; background: #ea4848; } - .btn.btn-r:hover, .btn.btn-r:active, .btn.btn-r:focus { + .btn.red:hover, .btn.red:active, .btn.red:focus, a.btn.red:hover, a.btn.red:active, a.btn.red:focus, a.btn.red:visited:hover, a.btn.red:visited:active, a.btn.red:visited:focus { background: #ee6a6a; } -.btn.btn-lg { +.btn.lg { padding: 9px 15px; font-size: 135%; } -.btn.btn-sm { +.btn.sm { padding: 4px 8px; font-size: 80%; } -.grid-container * { - box-sizing: border-box; } +/* + Mixin for responsive, mobile-first grid. + Parameters: + - $container-name : The class name of the container for the grid. + - $container-padding : The left and right padding of the container. [1] + - $row-name : The class name of the grid's rows. + - $col-name : The class name of the grid's columns. + - $col-number : The amount of columns in the grid. + - $xs-prefix : Class prefix for extra small screens. + - $sm-prefix : Class prefix for small screens. + - $md-prefix : Class prefix for medium screens. + - $lg-prefix : Class prefix for large screens. + - $hide-suffix : Class suffix for hidden columns. [2] + - $sm-breakpoint : Breakpoint for small screens. + - $md-breakpoint : Breakpoint for medium screens. + - $lg-breakpoint : Breakpoint for large screens. + Notes: + - [1] : The padding of the container might cause the page to grow by $container-padding to the right. This + can be fixed either via @media queries or setting the padding to 0. + - [2] : Columns with the $hide-suffix will be only hidden in the screen size specified. +*/ +.grid-container { + padding-right: 12px; + padding-left: 12px; + margin-right: auto; + margin-left: auto; + width: 100%; } + .grid-container * { + box-sizing: border-box; } .row:before, .row:after { content: ""; @@ -256,111 +284,179 @@ textarea { float: left; padding: 12px; } -.xs-3-1 { - width: 33.33333%; } +.xs-1 { + width: 8.33333%; } -.xs-3-2 { - width: 66.66667%; } +.xs-2 { + width: 16.66667%; } -.xs-3-3 { - width: 100%; } - -.xs-4-1 { +.xs-3 { width: 25%; } -.xs-4-2 { +.xs-4 { + width: 33.33333%; } + +.xs-5 { + width: 41.66667%; } + +.xs-6 { width: 50%; } -.xs-4-3 { +.xs-7 { + width: 58.33333%; } + +.xs-8 { + width: 66.66667%; } + +.xs-9 { width: 75%; } -.xs-4-4 { +.xs-10 { + width: 83.33333%; } + +.xs-11 { + width: 91.66667%; } + +.xs-12 { width: 100%; } +.sm-no, +.md-no, +.lg-no { + display: block; } + .xs-no { display: none; } -.sm-no, .md-no, .lg-no { - display: block; } - @media (min-width: 768px) { - .sm-3-1 { - width: 33.33333%; } + .sm-1 { + width: 8.33333%; } - .sm-3-2 { - width: 66.66667%; } + .sm-2 { + width: 16.66667%; } - .sm-3-3 { - width: 100%; } - - .sm-4-1 { + .sm-3 { width: 25%; } - .sm-4-2 { + .sm-4 { + width: 33.33333%; } + + .sm-5 { + width: 41.66667%; } + + .sm-6 { width: 50%; } - .sm-4-3 { + .sm-7 { + width: 58.33333%; } + + .sm-8 { + width: 66.66667%; } + + .sm-9 { width: 75%; } - .sm-4-4 { + .sm-10 { + width: 83.33333%; } + + .sm-11 { + width: 91.66667%; } + + .sm-12 { width: 100%; } + .xs-no, + .md-no, + .lg-no { + display: block; } + .sm-no { - display: none; } - - .xs-no, .md-no, .lg-no { - display: block; } } + display: none; } } @media (min-width: 1024px) { - .md-3-1 { - width: 33.33333%; } + .md-1 { + width: 8.33333%; } - .md-3-2 { - width: 66.66667%; } + .md-2 { + width: 16.66667%; } - .md-3-3 { - width: 100%; } - - .md-4-1 { + .md-3 { width: 25%; } - .md-4-2 { + .md-4 { + width: 33.33333%; } + + .md-5 { + width: 41.66667%; } + + .md-6 { width: 50%; } - .md-4-3 { + .md-7 { + width: 58.33333%; } + + .md-8 { + width: 66.66667%; } + + .md-9 { width: 75%; } - .md-4-4 { + .md-10 { + width: 83.33333%; } + + .md-11 { + width: 91.66667%; } + + .md-12 { width: 100%; } + .xs-no, + .sm-no, + .lg-no { + display: block; } + .md-no { - display: none; } - - .xs-no, .sm-no, .lg-no { - display: block; } } + display: none; } } @media (min-width: 1280px) { - .lg-3-1 { - width: 33.33333%; } + .lg-1 { + width: 8.33333%; } - .lg-3-2 { - width: 66.66667%; } + .lg-2 { + width: 16.66667%; } - .lg-3-3 { - width: 100%; } - - .lg-4-1 { + .lg-3 { width: 25%; } - .lg-4-2 { + .lg-4 { + width: 33.33333%; } + + .lg-5 { + width: 41.66667%; } + + .lg-6 { width: 50%; } - .lg-4-3 { + .lg-7 { + width: 58.33333%; } + + .lg-8 { + width: 66.66667%; } + + .lg-9 { width: 75%; } - .lg-4-4 { + .lg-10 { + width: 83.33333%; } + + .lg-11 { + width: 91.66667%; } + + .lg-12 { width: 100%; } - .lg-no { - display: none; } + .xs-no, + .sm-no, + .md-no { + display: block; } - .xs-no, .sm-no, .md-no { - display: block; } } + .lg-no { + display: none; } } diff --git a/css/mini-full.min.css b/css/mini-full.min.css index 86e20e3..a044188 100644 --- a/css/mini-full.min.css +++ b/css/mini-full.min.css @@ -1 +1 @@ -html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#eee}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1,h2,h3,h4,h5,h6,hr{line-height:1.3;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,hr small{color:#484848;font-weight:200}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.8em}h6{font-size:.7em}small{font-size:75%}p,pre{margin:0 0 .6em}ol,ul{margin-top:0;margin-bottom:.6em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}hr{box-sizing:content-box;height:0;border:0;border-top:1px solid #c8c8c8}code,kbd,pre,samp{font-family:monospace;font-size:1em}code,pre{padding:2px 4px;background-color:#d8d8d8;border-radius:4px}kbd{padding:2px 4px;color:#eee;background-color:#2b2b2b;border-radius:4px}pre{display:block;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}a{background-color:transparent;-webkit-text-decoration-skip:objects;color:#2678b3}a:active,a:hover{outline-width:0;color:#3793d5}a:visited{color:#1d5c89}a:visited:active,a:visited:hover{color:#2678b3}figure{margin:1em 40px}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff3;color:#222}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}.hidden,[hidden],template{display:none}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:100%;line-height:1.3;margin:0}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner,html [type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring,html [type=button]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c8c8c8;border-radius:4px;margin:0 2px;padding:.35em .65em .75em}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}legend{color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.btn{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;color:#2a2a2a;background:#dbdbdb}.btn:active,.btn:focus,.btn:hover{background:#eee}.btn.disabled,.btn[disabled],.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.btn-b{color:#eee;background:#3f84b3}.btn.btn-b:active,.btn.btn-b:focus,.btn.btn-b:hover{background:#5597c3}.btn.btn-g{color:#eee;background:#2db747}.btn.btn-g:active,.btn.btn-g:focus,.btn.btn-g:hover{background:#3bcf57}.btn.btn-r{color:#eee;background:#ea4848}.btn.btn-r:active,.btn.btn-r:focus,.btn.btn-r:hover{background:#ee6a6a}.btn.btn-lg{padding:9px 15px;font-size:135%}.btn.btn-sm{padding:4px 8px;font-size:80%}.grid-container *{box-sizing:border-box}.row:after,.row:before{content:"";display:table;clear:both}.col{float:left;padding:12px}.xs-3-1{width:33.33333%}.xs-3-2{width:66.66667%}.xs-3-3{width:100%}.xs-4-1{width:25%}.xs-4-2{width:50%}.xs-4-3{width:75%}.xs-4-4{width:100%}.xs-no{display:none}.lg-no,.md-no,.sm-no{display:block}@media (min-width:768px){.sm-3-1{width:33.33333%}.sm-3-2{width:66.66667%}.sm-3-3{width:100%}.sm-4-1{width:25%}.sm-4-2{width:50%}.sm-4-3{width:75%}.sm-4-4{width:100%}.sm-no{display:none}.lg-no,.md-no,.xs-no{display:block}}@media (min-width:1024px){.md-3-1{width:33.33333%}.md-3-2{width:66.66667%}.md-3-3{width:100%}.md-4-1{width:25%}.md-4-2{width:50%}.md-4-3{width:75%}.md-4-4{width:100%}.md-no{display:none}.lg-no,.sm-no,.xs-no{display:block}}@media (min-width:1280px){.lg-3-1{width:33.33333%}.lg-3-2{width:66.66667%}.lg-3-3{width:100%}.lg-4-1{width:25%}.lg-4-2{width:50%}.lg-4-3{width:75%}.lg-4-4{width:100%}.lg-no{display:none}.md-no,.sm-no,.xs-no{display:block}} \ No newline at end of file +html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#eee}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1,h2,h3,h4,h5,h6,hr{line-height:1.3;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,hr small{color:#484848;font-weight:200}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.8em}h6{font-size:.7em}small{font-size:75%}p,pre{margin:0 0 .6em}ol,ul{margin-top:0;margin-bottom:.6em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}hr{box-sizing:content-box;height:0;border:0;border-top:1px solid #c8c8c8}code,kbd,pre,samp{font-family:monospace;font-size:1em}code,pre{padding:2px 4px;background-color:#d8d8d8;border-radius:4px}kbd{padding:2px 4px;color:#eee;background-color:#2b2b2b;border-radius:4px}pre{display:block;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}a{background-color:transparent;-webkit-text-decoration-skip:objects;color:#2678b3}a:active,a:hover{outline-width:0;color:#3793d5}a:visited{color:#1d5c89}a:visited:active,a:visited:hover{color:#2678b3}figure{margin:1em 40px}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff3;color:#222}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}.hidden,[hidden],template{display:none}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:100%;line-height:1.3;margin:0}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner,html [type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring,html [type=button]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c8c8c8;border-radius:4px;margin:0 2px;padding:.35em .65em .75em}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}legend{color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.btn,a.btn,a.btn:visited{border-radius:4px;cursor:pointer;display:inline-block;margin:2px 0;padding:6px 12px;border:0;text-decoration:none;color:#2a2a2a;background:#c2c2c2}.btn:active,.btn:focus,.btn:hover,a.btn:active,a.btn:focus,a.btn:hover,a.btn:visited:active,a.btn:visited:focus,a.btn:visited:hover{background:#d5d5d5}.btn.disabled,.btn[disabled],.btnfieldset[disabled],a.btn.disabled,a.btn:visited.disabled,a.btn:visited[disabled],a.btn:visitedfieldset[disabled],a.btn[disabled],a.btnfieldset[disabled]{cursor:not-allowed;opacity:.65}.btn.blue,a.btn.blue,a.btn.blue:visited{color:#eee;background:#3f84b3}.btn.blue:active,.btn.blue:focus,.btn.blue:hover,a.btn.blue:active,a.btn.blue:focus,a.btn.blue:hover,a.btn.blue:visited:active,a.btn.blue:visited:focus,a.btn.blue:visited:hover{background:#5597c3}.btn.green,a.btn.green,a.btn.green:visited{color:#eee;background:#2db747}.btn.green:active,.btn.green:focus,.btn.green:hover,a.btn.green:active,a.btn.green:focus,a.btn.green:hover,a.btn.green:visited:active,a.btn.green:visited:focus,a.btn.green:visited:hover{background:#3bcf57}.btn.red,a.btn.red,a.btn.red:visited{color:#eee;background:#ea4848}.btn.red:active,.btn.red:focus,.btn.red:hover,a.btn.red:active,a.btn.red:focus,a.btn.red:hover,a.btn.red:visited:active,a.btn.red:visited:focus,a.btn.red:visited:hover{background:#ee6a6a}.btn.lg{padding:9px 15px;font-size:135%}.btn.sm{padding:4px 8px;font-size:80%}.grid-container{padding-right:12px;padding-left:12px;margin-right:auto;margin-left:auto;width:100%}.grid-container *{box-sizing:border-box}.row:after,.row:before{content:"";display:table;clear:both}.col{float:left;padding:12px}.xs-1{width:8.33333%}.xs-2{width:16.66667%}.xs-3{width:25%}.xs-4{width:33.33333%}.xs-5{width:41.66667%}.xs-6{width:50%}.xs-7{width:58.33333%}.xs-8{width:66.66667%}.xs-9{width:75%}.xs-10{width:83.33333%}.xs-11{width:91.66667%}.xs-12{width:100%}.lg-no,.md-no,.sm-no{display:block}.xs-no{display:none}@media (min-width:768px){.sm-1{width:8.33333%}.sm-2{width:16.66667%}.sm-3{width:25%}.sm-4{width:33.33333%}.sm-5{width:41.66667%}.sm-6{width:50%}.sm-7{width:58.33333%}.sm-8{width:66.66667%}.sm-9{width:75%}.sm-10{width:83.33333%}.sm-11{width:91.66667%}.sm-12{width:100%}.lg-no,.md-no,.xs-no{display:block}.sm-no{display:none}}@media (min-width:1024px){.md-1{width:8.33333%}.md-2{width:16.66667%}.md-3{width:25%}.md-4{width:33.33333%}.md-5{width:41.66667%}.md-6{width:50%}.md-7{width:58.33333%}.md-8{width:66.66667%}.md-9{width:75%}.md-10{width:83.33333%}.md-11{width:91.66667%}.md-12{width:100%}.lg-no,.sm-no,.xs-no{display:block}.md-no{display:none}}@media (min-width:1280px){.lg-1{width:8.33333%}.lg-2{width:16.66667%}.lg-3{width:25%}.lg-4{width:33.33333%}.lg-5{width:41.66667%}.lg-6{width:50%}.lg-7{width:58.33333%}.lg-8{width:66.66667%}.lg-9{width:75%}.lg-10{width:83.33333%}.lg-11{width:91.66667%}.lg-12{width:100%}.md-no,.sm-no,.xs-no{display:block}.lg-no{display:none}} \ No newline at end of file diff --git a/scss/mini-full.scss b/scss/mini-full.scss index 41e1647..8307511 100644 --- a/scss/mini-full.scss +++ b/scss/mini-full.scss @@ -1,4 +1,6 @@ @import 'mini/variables'; @import 'mini/base'; @import 'mini/button'; -@import 'mini/grid'; \ No newline at end of file +@import 'mini/grid'; +// Use grid mixin to create grid with default specs. +@include make-grid(grid-container, 12px, row, col, 12, 12px, xs, sm, md, lg, no, 768px, 1024px, 1280px); \ No newline at end of file diff --git a/scss/mini/_button.scss b/scss/mini/_button.scss index c448f46..2902613 100644 --- a/scss/mini/_button.scss +++ b/scss/mini/_button.scss @@ -6,13 +6,14 @@ } } -.btn{ +.btn, a.btn, a.btn:visited{ border-radius: 4px; cursor: pointer; display: inline-block; margin: 2px 0; padding: 6px 12px; border: 0; + text-decoration: none; @include btn-variant($btn-color, $btn-background-color); &.disabled, &[disabled], &fieldset[disabled]{ cursor: not-allowed; @@ -20,23 +21,24 @@ } } -.btn.btn-b{ + +.btn.blue, a.btn.blue, a.btn.blue:visited{ @include btn-variant($btn-color-alt, $btn-b-background-color); } -.btn.btn-g{ +.btn.green, a.btn.green, a.btn.green:visited{ @include btn-variant($btn-color-alt, $btn-g-background-color); } -.btn.btn-r{ +.btn.red, a.btn.red, a.btn.red:visited{ @include btn-variant($btn-color-alt, $btn-r-background-color); } -.btn.btn-lg{ +.btn.lg{ padding: 9px 15px; font-size: 135%; } -.btn.btn-sm{ +.btn.sm{ padding: 4px 8px; font-size: 80%; } \ No newline at end of file diff --git a/scss/mini/_grid.scss b/scss/mini/_grid.scss index ed1cc20..5babcf9 100644 --- a/scss/mini/_grid.scss +++ b/scss/mini/_grid.scss @@ -1,140 +1,112 @@ -.grid-container *{ - box-sizing: border-box; -} - -.row:before, .row:after { - content:""; - display: table ; - clear:both; -} - -.col{ - float: left; - padding: 12px; -} - -.xs-3-1{ - width: (100% / 3); -} -.xs-3-2{ - width: 2 * (100% / 3); -} -.xs-3-3{ - width: 3 * (100% / 3); -} - -.xs-4-1{ - width: (100% / 4); -} -.xs-4-2{ - width: 2 * (100% / 4); -} -.xs-4-3{ - width: 3 * (100% / 4); -} -.xs-4-4{ - width: 4 * (100% / 4); -} - -.xs-no{ - display: none; -} -.sm-no, .md-no, .lg-no{ - display: block; -} - -@media (min-width: 768px){ - .sm-3-1{ - width: (100% / 3); +/* + Mixin for responsive, mobile-first grid. + Parameters: + - $container-name : The class name of the container for the grid. + - $container-padding : The left and right padding of the container. [1] + - $row-name : The class name of the grid's rows. + - $col-name : The class name of the grid's columns. + - $col-number : The amount of columns in the grid. + - $xs-prefix : Class prefix for extra small screens. + - $sm-prefix : Class prefix for small screens. + - $md-prefix : Class prefix for medium screens. + - $lg-prefix : Class prefix for large screens. + - $hide-suffix : Class suffix for hidden columns. [2] + - $sm-breakpoint : Breakpoint for small screens. + - $md-breakpoint : Breakpoint for medium screens. + - $lg-breakpoint : Breakpoint for large screens. + Notes: + - [1] : The padding of the container might cause the page to grow by $container-padding to the right. This + can be fixed either via @media queries or setting the padding to 0. + - [2] : Columns with the $hide-suffix will be only hidden in the screen size specified. +*/ +@mixin make-grid( $container-name, $container-padding, + $row-name, $col-name, $col-number, $col-padding, + $xs-prefix, $sm-prefix, $md-prefix, $lg-prefix, $hide-suffix, + $sm-breakpoint, $md-breakpoint, $lg-breakpoint ){ + // Container + .#{$container-name}{ + padding-right: $container-padding; + padding-left: $container-padding; + margin-right: auto; + margin-left: auto; + width: 100%; + *{ + box-sizing: border-box; + } } - .sm-3-2{ - width: 2 * (100% / 3); + // Row + .#{$row-name}{ + &:before, &:after{ + content: ""; + display: table; + clear: both; + } } - .sm-3-3{ - width: 3 * (100% / 3); + // Column + .#{$col-name}{ + float: left; + padding: $col-padding; } - - .sm-4-1{ - width: (100% / 4); + // Extra small screen + @for $i from 1 through $col-number{ + .#{$xs-prefix}-#{$i}{ + width: #{($i * 100% / $col-number)}; + } } - .sm-4-2{ - width: 2 * (100% / 4); - } - .sm-4-3{ - width: 3 * (100% / 4); - } - .sm-4-4{ - width: 4 * (100% / 4); - } - - .sm-no{ - display: none; - } - .xs-no, .md-no, .lg-no{ + .#{$sm-prefix}-#{$hide-suffix}, + .#{$md-prefix}-#{$hide-suffix}, + .#{$lg-prefix}-#{$hide-suffix}{ display: block; } -} - -@media (min-width: 1024px){ - .md-3-1{ - width: (100% / 3); - } - .md-3-2{ - width: 2 * (100% / 3); - } - .md-3-3{ - width: 3 * (100% / 3); - } - - .md-4-1{ - width: (100% / 4); - } - .md-4-2{ - width: 2 * (100% / 4); - } - .md-4-3{ - width: 3 * (100% / 4); - } - .md-4-4{ - width: 4 * (100% / 4); - } - - .md-no{ + .#{$xs-prefix}-#{$hide-suffix}{ display: none; } - .xs-no, .sm-no, .lg-no{ - display: block; - } -} - -@media (min-width: 1280px){ - .lg-3-1{ - width: (100% / 3); + // Small screen + @media (min-width: $sm-breakpoint){ + @for $i from 1 through $col-number{ + .#{$sm-prefix}-#{$i}{ + width: #{($i * 100% / $col-number)}; + } + } + .#{$xs-prefix}-#{$hide-suffix}, + .#{$md-prefix}-#{$hide-suffix}, + .#{$lg-prefix}-#{$hide-suffix}{ + display: block; + } + .#{$sm-prefix}-#{$hide-suffix}{ + display: none; + } } - .lg-3-2{ - width: 2 * (100% / 3); + // Medium screen + @media (min-width: $md-breakpoint){ + @for $i from 1 through $col-number{ + .#{$md-prefix}-#{$i}{ + width: #{($i * 100% / $col-number)}; + } + } + .#{$xs-prefix}-#{$hide-suffix}, + .#{$sm-prefix}-#{$hide-suffix}, + .#{$lg-prefix}-#{$hide-suffix}{ + display: block; + } + .#{$md-prefix}-#{$hide-suffix}{ + display: none; + } } - .lg-3-3{ - width: 3 * (100% / 3); - } - - .lg-4-1{ - width: (100% / 4); - } - .lg-4-2{ - width: 2 * (100% / 4); - } - .lg-4-3{ - width: 3 * (100% / 4); - } - .lg-4-4{ - width: 4 * (100% / 4); - } - - .lg-no{ - display: none; - } - .xs-no, .sm-no, .md-no{ - display: block; + // Large screen + @media (min-width: $lg-breakpoint){ + @for $i from 1 through $col-number{ + .#{$lg-prefix}-#{$i}{ + width: #{($i * 100% / $col-number)}; + } + } + .#{$xs-prefix}-#{$hide-suffix}, + .#{$sm-prefix}-#{$hide-suffix}, + .#{$md-prefix}-#{$hide-suffix}{ + display: block; + } + .#{$lg-prefix}-#{$hide-suffix}{ + display: none; + } } } \ No newline at end of file diff --git a/scss/mini/_variables.scss b/scss/mini/_variables.scss index 6c56175..495c542 100644 --- a/scss/mini/_variables.scss +++ b/scss/mini/_variables.scss @@ -6,8 +6,7 @@ $mark-color: #ffff33; /* Button */ $btn-color: #2a2a2a; $btn-color-alt: #eeeeee; -$btn-border-color: #b9b9b9; -$btn-background-color: #dbdbdb; +$btn-background-color: #c2c2c2; $btn-b-background-color: #3f84b3; $btn-g-background-color: #2db747; $btn-r-background-color: #ea4848; \ No newline at end of file diff --git a/testpage.html b/testpage.html index a0cc901..0f098fd 100644 --- a/testpage.html +++ b/testpage.html @@ -56,11 +56,11 @@ Suspendisse varius turpis et dui viverra semper.