diff --git a/.gitignore b/.gitignore index 44faf1e..ee8d6cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,13 @@ -prepros-6\.config - -dist/mini-doc\.min\.css - -dist/mini-doc\.css - -docs/v3/index-splash-o1\.jpg - -docs/v3/index-splash-o2\.jpg - -docs/v3/responsive-original\.svg - -docs/v3/index-splash_original\.jpg +prepros-6\.config + +dist/mini-doc\.min\.css + +dist/mini-doc\.css + +docs/v3/index-splash-o1\.jpg + +docs/v3/index-splash-o2\.jpg + +docs/v3/responsive-original\.svg + +docs/v3/index-splash_original\.jpg diff --git a/dist/mini-default.min.css b/dist/mini-default.min.css index bc8c5bc..534d100 100644 --- a/dist/mini-default.min.css +++ b/dist/mini-default.min.css @@ -1 +1 @@ -:root{--fore-color:#111;--secondary-fore-color:#444;--back-color:#f8f8f8;--secondary-back-color:#f0f0f0;--blockquote-color:#f57c00;--pre-color:#1565c0;--border-color:#aaa;--secondary-border-color:#ddd;--heading-ratio:1.19;--universal-margin:.5rem;--universal-padding:.5rem;--universal-border-radius:.125rem;--a-link-color:#0277bd;--a-visited-color:#01579b}html{font-size:16px}a,b,del,em,i,ins,q,span,strong,u{font-size:1em}html,*{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif;line-height:1.5;-webkit-text-size-adjust:100%}*{font-size:1rem}body{margin:0;color:var(--fore-color);background:var(--back-color)}details{display:block}summary{display:list-item}abbr[title]{border-bottom:none;text-decoration:underline dotted}input{overflow:visible}img{max-width:100%;height:auto}h1,h2,h3,h4,h5,h6{line-height:1.2;margin:calc(1.5 * var(--universal-margin)) var(--universal-margin);font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:var(--secondary-fore-color);display:block;margin-top:-.25rem}h1{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio))}h2{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio))}h3{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio))}h4{font-size:calc(1rem * var(--heading-ratio))}h5{font-size:1rem}h6{font-size:calc(1rem / var(--heading-ratio))}p{margin:var(--universal-margin)}ol,ul{margin:var(--universal-margin);padding-left:calc(2 * var(--universal-margin))}b,strong{font-weight:700}hr{box-sizing:content-box;border:0;line-height:1.25em;margin:var(--universal-margin);height:.0625rem;background:linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent)}blockquote{display:block;position:relative;font-style:italic;color:var(--secondary-fore-color);margin:var(--universal-margin);padding:calc(3 * var(--universal-padding));border:.0625rem solid var(--secondary-border-color);border-left:.375rem solid var(--blockquote-color);border-radius:0 var(--universal-border-radius) var(--universal-border-radius) 0}blockquote:before{position:absolute;top:calc(0rem - var(--universal-padding));left:0;font-family:sans-serif;font-size:3rem;font-weight:700;content:"\201c";color:var(--blockquote-color)}blockquote[cite]:after{font-style:normal;font-size:.75em;font-weight:700;content:"\a— " attr(cite);white-space:pre}code,kbd,pre,samp{font-family:Menlo, Consolas, monospace;font-size:.85em}code{background:var(--secondary-back-color);border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}kbd{background:var(--fore-color);color:var(--back-color);border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}pre{overflow:auto;background:var(--secondary-back-color);padding:calc(1.5 * var(--universal-padding));margin:var(--universal-margin);border:.0625rem solid var(--secondary-border-color);border-left:.25rem solid var(--pre-color);border-radius:0 var(--universal-border-radius) var(--universal-border-radius) 0}sup,sub,code,kbd{line-height:0;position:relative;vertical-align:baseline}small,sup,sub,figcaption{font-size:.75em}sup{top:-.5em}sub{bottom:-.25em}figure{margin:var(--universal-margin)}figcaption{color:var(--secondary-fore-color)}a{text-decoration:none}a:link{color:var(--a-link-color)}a:visited{color:var(--a-visited-color)}a:hover,a:focus{text-decoration:underline}.container{margin:0 auto;padding:0 calc(1.5 * var(--universal-padding))}.row{box-sizing:border-box;display:flex;flex:0 1 auto;flex-flow:row wrap}.col-sm,[class^='col-sm-'],[class^='col-sm-offset-'],.row[class*='cols-sm-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-sm,.row.cols-sm>*{max-width:100%;flex-grow:1;flex-basis:0}.col-sm-1,.row.cols-sm-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-sm-offset-0{margin-left:0}.col-sm-2,.row.cols-sm-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-sm-offset-1{margin-left:8.33333%}.col-sm-3,.row.cols-sm-3>*{max-width:25%;flex-basis:25%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-4,.row.cols-sm-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-sm-offset-3{margin-left:25%}.col-sm-5,.row.cols-sm-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-6,.row.cols-sm-6>*{max-width:50%;flex-basis:50%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-7,.row.cols-sm-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-sm-offset-6{margin-left:50%}.col-sm-8,.row.cols-sm-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-9,.row.cols-sm-9>*{max-width:75%;flex-basis:75%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-10,.row.cols-sm-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-sm-offset-9{margin-left:75%}.col-sm-11,.row.cols-sm-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-12,.row.cols-sm-12>*{max-width:100%;flex-basis:100%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-normal{order:initial}.col-sm-first{order:-999}.col-sm-last{order:999}@media screen and (min-width: 768px){.col-md,[class^='col-md-'],[class^='col-md-offset-'],.row[class*='cols-md-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-md,.row.cols-md>*{max-width:100%;flex-grow:1;flex-basis:0}.col-md-1,.row.cols-md-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-md-offset-0{margin-left:0}.col-md-2,.row.cols-md-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-md-offset-1{margin-left:8.33333%}.col-md-3,.row.cols-md-3>*{max-width:25%;flex-basis:25%}.col-md-offset-2{margin-left:16.66667%}.col-md-4,.row.cols-md-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-md-offset-3{margin-left:25%}.col-md-5,.row.cols-md-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-md-offset-4{margin-left:33.33333%}.col-md-6,.row.cols-md-6>*{max-width:50%;flex-basis:50%}.col-md-offset-5{margin-left:41.66667%}.col-md-7,.row.cols-md-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-md-offset-6{margin-left:50%}.col-md-8,.row.cols-md-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-md-offset-7{margin-left:58.33333%}.col-md-9,.row.cols-md-9>*{max-width:75%;flex-basis:75%}.col-md-offset-8{margin-left:66.66667%}.col-md-10,.row.cols-md-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-md-offset-9{margin-left:75%}.col-md-11,.row.cols-md-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-md-offset-10{margin-left:83.33333%}.col-md-12,.row.cols-md-12>*{max-width:100%;flex-basis:100%}.col-md-offset-11{margin-left:91.66667%}.col-md-normal{order:initial}.col-md-first{order:-999}.col-md-last{order:999}}@media screen and (min-width: 1280px){.col-lg,[class^='col-lg-'],[class^='col-lg-offset-'],.row[class*='cols-lg-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-lg,.row.cols-lg>*{max-width:100%;flex-grow:1;flex-basis:0}.col-lg-1,.row.cols-lg-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-lg-offset-0{margin-left:0}.col-lg-2,.row.cols-lg-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-lg-offset-1{margin-left:8.33333%}.col-lg-3,.row.cols-lg-3>*{max-width:25%;flex-basis:25%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-4,.row.cols-lg-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-lg-offset-3{margin-left:25%}.col-lg-5,.row.cols-lg-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-6,.row.cols-lg-6>*{max-width:50%;flex-basis:50%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-7,.row.cols-lg-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-lg-offset-6{margin-left:50%}.col-lg-8,.row.cols-lg-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-9,.row.cols-lg-9>*{max-width:75%;flex-basis:75%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-10,.row.cols-lg-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-lg-offset-9{margin-left:75%}.col-lg-11,.row.cols-lg-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-12,.row.cols-lg-12>*{max-width:100%;flex-basis:100%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-normal{order:initial}.col-lg-first{order:-999}.col-lg-last{order:999}}:root{--card-back-color:#f8f8f8;--card-fore-color:#111;--card-border-color:#ddd}.card{display:flex;flex-direction:column;justify-content:space-between;align-self:center;position:relative;width:100%;background:var(--card-back-color);color:var(--card-fore-color);border:.0625rem solid var(--card-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin);overflow:hidden}@media screen and (min-width: 320px){.card{max-width:320px}}.card>.section{background:var(--card-back-color);color:var(--card-fore-color);box-sizing:border-box;margin:0;border:0;border-radius:0;border-bottom:.0625rem solid var(--card-border-color);padding:var(--universal-padding);width:100%}.card>.section.media{height:200px;padding:0;-o-object-fit:cover;object-fit:cover}.card>.section:last-child{border-bottom:0}@media screen and (min-width: 240px){.card.small{max-width:240px}}@media screen and (min-width: 480px){.card.large{max-width:480px}}.card.fluid{max-width:100%;width:auto}.card.warning{--card-back-color:#ffca28;--card-border-color:#e8b825}.card.error{--card-back-color:#b71c1c;--card-fore-color:#f8f8f8;--card-border-color:#a71a1a}.card>.section.dark{--card-back-color:#e0e0e0}.card>.section.double-padded{padding:calc(1.5 * var(--universal-padding))}:root{--form-back-color:#f0f0f0;--form-fore-color:#111;--form-border-color:#ddd;--input-back-color:#f8f8f8;--input-fore-color:#111;--input-border-color:#ddd;--input-focus-color:#0288d1;--input-invalid-color:#d32f2f;--button-back-color:#e2e2e2;--button-hover-back-color:#dcdcdc;--button-fore-color:#212121;--button-border-color:transparent;--button-hover-border-color:transparent;--button-group-border-color:rgba(124,124,124,0.54)}form{background:var(--form-back-color);color:var(--form-fore-color);border:.0625rem solid var(--form-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin);padding:calc(2 * var(--universal-padding)) var(--universal-padding)}fieldset{border:.0625rem solid var(--form-border-color);border-radius:var(--universal-border-radius);margin:calc(var(--universal-margin) / 4);padding:var(--universal-padding)}legend{box-sizing:border-box;display:table;max-width:100%;white-space:normal;font-weight:700;padding:calc(var(--universal-padding) / 2)}label{padding:calc(var(--universal-padding) / 2) var(--universal-padding)}.input-group{display:inline-block}.input-group.fluid{display:flex;align-items:center;justify-content:center}.input-group.fluid>input{max-width:100%;flex-grow:1;flex-basis:0px}@media screen and (max-width: 767px){.input-group.fluid{align-items:stretch;flex-direction:column}}.input-group.vertical{display:flex;align-items:stretch;flex-direction:column}.input-group.vertical>input{max-width:100%;flex-grow:1;flex-basis:0px}[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}input:not([type]),[type="text"],[type="email"],[type="number"],[type="search"],[type="password"],[type="url"],[type="tel"],[type="checkbox"],[type="radio"],textarea,select{box-sizing:border-box;background:var(--input-back-color);color:var(--input-fore-color);border:.0625rem solid var(--input-border-color);border-radius:var(--universal-border-radius);margin:calc(var(--universal-margin) / 2);padding:var(--universal-padding) calc(1.5 * var(--universal-padding))}input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover,input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus,textarea:hover,textarea:focus,select:hover,select:focus{border-color:var(--input-focus-color);box-shadow:none}input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid,input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid,textarea:invalid,textarea:focus:invalid,select:invalid,select:focus:invalid{border-color:var(--input-invalid-color);box-shadow:none}input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly],textarea[readonly],select[readonly]{background:var(--secondary-back-color)}select{max-width:100%}option{overflow:hidden;text-overflow:ellipsis}[type="checkbox"],[type="radio"]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;height:calc(1rem + var(--universal-padding) / 2);width:calc(1rem + var(--universal-padding) / 2);vertical-align:text-bottom;padding:0;flex-basis:calc(1rem + var(--universal-padding) / 2) !important;flex-grow:0 !important}[type="checkbox"]:checked:before,[type="radio"]:checked:before{position:absolute}[type="checkbox"]:checked:before{content:'\2713';font-family:sans-serif;font-size:calc(1rem + var(--universal-padding) / 2);top:calc(0rem - var(--universal-padding));left:calc(var(--universal-padding) / 4)}[type="radio"]{border-radius:100%}[type="radio"]:checked:before{border-radius:100%;content:'';top:calc(.0625rem + var(--universal-padding) / 2);left:calc(.0625rem + var(--universal-padding) / 2);background:var(--input-fore-color);width:0.5rem;height:0.5rem}:placeholder-shown{color:var(--input-fore-color)}::-ms-placeholder{color:var(--input-fore-color);opacity:0.54}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button{overflow:visible;text-transform:none}button,[type="button"],[type="submit"],[type="reset"],a.button,label.button,.button,a[role="button"],label[role="button"],[role="button"]{display:inline-block;background:var(--button-back-color);color:var(--button-fore-color);border:.0625rem solid var(--button-border-color);border-radius:var(--universal-border-radius);padding:var(--universal-padding) calc(1.5 * var(--universal-padding));margin:var(--universal-margin);text-decoration:none;cursor:pointer;transition:background 0.3s}button:hover,button:focus,[type="button"]:hover,[type="button"]:focus,[type="submit"]:hover,[type="submit"]:focus,[type="reset"]:hover,[type="reset"]:focus,a.button:hover,a.button:focus,label.button:hover,label.button:focus,.button:hover,.button:focus,a[role="button"]:hover,a[role="button"]:focus,label[role="button"]:hover,label[role="button"]:focus,[role="button"]:hover,[role="button"]:focus{background:var(--button-hover-back-color);border-color:var(--button-hover-border-color)}input:disabled,input[disabled],textarea:disabled,textarea[disabled],select:disabled,select[disabled],button:disabled,button[disabled],.button:disabled,.button[disabled],[role="button"]:disabled,[role="button"][disabled]{cursor:not-allowed;opacity:.75}.button-group{display:flex;border:.0625rem solid var(--button-group-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin)}.button-group>button,.button-group [type="button"],.button-group>[type="submit"],.button-group>[type="reset"],.button-group>.button,.button-group>[role="button"]{margin:0;max-width:100%;flex:1 1 auto;text-align:center;border:0;border-radius:0;box-shadow:none}.button-group>:not(:first-child){border-left:.0625rem solid var(--button-group-border-color)}@media screen and (max-width: 767px){.button-group{flex-direction:column}.button-group>:not(:first-child){border:0;border-top:.0625rem solid var(--button-group-border-color)}}button.primary,[type="button"].primary,[type="submit"].primary,[type="reset"].primary,.button.primary,[role="button"].primary{--button-back-color:#1976d2;--button-fore-color:#f8f8f8}button.primary:hover,button.primary:focus,[type="button"].primary:hover,[type="button"].primary:focus,[type="submit"].primary:hover,[type="submit"].primary:focus,[type="reset"].primary:hover,[type="reset"].primary:focus,.button.primary:hover,.button.primary:focus,[role="button"].primary:hover,[role="button"].primary:focus{--button-hover-back-color:#1565c0}button.secondary,[type="button"].secondary,[type="submit"].secondary,[type="reset"].secondary,.button.secondary,[role="button"].secondary{--button-back-color:#d32f2f;--button-fore-color:#f8f8f8}button.secondary:hover,button.secondary:focus,[type="button"].secondary:hover,[type="button"].secondary:focus,[type="submit"].secondary:hover,[type="submit"].secondary:focus,[type="reset"].secondary:hover,[type="reset"].secondary:focus,.button.secondary:hover,.button.secondary:focus,[role="button"].secondary:hover,[role="button"].secondary:focus{--button-hover-back-color:#c62828}button.tertiary,[type="button"].tertiary,[type="submit"].tertiary,[type="reset"].tertiary,.button.tertiary,[role="button"].tertiary{--button-back-color:#308732;--button-fore-color:#f8f8f8}button.tertiary:hover,button.tertiary:focus,[type="button"].tertiary:hover,[type="button"].tertiary:focus,[type="submit"].tertiary:hover,[type="submit"].tertiary:focus,[type="reset"].tertiary:hover,[type="reset"].tertiary:focus,.button.tertiary:hover,.button.tertiary:focus,[role="button"].tertiary:hover,[role="button"].tertiary:focus{--button-hover-back-color:#277529}button.inverse,[type="button"].inverse,[type="submit"].inverse,[type="reset"].inverse,.button.inverse,[role="button"].inverse{--button-back-color:#212121;--button-fore-color:#f8f8f8}button.inverse:hover,button.inverse:focus,[type="button"].inverse:hover,[type="button"].inverse:focus,[type="submit"].inverse:hover,[type="submit"].inverse:focus,[type="reset"].inverse:hover,[type="reset"].inverse:focus,.button.inverse:hover,.button.inverse:focus,[role="button"].inverse:hover,[role="button"].inverse:focus{--button-hover-back-color:#111}button.small,[type="button"].small,[type="submit"].small,[type="reset"].small,.button.small,[role="button"].small{padding:calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding));margin:var(--universal-margin)}button.large,[type="button"].large,[type="submit"].large,[type="reset"].large,.button.large,[role="button"].large{padding:calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding));margin:var(--universal-margin)}:root{--header-back-color:#f8f8f8;--header-hover-back-color:#f0f0f0;--header-fore-color:#444;--header-border-color:#ddd;--nav-back-color:#f8f8f8;--nav-hover-back-color:#f0f0f0;--nav-fore-color:#444;--nav-border-color:#ddd;--nav-link-color:#0277bd;--footer-fore-color:#444;--footer-back-color:#f8f8f8;--footer-border-color:#ddd;--footer-link-color:#0277bd;--drawer-back-color:#f8f8f8;--drawer-hover-back-color:#f0f0f0;--drawer-border-color:#ddd;--drawer-close-color:#444}header{height:3.1875rem;background:var(--header-back-color);color:var(--header-fore-color);border-bottom:.0625rem solid var(--header-border-color);padding:calc(var(--universal-padding) / 4) 0;white-space:nowrap;overflow-x:auto;overflow-y:hidden}header.row{box-sizing:content-box}header .logo{color:var(--header-fore-color);font-size:1.75rem;padding:var(--universal-padding) calc(2 * var(--universal-padding));text-decoration:none}header button,header [type="button"],header .button,header [role="button"]{box-sizing:border-box;position:relative;top:calc(0rem - var(--universal-padding) / 4);height:calc(3.1875rem + var(--universal-padding) / 2);background:var(--header-back-color);line-height:calc(3.1875rem - var(--universal-padding) * 1.5);text-align:center;color:var(--header-fore-color);border:0;border-radius:0;margin:0;text-transform:uppercase}header button:hover,header button:focus,header [type="button"]:hover,header [type="button"]:focus,header .button:hover,header .button:focus,header [role="button"]:hover,header [role="button"]:focus{background:var(--header-hover-back-color)}nav{background:var(--nav-back-color);color:var(--nav-fore-color);border:.0625rem solid var(--nav-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin)}nav *{padding:var(--universal-padding) calc(1.5 * var(--universal-padding))}nav a,nav a:visited{display:block;color:var(--nav-link-color);border-radius:var(--universal-border-radius);transition:background 0.3s}nav a:hover,nav a:focus,nav a:visited:hover,nav a:visited:focus{text-decoration:none;background:var(--nav-hover-back-color)}nav .sublink-1{position:relative;margin-left:calc(2 * var(--universal-padding))}nav .sublink-1:before{position:absolute;left:calc(var(--universal-padding) - 1 * var(--universal-padding));top:-.0625rem;content:'';height:100%;border:.0625rem solid var(--nav-border-color);border-left:0}nav .sublink-2{position:relative;margin-left:calc(4 * var(--universal-padding))}nav .sublink-2:before{position:absolute;left:calc(var(--universal-padding) - 3 * var(--universal-padding));top:-.0625rem;content:'';height:100%;border:.0625rem solid var(--nav-border-color);border-left:0}footer{background:var(--footer-back-color);color:var(--footer-fore-color);border-top:.0625rem solid var(--footer-border-color);padding:calc(2 * var(--universal-padding)) var(--universal-padding);font-size:.875rem}footer a,footer a:visited{color:var(--footer-link-color)}header.sticky{position:-webkit-sticky;position:sticky;z-index:1101;top:0}footer.sticky{position:-webkit-sticky;position:sticky;z-index:1101;bottom:0}.drawer-toggle:before{display:inline-block;position:relative;vertical-align:bottom;content:'\00a0\2261\00a0';font-family:sans-serif;font-size:1.5em}@media screen and (min-width: 768px){.drawer-toggle:not(.persistent){display:none}}[type="checkbox"].drawer{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}[type="checkbox"].drawer+*{display:block;box-sizing:border-box;position:fixed;top:0;width:320px;height:100vh;overflow-y:auto;background:var(--drawer-back-color);border:.0625rem solid var(--drawer-border-color);border-radius:0;margin:0;z-index:1110;right:-320px;transition:right 0.3s}[type="checkbox"].drawer+* .drawer-close{position:absolute;top:var(--universal-margin);right:var(--universal-margin);z-index:1111;width:2rem;height:2rem;border-radius:var(--universal-border-radius);padding:var(--universal-padding);margin:0;cursor:pointer;transition:background 0.3s}[type="checkbox"].drawer+* .drawer-close:before{display:block;content:'\00D7';color:var(--drawer-close-color);position:relative;font-family:sans-serif;font-size:2rem;line-height:1;text-align:center}[type="checkbox"].drawer+* .drawer-close:hover,[type="checkbox"].drawer+* .drawer-close:focus{background:var(--drawer-hover-back-color)}@media screen and (max-width: 320px){[type="checkbox"].drawer+*{width:100%}}[type="checkbox"].drawer:checked+*{right:0}@media screen and (min-width: 768px){[type="checkbox"].drawer:not(.persistent)+*{position:static;height:100%;z-index:1100}[type="checkbox"].drawer:not(.persistent)+* .drawer-close{display:none}}:root{--table-border-color:#aaa;--table-border-separator-color:#666;--table-head-back-color:#e6e6e6;--table-head-fore-color:#111;--table-body-back-color:#f8f8f8;--table-body-fore-color:#111;--table-body-alt-back-color:#eee}table{border-collapse:separate;border-spacing:0;margin:0;display:flex;flex:0 1 auto;flex-flow:row wrap;padding:var(--universal-padding);padding-top:0}table caption{font-size:1.5rem;margin:calc(2 * var(--universal-margin)) 0;max-width:100%;flex:0 0 100%}table thead,table tbody{display:flex;flex-flow:row wrap;border:.0625rem solid var(--table-border-color)}table thead{z-index:999;border-radius:var(--universal-border-radius) var(--universal-border-radius) 0 0;border-bottom:.0625rem solid var(--table-border-separator-color)}table tbody{border-top:0;margin-top:calc(0 - var(--universal-margin));border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}table tr{display:flex;padding:0}table th,table td{padding:calc(2 * var(--universal-padding))}table th{text-align:left;background:var(--table-head-back-color);color:var(--table-head-fore-color)}table td{background:var(--table-body-back-color);color:var(--table-body-fore-color);border-top:.0625rem solid var(--table-border-color)}table:not(.horizontal){overflow:auto;max-height:400px}table:not(.horizontal) thead,table:not(.horizontal) tbody{max-width:100%;flex:0 0 100%}table:not(.horizontal) tr{flex-flow:row wrap;flex:0 0 100%}table:not(.horizontal) th,table:not(.horizontal) td{flex:1 0 0%;overflow:hidden;text-overflow:ellipsis}table:not(.horizontal) thead{position:sticky;top:0}table:not(.horizontal) tbody tr:first-child td{border-top:0}table.horizontal{border:0}table.horizontal thead,table.horizontal tbody{border:0;flex-flow:row nowrap}table.horizontal tbody{overflow:auto;justify-content:space-between;flex:1 0 0;margin-left:calc( 4 * var(--universal-margin));padding-bottom:calc(var(--universal-padding) / 4)}table.horizontal tr{flex-direction:column;flex:1 0 auto}table.horizontal th,table.horizontal td{width:100%;border:0;border-bottom:.0625rem solid var(--table-border-color)}table.horizontal th:not(:first-child),table.horizontal td:not(:first-child){border-top:0}table.horizontal th{text-align:right;border-left:.0625rem solid var(--table-border-color);border-right:.0625rem solid var(--table-border-separator-color)}table.horizontal thead tr:first-child{padding-left:0}table.horizontal th:first-child,table.horizontal td:first-child{border-top:.0625rem solid var(--table-border-color)}table.horizontal tbody tr:last-child td{border-right:.0625rem solid var(--table-border-color)}table.horizontal tbody tr:last-child td:first-child{border-top-right-radius:0.25rem}table.horizontal tbody tr:last-child td:last-child{border-bottom-right-radius:0.25rem}table.horizontal thead tr:first-child th:first-child{border-top-left-radius:0.25rem}table.horizontal thead tr:first-child th:last-child{border-bottom-left-radius:0.25rem}@media screen and (max-width: 767px){table,table.horizontal{border-collapse:collapse;border:0;width:100%;display:table}table thead,table th,table.horizontal thead,table.horizontal th{border:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}table tbody,table.horizontal tbody{border:0;display:table-row-group}table tr,table.horizontal tr{display:block;border:.0625rem solid var(--table-border-color);border-radius:var(--universal-border-radius);background:#fafafa;padding:var(--universal-padding);margin:var(--universal-margin);margin-bottom:calc(2 * var(--universal-margin))}table th,table td,table.horizontal th,table.horizontal td{width:auto}table td,table.horizontal td{display:block;border:0;text-align:right}table td:before,table.horizontal td:before{content:attr(data-label);float:left;font-weight:600}table th:first-child,table td:first-child,table.horizontal th:first-child,table.horizontal td:first-child{border-top:0}table tbody tr:last-child td,table.horizontal tbody tr:last-child td{border-right:0}}:root{--table-body-alt-back-color:#eee}table.striped tr:nth-of-type(2n)>td{background:var(--table-body-alt-back-color)}@media screen and (max-width: 768px){table.striped tr:nth-of-type(2n){background:var(--table-body-alt-back-color)}}:root{--table-body-hover-back-color:#90caf9}table.hoverable tr:hover,table.hoverable tr:hover>td,table.hoverable tr:focus,table.hoverable tr:focus>td{background:var(--table-body-hover-back-color)}@media screen and (max-width: 768px){table.hoverable tr:hover,table.hoverable tr:hover>td,table.hoverable tr:focus,table.hoverable tr:focus>td{background:var(--table-body-hover-back-color)}}:root{--mark-back-color:#0277bd;--mark-fore-color:#fafafa}mark{background:var(--mark-back-color);color:var(--mark-fore-color);font-size:.95em;line-height:1em;border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}mark.inline-block{display:inline-block;font-size:1em;line-height:1.5;padding:calc(var(--universal-padding) / 2) var(--universal-padding)}:root{--toast-back-color:#424242;--toast-fore-color:#fafafa}.toast{position:fixed;bottom:calc(var(--universal-margin) * 3);left:50%;transform:translate(-50%, -50%);z-index:1111;color:var(--toast-fore-color);background:var(--toast-back-color);border-radius:calc(var(--universal-border-radius) * 16);padding:var(--universal-padding) calc(var(--universal-padding) * 3)}:root{--tooltip-back-color:#212121;--tooltip-fore-color:#fafafa}.tooltip{position:relative;display:inline-block}.tooltip:before,.tooltip:after{position:absolute;opacity:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);transition:all 0.3s;z-index:1010;left:50%}.tooltip:not(.bottom):before,.tooltip:not(.bottom):after{bottom:75%}.tooltip.bottom:before,.tooltip.bottom:after{top:75%}.tooltip:hover:before,.tooltip:hover:after,.tooltip:focus:before,.tooltip:focus:after{opacity:1;clip:auto;-webkit-clip-path:inset(0%);clip-path:inset(0%)}.tooltip:before{content:'';background:transparent;border:var(--universal-margin) solid transparent;left:calc(50% - var(--universal-margin))}.tooltip:not(.bottom):before{border-top-color:#212121}.tooltip.bottom:before{border-bottom-color:#212121}.tooltip:after{content:attr(aria-label);color:var(--tooltip-fore-color);background:var(--tooltip-back-color);border-radius:var(--universal-border-radius);padding:var(--universal-padding);white-space:nowrap;transform:translateX(-50%)}.tooltip:not(.bottom):after{margin-bottom:calc(2 * var(--universal-margin))}.tooltip.bottom:after{margin-top:calc(2 * var(--universal-margin))}:root{--modal-overlay-color:rgba(0,0,0,0.45);--modal-close-color:#444;--modal-close-hover-color:#f0f0f0}[type="checkbox"].modal{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}[type="checkbox"].modal+div{position:fixed;top:0;left:0;display:none;width:100vw;height:100vh;background:var(--modal-overlay-color)}[type="checkbox"].modal+div .card{margin:0 auto;max-height:50vh;overflow:auto}[type="checkbox"].modal+div .card .modal-close{position:absolute;top:0;right:0;width:1.75rem;height:1.75rem;border-radius:var(--universal-border-radius);padding:var(--universal-padding);margin:0;cursor:pointer;transition:background 0.3s}[type="checkbox"].modal+div .card .modal-close:before{display:block;content:'\00D7';color:var(--modal-close-color);position:relative;font-family:sans-serif;font-size:1.75rem;line-height:1;text-align:center}[type="checkbox"].modal+div .card .modal-close:hover,[type="checkbox"].modal+div .card .modal-close:focus{background:var(--modal-close-hover-color)}[type="checkbox"].modal:checked+div{display:flex;flex:0 1 auto;z-index:1200}[type="checkbox"].modal:checked+div .card .modal-close{z-index:1211}:root{--collapse-label-back-color:#e8e8e8;--collapse-label-fore-color:#212121;--collapse-label-hover-back-color:#f0f0f0;--collapse-selected-label-back-color:#ececec;--collapse-border-color:#ddd;--collapse-content-back-color:#fafafa;--collapse-selected-label-border-color:#0277bd}.collapse{width:calc(100% - 2 * var(--universal-margin));opacity:1;display:flex;flex-direction:column;margin:var(--universal-margin);border-radius:var(--universal-border-radius)}.collapse>[type="radio"],.collapse>[type="checkbox"]{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}.collapse>label{flex-grow:1;display:inline-block;height:1.5rem;cursor:pointer;transition:background 0.3s;color:var(--collapse-label-fore-color);background:var(--collapse-label-back-color);border:.0625rem solid var(--collapse-border-color);padding:calc(1.5 * var(--universal-padding))}.collapse>label:hover,.collapse>label:focus{background:var(--collapse-label-hover-back-color)}.collapse>label+div{flex-basis:auto;height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);transition:max-height 0.3s;max-height:1px}.collapse>:checked+label{background:var(--collapse-selected-label-back-color);border-bottom-color:var(--collapse-selected-label-border-color)}.collapse>:checked+label+div{box-sizing:border-box;position:relative;width:100%;height:auto;overflow:auto;margin:0;background:var(--collapse-content-back-color);border:.0625rem solid var(--collapse-border-color);border-top:0;padding:var(--universal-padding);clip:auto;-webkit-clip-path:inset(0%);clip-path:inset(0%);max-height:400px}.collapse>label:not(:first-of-type){border-top:0}.collapse>label:first-of-type{border-radius:var(--universal-border-radius) var(--universal-border-radius) 0 0}.collapse>label:last-of-type:not(:first-of-type){border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}.collapse>label:last-of-type:first-of-type{border-radius:var(--universal-border-radius)}.collapse>:checked:last-of-type:not(:first-of-type)+label{border-radius:0}.collapse>:checked:last-of-type+label+div{border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}mark.secondary{--mark-back-color:#d32f2f}mark.tertiary{--mark-back-color:#308732}mark.tag{padding:calc(var(--universal-padding)/2) var(--universal-padding);border-radius:1em}:root{--progress-back-color:#ddd;--progress-fore-color:#555}progress{display:block;vertical-align:baseline;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.75rem;width:calc(100% - 2 * var(--universal-margin));margin:var(--universal-margin);border:0;border-radius:calc(2 * var(--universal-border-radius));background:var(--progress-back-color);color:var(--progress-fore-color)}progress::-webkit-progress-value{background:var(--progress-fore-color);border-top-left-radius:calc(2 * var(--universal-border-radius));border-bottom-left-radius:calc(2 * var(--universal-border-radius))}progress::-webkit-progress-bar{background:var(#ddd)}progress::-moz-progress-bar{background:var(--progress-fore-color);border-top-left-radius:calc(2 * var(--universal-border-radius));border-bottom-left-radius:calc(2 * var(--universal-border-radius))}progress[value="1000"]::-webkit-progress-value{border-radius:calc(2 * var(--universal-border-radius))}progress[value="1000"]::-moz-progress-bar{border-radius:calc(2 * var(--universal-border-radius))}progress.inline{display:inline-block;vertical-align:middle;width:60%}:root{--spinner-back-color:#ddd;--spinner-fore-color:#555}@keyframes spinner-donut-anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.spinner{display:inline-block;margin:var(--universal-margin);border:.25rem solid var(--spinner-back-color);border-left:.25rem solid var(--spinner-fore-color);border-radius:50%;width:1.25rem;height:1.25rem;animation:spinner-donut-anim 1.2s linear infinite}progress.primary{--progress-fore-color:#1976d2}progress.secondary{--progress-fore-color:#d32f2f}progress.tertiary{--progress-fore-color:#308732}.spinner.primary{--spinner-fore-color:#1976d2}.spinner.secondary{--spinner-fore-color:#d32f2f}.spinner.tertiary{--spinner-fore-color:#308732}span[class^='icon-']{display:inline-block;height:1em;width:1em;vertical-align:-0.125em;background-size:contain;margin:0 calc(var(--universal-margin) / 4)}span[class^='icon-'].secondary{-webkit-filter:invert(25%);filter:invert(25%)}span[class^='icon-'].inverse{-webkit-filter:invert(100%);filter:invert(100%)}span.icon-alert{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12' y2='16'%3E%3C/line%3E%3C/svg%3E")}span.icon-bookmark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E")}span.icon-calendar{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E")}span.icon-credit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E")}span.icon-edit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34'%3E%3C/path%3E%3Cpolygon points='18 2 22 6 12 16 8 16 8 12 18 2'%3E%3C/polygon%3E%3C/svg%3E")}span.icon-link{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E")}span.icon-help{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='17' x2='12' y2='17'%3E%3C/line%3E%3C/svg%3E")}span.icon-home{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E")}span.icon-info{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='8'%3E%3C/line%3E%3C/svg%3E")}span.icon-lock{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E")}span.icon-mail{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E")}span.icon-location{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E")}span.icon-phone{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E")}span.icon-rss{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'%3E%3C/path%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'%3E%3C/path%3E%3Ccircle cx='5' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E")}span.icon-search{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")}span.icon-settings{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E")}span.icon-share{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='3'%3E%3C/circle%3E%3Ccircle cx='18' cy='19' r='3'%3E%3C/circle%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'%3E%3C/line%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'%3E%3C/line%3E%3C/svg%3E")}span.icon-cart{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E")}span.icon-upload{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E")}span.icon-user{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E")}:root{--generic-border-color:rgba(0,0,0,0.3);--generic-box-shadow:0 .25rem .25rem 0 rgba(0,0,0,0.125),0 .125rem .125rem -.125rem rgba(0,0,0,0.25)}.hidden{display:none !important}.visually-hidden{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}.bordered{border:.0625rem solid var(--generic-border-color) !important}.rounded{border-radius:var(--universal-border-radius) !important}.circular{border-radius:50% !important}.shadowed{box-shadow:var(--generic-box-shadow) !important}.responsive-margin{margin:calc(var(--universal-margin) / 4) !important}@media screen and (min-width: 768px){.responsive-margin{margin:calc(var(--universal-margin) / 2) !important}}@media screen and (min-width: 1280px){.responsive-margin{margin:var(--universal-margin) !important}}.responsive-padding{padding:calc(var(--universal-padding) / 4) !important}@media screen and (min-width: 768px){.responsive-padding{padding:calc(var(--universal-padding) / 2) !important}}@media screen and (min-width: 1280px){.responsive-padding{padding:var(--universal-padding) !important}}@media screen and (max-width: 767px){.hidden-sm{display:none !important}}@media screen and (min-width: 768px) and (max-width: 1279px){.hidden-md{display:none !important}}@media screen and (min-width: 1280px){.hidden-lg{display:none !important}}@media screen and (max-width: 767px){.visually-hidden-sm{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}}@media screen and (min-width: 768px) and (max-width: 1279px){.visually-hidden-md{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}}@media screen and (min-width: 1280px){.visually-hidden-lg{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}} +:root{--fore-color:#111;--secondary-fore-color:#444;--back-color:#f8f8f8;--secondary-back-color:#f0f0f0;--blockquote-color:#f57c00;--pre-color:#1565c0;--border-color:#aaa;--secondary-border-color:#ddd;--heading-ratio:1.19;--universal-margin:.5rem;--universal-padding:.5rem;--universal-border-radius:.125rem;--a-link-color:#0277bd;--a-visited-color:#01579b}html{font-size:16px}a,b,del,em,i,ins,q,span,strong,u{font-size:1em}html,*{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif;line-height:1.5;-webkit-text-size-adjust:100%}*{font-size:1rem}body{margin:0;color:var(--fore-color);background:var(--back-color)}details{display:block}summary{display:list-item}abbr[title]{border-bottom:none;text-decoration:underline dotted}input{overflow:visible}img{max-width:100%;height:auto}h1,h2,h3,h4,h5,h6{line-height:1.2;margin:calc(1.5 * var(--universal-margin)) var(--universal-margin);font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:var(--secondary-fore-color);display:block;margin-top:-.25rem}h1{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio))}h2{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio))}h3{font-size:calc(1rem * var(--heading-ratio) * var(--heading-ratio))}h4{font-size:calc(1rem * var(--heading-ratio))}h5{font-size:1rem}h6{font-size:calc(1rem / var(--heading-ratio))}p{margin:var(--universal-margin)}ol,ul{margin:var(--universal-margin);padding-left:calc(2 * var(--universal-margin))}b,strong{font-weight:700}hr{box-sizing:content-box;border:0;line-height:1.25em;margin:var(--universal-margin);height:.0625rem;background:linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent)}blockquote{display:block;position:relative;font-style:italic;color:var(--secondary-fore-color);margin:var(--universal-margin);padding:calc(3 * var(--universal-padding));border:.0625rem solid var(--secondary-border-color);border-left:.375rem solid var(--blockquote-color);border-radius:0 var(--universal-border-radius) var(--universal-border-radius) 0}blockquote:before{position:absolute;top:calc(0rem - var(--universal-padding));left:0;font-family:sans-serif;font-size:3rem;font-weight:700;content:"\201c";color:var(--blockquote-color)}blockquote[cite]:after{font-style:normal;font-size:.75em;font-weight:700;content:"\a— " attr(cite);white-space:pre}code,kbd,pre,samp{font-family:Menlo, Consolas, monospace;font-size:.85em}code{background:var(--secondary-back-color);border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}kbd{background:var(--fore-color);color:var(--back-color);border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}pre{overflow:auto;background:var(--secondary-back-color);padding:calc(1.5 * var(--universal-padding));margin:var(--universal-margin);border:.0625rem solid var(--secondary-border-color);border-left:.25rem solid var(--pre-color);border-radius:0 var(--universal-border-radius) var(--universal-border-radius) 0}sup,sub,code,kbd{line-height:0;position:relative;vertical-align:baseline}small,sup,sub,figcaption{font-size:.75em}sup{top:-.5em}sub{bottom:-.25em}figure{margin:var(--universal-margin)}figcaption{color:var(--secondary-fore-color)}a{text-decoration:none}a:link{color:var(--a-link-color)}a:visited{color:var(--a-visited-color)}a:hover,a:focus{text-decoration:underline}.container{margin:0 auto;padding:0 calc(1.5 * var(--universal-padding))}.row{box-sizing:border-box;display:flex;flex:0 1 auto;flex-flow:row wrap}.col-sm,[class^='col-sm-'],[class^='col-sm-offset-'],.row[class*='cols-sm-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-sm,.row.cols-sm>*{max-width:100%;flex-grow:1;flex-basis:0}.col-sm-1,.row.cols-sm-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-sm-offset-0{margin-left:0}.col-sm-2,.row.cols-sm-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-sm-offset-1{margin-left:8.33333%}.col-sm-3,.row.cols-sm-3>*{max-width:25%;flex-basis:25%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-4,.row.cols-sm-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-sm-offset-3{margin-left:25%}.col-sm-5,.row.cols-sm-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-6,.row.cols-sm-6>*{max-width:50%;flex-basis:50%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-7,.row.cols-sm-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-sm-offset-6{margin-left:50%}.col-sm-8,.row.cols-sm-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-9,.row.cols-sm-9>*{max-width:75%;flex-basis:75%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-10,.row.cols-sm-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-sm-offset-9{margin-left:75%}.col-sm-11,.row.cols-sm-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-12,.row.cols-sm-12>*{max-width:100%;flex-basis:100%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-normal{order:initial}.col-sm-first{order:-999}.col-sm-last{order:999}@media screen and (min-width: 768px){.col-md,[class^='col-md-'],[class^='col-md-offset-'],.row[class*='cols-md-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-md,.row.cols-md>*{max-width:100%;flex-grow:1;flex-basis:0}.col-md-1,.row.cols-md-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-md-offset-0{margin-left:0}.col-md-2,.row.cols-md-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-md-offset-1{margin-left:8.33333%}.col-md-3,.row.cols-md-3>*{max-width:25%;flex-basis:25%}.col-md-offset-2{margin-left:16.66667%}.col-md-4,.row.cols-md-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-md-offset-3{margin-left:25%}.col-md-5,.row.cols-md-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-md-offset-4{margin-left:33.33333%}.col-md-6,.row.cols-md-6>*{max-width:50%;flex-basis:50%}.col-md-offset-5{margin-left:41.66667%}.col-md-7,.row.cols-md-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-md-offset-6{margin-left:50%}.col-md-8,.row.cols-md-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-md-offset-7{margin-left:58.33333%}.col-md-9,.row.cols-md-9>*{max-width:75%;flex-basis:75%}.col-md-offset-8{margin-left:66.66667%}.col-md-10,.row.cols-md-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-md-offset-9{margin-left:75%}.col-md-11,.row.cols-md-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-md-offset-10{margin-left:83.33333%}.col-md-12,.row.cols-md-12>*{max-width:100%;flex-basis:100%}.col-md-offset-11{margin-left:91.66667%}.col-md-normal{order:initial}.col-md-first{order:-999}.col-md-last{order:999}}@media screen and (min-width: 1280px){.col-lg,[class^='col-lg-'],[class^='col-lg-offset-'],.row[class*='cols-lg-']>*{box-sizing:border-box;flex:0 0 auto;padding:0 calc(var(--universal-padding) / 2)}.col-lg,.row.cols-lg>*{max-width:100%;flex-grow:1;flex-basis:0}.col-lg-1,.row.cols-lg-1>*{max-width:8.33333%;flex-basis:8.33333%}.col-lg-offset-0{margin-left:0}.col-lg-2,.row.cols-lg-2>*{max-width:16.66667%;flex-basis:16.66667%}.col-lg-offset-1{margin-left:8.33333%}.col-lg-3,.row.cols-lg-3>*{max-width:25%;flex-basis:25%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-4,.row.cols-lg-4>*{max-width:33.33333%;flex-basis:33.33333%}.col-lg-offset-3{margin-left:25%}.col-lg-5,.row.cols-lg-5>*{max-width:41.66667%;flex-basis:41.66667%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-6,.row.cols-lg-6>*{max-width:50%;flex-basis:50%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-7,.row.cols-lg-7>*{max-width:58.33333%;flex-basis:58.33333%}.col-lg-offset-6{margin-left:50%}.col-lg-8,.row.cols-lg-8>*{max-width:66.66667%;flex-basis:66.66667%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-9,.row.cols-lg-9>*{max-width:75%;flex-basis:75%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-10,.row.cols-lg-10>*{max-width:83.33333%;flex-basis:83.33333%}.col-lg-offset-9{margin-left:75%}.col-lg-11,.row.cols-lg-11>*{max-width:91.66667%;flex-basis:91.66667%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-12,.row.cols-lg-12>*{max-width:100%;flex-basis:100%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-normal{order:initial}.col-lg-first{order:-999}.col-lg-last{order:999}}:root{--card-back-color:#f8f8f8;--card-fore-color:#111;--card-border-color:#ddd}.card{display:flex;flex-direction:column;justify-content:space-between;align-self:center;position:relative;width:100%;background:var(--card-back-color);color:var(--card-fore-color);border:.0625rem solid var(--card-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin);overflow:hidden}@media screen and (min-width: 320px){.card{max-width:320px}}.card>.section{background:var(--card-back-color);color:var(--card-fore-color);box-sizing:border-box;margin:0;border:0;border-radius:0;border-bottom:.0625rem solid var(--card-border-color);padding:var(--universal-padding);width:100%}.card>.section.media{height:200px;padding:0;-o-object-fit:cover;object-fit:cover}.card>.section:last-child{border-bottom:0}@media screen and (min-width: 240px){.card.small{max-width:240px}}@media screen and (min-width: 480px){.card.large{max-width:480px}}.card.fluid{max-width:100%;width:auto}.card.warning{--card-back-color:#ffca28;--card-border-color:#e8b825}.card.error{--card-back-color:#b71c1c;--card-fore-color:#f8f8f8;--card-border-color:#a71a1a}.card>.section.dark{--card-back-color:#e0e0e0}.card>.section.double-padded{padding:calc(1.5 * var(--universal-padding))}:root{--form-back-color:#f0f0f0;--form-fore-color:#111;--form-border-color:#ddd;--input-back-color:#f8f8f8;--input-fore-color:#111;--input-border-color:#ddd;--input-focus-color:#0288d1;--input-invalid-color:#d32f2f;--button-back-color:#e2e2e2;--button-hover-back-color:#dcdcdc;--button-fore-color:#212121;--button-border-color:transparent;--button-hover-border-color:transparent;--button-group-border-color:rgba(124,124,124,0.54)}form{background:var(--form-back-color);color:var(--form-fore-color);border:.0625rem solid var(--form-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin);padding:calc(2 * var(--universal-padding)) var(--universal-padding)}fieldset{border:.0625rem solid var(--form-border-color);border-radius:var(--universal-border-radius);margin:calc(var(--universal-margin) / 4);padding:var(--universal-padding)}legend{box-sizing:border-box;display:table;max-width:100%;white-space:normal;font-weight:700;padding:calc(var(--universal-padding) / 2)}label{padding:calc(var(--universal-padding) / 2) var(--universal-padding)}.input-group{display:inline-block}.input-group.fluid{display:flex;align-items:center;justify-content:center}.input-group.fluid>input{max-width:100%;flex-grow:1;flex-basis:0px}@media screen and (max-width: 767px){.input-group.fluid{align-items:stretch;flex-direction:column}}.input-group.vertical{display:flex;align-items:stretch;flex-direction:column}.input-group.vertical>input{max-width:100%;flex-grow:1;flex-basis:0px}[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}input:not([type]),[type="text"],[type="email"],[type="number"],[type="search"],[type="password"],[type="url"],[type="tel"],[type="checkbox"],[type="radio"],textarea,select{box-sizing:border-box;background:var(--input-back-color);color:var(--input-fore-color);border:.0625rem solid var(--input-border-color);border-radius:var(--universal-border-radius);margin:calc(var(--universal-margin) / 2);padding:var(--universal-padding) calc(1.5 * var(--universal-padding))}input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover,input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus,textarea:hover,textarea:focus,select:hover,select:focus{border-color:var(--input-focus-color);box-shadow:none}input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid,input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid,textarea:invalid,textarea:focus:invalid,select:invalid,select:focus:invalid{border-color:var(--input-invalid-color);box-shadow:none}input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly],textarea[readonly],select[readonly]{background:var(--secondary-back-color)}select{max-width:100%}option{overflow:hidden;text-overflow:ellipsis}[type="checkbox"],[type="radio"]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;height:calc(1rem + var(--universal-padding) / 2);width:calc(1rem + var(--universal-padding) / 2);vertical-align:text-bottom;padding:0;flex-basis:calc(1rem + var(--universal-padding) / 2) !important;flex-grow:0 !important}[type="checkbox"]:checked:before,[type="radio"]:checked:before{position:absolute}[type="checkbox"]:checked:before{content:'\2713';font-family:sans-serif;font-size:calc(1rem + var(--universal-padding) / 2);top:calc(0rem - var(--universal-padding));left:calc(var(--universal-padding) / 4)}[type="radio"]{border-radius:100%}[type="radio"]:checked:before{border-radius:100%;content:'';top:calc(.0625rem + var(--universal-padding) / 2);left:calc(.0625rem + var(--universal-padding) / 2);background:var(--input-fore-color);width:0.5rem;height:0.5rem}:placeholder-shown{color:var(--input-fore-color)}::-ms-placeholder{color:var(--input-fore-color);opacity:0.54}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button{overflow:visible;text-transform:none}button,[type="button"],[type="submit"],[type="reset"],a.button,label.button,.button,a[role="button"],label[role="button"],[role="button"]{display:inline-block;background:var(--button-back-color);color:var(--button-fore-color);border:.0625rem solid var(--button-border-color);border-radius:var(--universal-border-radius);padding:var(--universal-padding) calc(1.5 * var(--universal-padding));margin:var(--universal-margin);text-decoration:none;cursor:pointer;transition:background 0.3s}button:hover,button:focus,[type="button"]:hover,[type="button"]:focus,[type="submit"]:hover,[type="submit"]:focus,[type="reset"]:hover,[type="reset"]:focus,a.button:hover,a.button:focus,label.button:hover,label.button:focus,.button:hover,.button:focus,a[role="button"]:hover,a[role="button"]:focus,label[role="button"]:hover,label[role="button"]:focus,[role="button"]:hover,[role="button"]:focus{background:var(--button-hover-back-color);border-color:var(--button-hover-border-color)}input:disabled,input[disabled],textarea:disabled,textarea[disabled],select:disabled,select[disabled],button:disabled,button[disabled],.button:disabled,.button[disabled],[role="button"]:disabled,[role="button"][disabled]{cursor:not-allowed;opacity:.75}.button-group{display:flex;border:.0625rem solid var(--button-group-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin)}.button-group>button,.button-group [type="button"],.button-group>[type="submit"],.button-group>[type="reset"],.button-group>.button,.button-group>[role="button"]{margin:0;max-width:100%;flex:1 1 auto;text-align:center;border:0;border-radius:0;box-shadow:none}.button-group>:not(:first-child){border-left:.0625rem solid var(--button-group-border-color)}@media screen and (max-width: 767px){.button-group{flex-direction:column}.button-group>:not(:first-child){border:0;border-top:.0625rem solid var(--button-group-border-color)}}button.primary,[type="button"].primary,[type="submit"].primary,[type="reset"].primary,.button.primary,[role="button"].primary{--button-back-color:#1976d2;--button-fore-color:#f8f8f8}button.primary:hover,button.primary:focus,[type="button"].primary:hover,[type="button"].primary:focus,[type="submit"].primary:hover,[type="submit"].primary:focus,[type="reset"].primary:hover,[type="reset"].primary:focus,.button.primary:hover,.button.primary:focus,[role="button"].primary:hover,[role="button"].primary:focus{--button-hover-back-color:#1565c0}button.secondary,[type="button"].secondary,[type="submit"].secondary,[type="reset"].secondary,.button.secondary,[role="button"].secondary{--button-back-color:#d32f2f;--button-fore-color:#f8f8f8}button.secondary:hover,button.secondary:focus,[type="button"].secondary:hover,[type="button"].secondary:focus,[type="submit"].secondary:hover,[type="submit"].secondary:focus,[type="reset"].secondary:hover,[type="reset"].secondary:focus,.button.secondary:hover,.button.secondary:focus,[role="button"].secondary:hover,[role="button"].secondary:focus{--button-hover-back-color:#c62828}button.tertiary,[type="button"].tertiary,[type="submit"].tertiary,[type="reset"].tertiary,.button.tertiary,[role="button"].tertiary{--button-back-color:#308732;--button-fore-color:#f8f8f8}button.tertiary:hover,button.tertiary:focus,[type="button"].tertiary:hover,[type="button"].tertiary:focus,[type="submit"].tertiary:hover,[type="submit"].tertiary:focus,[type="reset"].tertiary:hover,[type="reset"].tertiary:focus,.button.tertiary:hover,.button.tertiary:focus,[role="button"].tertiary:hover,[role="button"].tertiary:focus{--button-hover-back-color:#277529}button.inverse,[type="button"].inverse,[type="submit"].inverse,[type="reset"].inverse,.button.inverse,[role="button"].inverse{--button-back-color:#212121;--button-fore-color:#f8f8f8}button.inverse:hover,button.inverse:focus,[type="button"].inverse:hover,[type="button"].inverse:focus,[type="submit"].inverse:hover,[type="submit"].inverse:focus,[type="reset"].inverse:hover,[type="reset"].inverse:focus,.button.inverse:hover,.button.inverse:focus,[role="button"].inverse:hover,[role="button"].inverse:focus{--button-hover-back-color:#111}button.small,[type="button"].small,[type="submit"].small,[type="reset"].small,.button.small,[role="button"].small{padding:calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding));margin:var(--universal-margin)}button.large,[type="button"].large,[type="submit"].large,[type="reset"].large,.button.large,[role="button"].large{padding:calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding));margin:var(--universal-margin)}:root{--header-back-color:#f8f8f8;--header-hover-back-color:#f0f0f0;--header-fore-color:#444;--header-border-color:#ddd;--nav-back-color:#f8f8f8;--nav-hover-back-color:#f0f0f0;--nav-fore-color:#444;--nav-border-color:#ddd;--nav-link-color:#0277bd;--footer-fore-color:#444;--footer-back-color:#f8f8f8;--footer-border-color:#ddd;--footer-link-color:#0277bd;--drawer-back-color:#f8f8f8;--drawer-hover-back-color:#f0f0f0;--drawer-border-color:#ddd;--drawer-close-color:#444}header{height:3.1875rem;background:var(--header-back-color);color:var(--header-fore-color);border-bottom:.0625rem solid var(--header-border-color);padding:calc(var(--universal-padding) / 4) 0;white-space:nowrap;overflow-x:auto;overflow-y:hidden}header.row{box-sizing:content-box}header .logo{color:var(--header-fore-color);font-size:1.75rem;padding:var(--universal-padding) calc(2 * var(--universal-padding));text-decoration:none}header button,header [type="button"],header .button,header [role="button"]{box-sizing:border-box;position:relative;top:calc(0rem - var(--universal-padding) / 4);height:calc(3.1875rem + var(--universal-padding) / 2);background:var(--header-back-color);line-height:calc(3.1875rem - var(--universal-padding) * 1.5);text-align:center;color:var(--header-fore-color);border:0;border-radius:0;margin:0;text-transform:uppercase}header button:hover,header button:focus,header [type="button"]:hover,header [type="button"]:focus,header .button:hover,header .button:focus,header [role="button"]:hover,header [role="button"]:focus{background:var(--header-hover-back-color)}nav{background:var(--nav-back-color);color:var(--nav-fore-color);border:.0625rem solid var(--nav-border-color);border-radius:var(--universal-border-radius);margin:var(--universal-margin)}nav *{padding:var(--universal-padding) calc(1.5 * var(--universal-padding))}nav a,nav a:visited{display:block;color:var(--nav-link-color);border-radius:var(--universal-border-radius);transition:background 0.3s}nav a:hover,nav a:focus,nav a:visited:hover,nav a:visited:focus{text-decoration:none;background:var(--nav-hover-back-color)}nav .sublink-1{position:relative;margin-left:calc(2 * var(--universal-padding))}nav .sublink-1:before{position:absolute;left:calc(var(--universal-padding) - 1 * var(--universal-padding));top:-.0625rem;content:'';height:100%;border:.0625rem solid var(--nav-border-color);border-left:0}nav .sublink-2{position:relative;margin-left:calc(4 * var(--universal-padding))}nav .sublink-2:before{position:absolute;left:calc(var(--universal-padding) - 3 * var(--universal-padding));top:-.0625rem;content:'';height:100%;border:.0625rem solid var(--nav-border-color);border-left:0}footer{background:var(--footer-back-color);color:var(--footer-fore-color);border-top:.0625rem solid var(--footer-border-color);padding:calc(2 * var(--universal-padding)) var(--universal-padding);font-size:.875rem}footer a,footer a:visited{color:var(--footer-link-color)}header.sticky{position:-webkit-sticky;position:sticky;z-index:1101;top:0}footer.sticky{position:-webkit-sticky;position:sticky;z-index:1101;bottom:0}.drawer-toggle:before{display:inline-block;position:relative;vertical-align:bottom;content:'\00a0\2261\00a0';font-family:sans-serif;font-size:1.5em}@media screen and (min-width: 768px){.drawer-toggle:not(.persistent){display:none}}[type="checkbox"].drawer{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}[type="checkbox"].drawer+*{display:block;box-sizing:border-box;position:fixed;top:0;width:320px;height:100vh;overflow-y:auto;background:var(--drawer-back-color);border:.0625rem solid var(--drawer-border-color);border-radius:0;margin:0;z-index:1110;right:-320px;transition:right 0.3s}[type="checkbox"].drawer+* .drawer-close{position:absolute;top:var(--universal-margin);right:var(--universal-margin);z-index:1111;width:2rem;height:2rem;border-radius:var(--universal-border-radius);padding:var(--universal-padding);margin:0;cursor:pointer;transition:background 0.3s}[type="checkbox"].drawer+* .drawer-close:before{display:block;content:'\00D7';color:var(--drawer-close-color);position:relative;font-family:sans-serif;font-size:2rem;line-height:1;text-align:center}[type="checkbox"].drawer+* .drawer-close:hover,[type="checkbox"].drawer+* .drawer-close:focus{background:var(--drawer-hover-back-color)}@media screen and (max-width: 320px){[type="checkbox"].drawer+*{width:100%}}[type="checkbox"].drawer:checked+*{right:0}@media screen and (min-width: 768px){[type="checkbox"].drawer:not(.persistent)+*{position:static;height:100%;z-index:1100}[type="checkbox"].drawer:not(.persistent)+* .drawer-close{display:none}}:root{--table-border-color:#aaa;--table-border-separator-color:#666;--table-head-back-color:#e6e6e6;--table-head-fore-color:#111;--table-body-back-color:#f8f8f8;--table-body-fore-color:#111;--table-body-alt-back-color:#eee}table{border-collapse:separate;border-spacing:0;margin:0;display:flex;flex:0 1 auto;flex-flow:row wrap;padding:var(--universal-padding);padding-top:0}table caption{font-size:1.5rem;margin:calc(2 * var(--universal-margin)) 0;max-width:100%;flex:0 0 100%}table thead,table tbody{display:flex;flex-flow:row wrap;border:.0625rem solid var(--table-border-color)}table thead{z-index:999;border-radius:var(--universal-border-radius) var(--universal-border-radius) 0 0;border-bottom:.0625rem solid var(--table-border-separator-color)}table tbody{border-top:0;margin-top:calc(0 - var(--universal-margin));border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}table tr{display:flex;padding:0}table th,table td{padding:calc(2 * var(--universal-padding))}table th{text-align:left;background:var(--table-head-back-color);color:var(--table-head-fore-color)}table td{background:var(--table-body-back-color);color:var(--table-body-fore-color);border-top:.0625rem solid var(--table-border-color)}table:not(.horizontal){overflow:auto;max-height:400px}table:not(.horizontal) thead,table:not(.horizontal) tbody{max-width:100%;flex:0 0 100%}table:not(.horizontal) tr{flex-flow:row wrap;flex:0 0 100%}table:not(.horizontal) th,table:not(.horizontal) td{flex:1 0 0%;overflow:hidden;text-overflow:ellipsis}table:not(.horizontal) thead{position:sticky;top:0}table:not(.horizontal) tbody tr:first-child td{border-top:0}table.horizontal{border:0}table.horizontal thead,table.horizontal tbody{border:0;flex-flow:row nowrap}table.horizontal tbody{overflow:auto;justify-content:space-between;flex:1 0 0;margin-left:calc( 4 * var(--universal-margin));padding-bottom:calc(var(--universal-padding) / 4)}table.horizontal tr{flex-direction:column;flex:1 0 auto}table.horizontal th,table.horizontal td{width:100%;border:0;border-bottom:.0625rem solid var(--table-border-color)}table.horizontal th:not(:first-child),table.horizontal td:not(:first-child){border-top:0}table.horizontal th{text-align:right;border-left:.0625rem solid var(--table-border-color);border-right:.0625rem solid var(--table-border-separator-color)}table.horizontal thead tr:first-child{padding-left:0}table.horizontal th:first-child,table.horizontal td:first-child{border-top:.0625rem solid var(--table-border-color)}table.horizontal tbody tr:last-child td{border-right:.0625rem solid var(--table-border-color)}table.horizontal tbody tr:last-child td:first-child{border-top-right-radius:0.25rem}table.horizontal tbody tr:last-child td:last-child{border-bottom-right-radius:0.25rem}table.horizontal thead tr:first-child th:first-child{border-top-left-radius:0.25rem}table.horizontal thead tr:first-child th:last-child{border-bottom-left-radius:0.25rem}@media screen and (max-width: 767px){table,table.horizontal{border-collapse:collapse;border:0;width:100%;display:table}table thead,table th,table.horizontal thead,table.horizontal th{border:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}table tbody,table.horizontal tbody{border:0;display:table-row-group}table tr,table.horizontal tr{display:block;border:.0625rem solid var(--table-border-color);border-radius:var(--universal-border-radius);background:#fafafa;padding:var(--universal-padding);margin:var(--universal-margin);margin-bottom:calc(2 * var(--universal-margin))}table th,table td,table.horizontal th,table.horizontal td{width:auto}table td,table.horizontal td{display:block;border:0;text-align:right}table td:before,table.horizontal td:before{content:attr(data-label);float:left;font-weight:600}table th:first-child,table td:first-child,table.horizontal th:first-child,table.horizontal td:first-child{border-top:0}table tbody tr:last-child td,table.horizontal tbody tr:last-child td{border-right:0}}:root{--table-body-alt-back-color:#eee}table.striped tr:nth-of-type(2n)>td{background:var(--table-body-alt-back-color)}@media screen and (max-width: 768px){table.striped tr:nth-of-type(2n){background:var(--table-body-alt-back-color)}}:root{--table-body-hover-back-color:#90caf9}table.hoverable tr:hover,table.hoverable tr:hover>td,table.hoverable tr:focus,table.hoverable tr:focus>td{background:var(--table-body-hover-back-color)}@media screen and (max-width: 768px){table.hoverable tr:hover,table.hoverable tr:hover>td,table.hoverable tr:focus,table.hoverable tr:focus>td{background:var(--table-body-hover-back-color)}}:root{--mark-back-color:#0277bd;--mark-fore-color:#fafafa}mark{background:var(--mark-back-color);color:var(--mark-fore-color);font-size:.95em;line-height:1em;border-radius:var(--universal-border-radius);padding:calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2)}mark.inline-block{display:inline-block;font-size:1em;line-height:1.5;padding:calc(var(--universal-padding) / 2) var(--universal-padding)}:root{--toast-back-color:#424242;--toast-fore-color:#fafafa}.toast{position:fixed;bottom:calc(var(--universal-margin) * 3);left:50%;transform:translate(-50%, -50%);z-index:1111;color:var(--toast-fore-color);background:var(--toast-back-color);border-radius:calc(var(--universal-border-radius) * 16);padding:var(--universal-padding) calc(var(--universal-padding) * 3)}:root{--tooltip-back-color:#212121;--tooltip-fore-color:#fafafa}.tooltip{position:relative;display:inline-block}.tooltip:before,.tooltip:after{position:absolute;opacity:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);transition:all 0.3s;z-index:1010;left:50%}.tooltip:not(.bottom):before,.tooltip:not(.bottom):after{bottom:75%}.tooltip.bottom:before,.tooltip.bottom:after{top:75%}.tooltip:hover:before,.tooltip:hover:after,.tooltip:focus:before,.tooltip:focus:after{opacity:1;clip:auto;-webkit-clip-path:inset(0%);clip-path:inset(0%)}.tooltip:before{content:'';background:transparent;border:var(--universal-margin) solid transparent;left:calc(50% - var(--universal-margin))}.tooltip:not(.bottom):before{border-top-color:#212121}.tooltip.bottom:before{border-bottom-color:#212121}.tooltip:after{content:attr(aria-label);color:var(--tooltip-fore-color);background:var(--tooltip-back-color);border-radius:var(--universal-border-radius);padding:var(--universal-padding);white-space:nowrap;transform:translateX(-50%)}.tooltip:not(.bottom):after{margin-bottom:calc(2 * var(--universal-margin))}.tooltip.bottom:after{margin-top:calc(2 * var(--universal-margin))}:root{--modal-overlay-color:rgba(0,0,0,0.45);--modal-close-color:#444;--modal-close-hover-color:#f0f0f0}[type="checkbox"].modal{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}[type="checkbox"].modal+div{position:fixed;top:0;left:0;display:none;width:100vw;height:100vh;background:var(--modal-overlay-color)}[type="checkbox"].modal+div .card{margin:0 auto;max-height:50vh;overflow:auto}[type="checkbox"].modal+div .card .modal-close{position:absolute;top:0;right:0;width:1.75rem;height:1.75rem;border-radius:var(--universal-border-radius);padding:var(--universal-padding);margin:0;cursor:pointer;transition:background 0.3s}[type="checkbox"].modal+div .card .modal-close:before{display:block;content:'\00D7';color:var(--modal-close-color);position:relative;font-family:sans-serif;font-size:1.75rem;line-height:1;text-align:center}[type="checkbox"].modal+div .card .modal-close:hover,[type="checkbox"].modal+div .card .modal-close:focus{background:var(--modal-close-hover-color)}[type="checkbox"].modal:checked+div{display:flex;flex:0 1 auto;z-index:1200}[type="checkbox"].modal:checked+div .card .modal-close{z-index:1211}:root{--collapse-label-back-color:#e8e8e8;--collapse-label-fore-color:#212121;--collapse-label-hover-back-color:#f0f0f0;--collapse-selected-label-back-color:#ececec;--collapse-border-color:#ddd;--collapse-content-back-color:#fafafa;--collapse-selected-label-border-color:#0277bd}.collapse{width:calc(100% - 2 * var(--universal-margin));opacity:1;display:flex;flex-direction:column;margin:var(--universal-margin);border-radius:var(--universal-border-radius)}.collapse>[type="radio"],.collapse>[type="checkbox"]{height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%)}.collapse>label{flex-grow:1;display:inline-block;height:1.5rem;cursor:pointer;transition:background 0.3s;color:var(--collapse-label-fore-color);background:var(--collapse-label-back-color);border:.0625rem solid var(--collapse-border-color);padding:calc(1.5 * var(--universal-padding))}.collapse>label:hover,.collapse>label:focus{background:var(--collapse-label-hover-back-color)}.collapse>label+div{flex-basis:auto;height:1px;width:1px;margin:-1px;overflow:hidden;position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);transition:max-height 0.3s;max-height:1px}.collapse>:checked+label{background:var(--collapse-selected-label-back-color);border-bottom-color:var(--collapse-selected-label-border-color)}.collapse>:checked+label+div{box-sizing:border-box;position:relative;width:100%;height:auto;overflow:auto;margin:0;background:var(--collapse-content-back-color);border:.0625rem solid var(--collapse-border-color);border-top:0;padding:var(--universal-padding);clip:auto;-webkit-clip-path:inset(0%);clip-path:inset(0%);max-height:400px}.collapse>label:not(:first-of-type){border-top:0}.collapse>label:first-of-type{border-radius:var(--universal-border-radius) var(--universal-border-radius) 0 0}.collapse>label:last-of-type:not(:first-of-type){border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}.collapse>label:last-of-type:first-of-type{border-radius:var(--universal-border-radius)}.collapse>:checked:last-of-type:not(:first-of-type)+label{border-radius:0}.collapse>:checked:last-of-type+label+div{border-radius:0 0 var(--universal-border-radius) var(--universal-border-radius)}mark.secondary{--mark-back-color:#d32f2f}mark.tertiary{--mark-back-color:#308732}mark.tag{padding:calc(var(--universal-padding)/2) var(--universal-padding);border-radius:1em}:root{--progress-back-color:#ddd;--progress-fore-color:#555}progress{display:block;vertical-align:baseline;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.75rem;width:calc(100% - 2 * var(--universal-margin));margin:var(--universal-margin);border:0;border-radius:calc(2 * var(--universal-border-radius));background:var(--progress-back-color);color:var(--progress-fore-color)}progress::-webkit-progress-value{background:var(--progress-fore-color);border-top-left-radius:calc(2 * var(--universal-border-radius));border-bottom-left-radius:calc(2 * var(--universal-border-radius))}progress::-webkit-progress-bar{background:var(#ddd)}progress::-moz-progress-bar{background:var(--progress-fore-color);border-top-left-radius:calc(2 * var(--universal-border-radius));border-bottom-left-radius:calc(2 * var(--universal-border-radius))}progress[value="1000"]::-webkit-progress-value{border-radius:calc(2 * var(--universal-border-radius))}progress[value="1000"]::-moz-progress-bar{border-radius:calc(2 * var(--universal-border-radius))}progress.inline{display:inline-block;vertical-align:middle;width:60%}:root{--spinner-back-color:#ddd;--spinner-fore-color:#555}@keyframes spinner-donut-anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.spinner{display:inline-block;margin:var(--universal-margin);border:.25rem solid var(--spinner-back-color);border-left:.25rem solid var(--spinner-fore-color);border-radius:50%;width:1.25rem;height:1.25rem;animation:spinner-donut-anim 1.2s linear infinite}progress.primary{--progress-fore-color:#1976d2}progress.secondary{--progress-fore-color:#d32f2f}progress.tertiary{--progress-fore-color:#308732}.spinner.primary{--spinner-fore-color:#1976d2}.spinner.secondary{--spinner-fore-color:#d32f2f}.spinner.tertiary{--spinner-fore-color:#308732}span[class^='icon-']{display:inline-block;height:1em;width:1em;vertical-align:-0.125em;background-size:contain;margin:0 calc(var(--universal-margin) / 4)}span[class^='icon-'].secondary{-webkit-filter:invert(25%);filter:invert(25%)}span[class^='icon-'].inverse{-webkit-filter:invert(100%);filter:invert(100%)}span.icon-alert{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12' y2='16'%3E%3C/line%3E%3C/svg%3E")}span.icon-bookmark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E")}span.icon-calendar{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E")}span.icon-credit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E")}span.icon-edit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34'%3E%3C/path%3E%3Cpolygon points='18 2 22 6 12 16 8 16 8 12 18 2'%3E%3C/polygon%3E%3C/svg%3E")}span.icon-link{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E")}span.icon-help{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='17' x2='12' y2='17'%3E%3C/line%3E%3C/svg%3E")}span.icon-home{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E")}span.icon-info{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='8'%3E%3C/line%3E%3C/svg%3E")}span.icon-lock{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E")}span.icon-mail{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E")}span.icon-location{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E")}span.icon-phone{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E")}span.icon-rss{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'%3E%3C/path%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'%3E%3C/path%3E%3Ccircle cx='5' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E")}span.icon-search{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")}span.icon-settings{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E")}span.icon-share{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='3'%3E%3C/circle%3E%3Ccircle cx='18' cy='19' r='3'%3E%3C/circle%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'%3E%3C/line%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'%3E%3C/line%3E%3C/svg%3E")}span.icon-cart{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E")}span.icon-upload{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E")}span.icon-user{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E")}:root{--generic-border-color:rgba(0,0,0,0.3);--generic-box-shadow:0 .25rem .25rem 0 rgba(0,0,0,0.125),0 .125rem .125rem -.125rem rgba(0,0,0,0.25)}.hidden{display:none !important}.visually-hidden{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}.bordered{border:.0625rem solid var(--generic-border-color) !important}.rounded{border-radius:var(--universal-border-radius) !important}.circular{border-radius:50% !important}.shadowed{box-shadow:var(--generic-box-shadow) !important}.responsive-margin{margin:calc(var(--universal-margin) / 4) !important}@media screen and (min-width: 768px){.responsive-margin{margin:calc(var(--universal-margin) / 2) !important}}@media screen and (min-width: 1280px){.responsive-margin{margin:var(--universal-margin) !important}}.responsive-padding{padding:calc(var(--universal-padding) / 4) !important}@media screen and (min-width: 768px){.responsive-padding{padding:calc(var(--universal-padding) / 2) !important}}@media screen and (min-width: 1280px){.responsive-padding{padding:var(--universal-padding) !important}}@media screen and (max-width: 767px){.hidden-sm{display:none !important}}@media screen and (min-width: 768px) and (max-width: 1279px){.hidden-md{display:none !important}}@media screen and (min-width: 1280px){.hidden-lg{display:none !important}}@media screen and (max-width: 767px){.visually-hidden-sm{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}}@media screen and (min-width: 768px) and (max-width: 1279px){.visually-hidden-md{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}}@media screen and (min-width: 1280px){.visually-hidden-lg{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;border:0 !important;padding:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;overflow:hidden !important}} diff --git a/docs/build-docs.js b/docs/build-docs.js index 0d27845..46a83f1 100644 --- a/docs/build-docs.js +++ b/docs/build-docs.js @@ -1,192 +1,192 @@ -var fs = require('fs'); -var version = require('./vinf'); // Gets version info. -var frameworkUrl = `"https://cdnjs.cloudflare.com/ajax/libs/mini.css/${version.version.slice(1)}/mini-default.css"`; -// INDEX - -var indexHtml = ` - - - - - mini.css - Minimal, responsive, style-agnostic CSS framework - - - - - - - - - - -
-
-
-

mini.css

-

minimal, responsive, style-agnostic
CSS framework

-

${version.version}

- Get started -
-
- - - - -  Docs - - -  Github - - -  Flavors - -
-
-
- -

Fast and Responsive


-

Want to build websites that look beautiful on any and all devices, but also load fast on mobile connections? Then mini.css is the right tool for you! Its tiny size (under 10KB gzipped), along with its responsive grid and modern components ensures that all your users are satisfied and can access your website anytime, anywhere. Bridging the gap between fully-featured frameworks (e.g. Bootstrap and Semantic UI) and micro frameworks (e.g. Milligram and Pure.CSS), mini.css packs a lot of features in a small package, while it relies solely on CSS, meaning you do not have to worry about any conflicts with other Javascript libraries you might be using.

-
-
-
-
- -

Tailored to Your Needs


-

Creating a CSS framework that caters to everyone's needs is no easy task, but mini.css manages to rise to the occasion by providing extensive and coherent documentation in combination with templates, examples and semantic HTML5 markup. Modern UX patterns and accessibility guidelines are well-documented and can be used out of the box, using one of the unique flavors that the framework provides. If you still want more, you can create your own custom flavor or tweak an existing one just by opening its CSS file and changing a few custom properties. It's that simple!

-
-
-
-
-

Get started now!


-

Head over to the documentation to learn how to get started using mini.css, as well as what flavors and components are availble and how to use them to create the website or web app you've always wanted. If you like the framework and want to support it, remember to to star it on Github. It means a lot to us and it only takes a couple of seconds!

-

Get started

- mini.css on Github -
-
- - -`; - -var indexOutputPath = './docs/v3/index.html'; // This path is relative to package.json. - -fs.writeFile(indexOutputPath, - `${indexHtml}`, - function(err) { if(err) return console.log(err); console.log("Index file generated!"); } -); - -// DOCUMENTATION -var docFragments = require('./doc-fragments/docFragments'); // Gets all document fragments as a list. -var docOutputPath = './docs/v3/docs.html'; // This path is relative to package.json. - -const FEATHER_BANNER = ` Powered by Feather`; - -var documentStart = ` - - - -mini.css - Docs - - - - - - - - -`; -var documentEnd = ``; - -var appShellStart = `
- - - -  Github - - -  Flavors - -
-
`; -var appShellEnd = `
`; - -var appSidebarStart = ` -`; - -var mainStart = `
`; -var mainEnd = `
`; - -var documentationFragments = docFragments.map(f => buildFragment(f)).join('
'); -var documentationLinks = docFragments.map(f => buildLink(f)).join(''); -var documentationSearch = ` -`; - -function buildFragment(fragment){ - var fragmentHtml = `
-

${fragment.title}

- ${fragment.id === 'icons'?FEATHER_BANNER:''} -
${fragment.description}
- ${fragment.example?`

Example

${fragment.example}
`:''} - ${fragment.samples.length?`

Sample code

${fragment.samples.join('')}
`:''} - ${fragment.modifiers.length? - `

Modifiers

- ${fragment.modifiers.map(m => `

${m.title}

${m.description}${m.example?`
Example
${m.example}`:''}${m.samples.length?`
Sample code
${m.samples.join('')}`:''}`).join('
')}
`:''} - ${fragment.dos.length||fragment.donts.length? - `

Best practices

${[fragment.dos.map(d => `
${d.sample}

Do: ${d.description}

`).join('
'),fragment.donts.map(d => `
${d.sample}

Don't: ${d.description}

`).join('
')].join('')}
` - :''} - ${fragment.notes.length?`

Notes

`:''} - ${fragment.customization.length?`

Customization

`:''} -
`; - return fragmentHtml; -} - -function buildLink(fragment){ - return `${fragment.title}`; -} - -function stripData(fragment){ - return `{id: "${fragment.id}", keys: [${fragment.keywords.map(k=>`"${k}"`)}] }`; -} - -fs.writeFile(docOutputPath, - `${documentStart}${appShellStart} - ${appSidebarStart}${documentationLinks}${appSidebarEnd} - ${mainStart}${documentationFragments}${mainEnd} - ${appShellEnd} - ${documentationSearch} - ${documentEnd}`, - function(err) { if(err) return console.log(err); console.log("Documentation file generated!"); } -); +var fs = require('fs'); +var version = require('./vinf'); // Gets version info. +var frameworkUrl = `"https://cdnjs.cloudflare.com/ajax/libs/mini.css/${version.version.slice(1)}/mini-default.css"`; +// INDEX + +var indexHtml = ` + + + + + mini.css - Minimal, responsive, style-agnostic CSS framework + + + + + + + + + + +
+
+
+

mini.css

+

minimal, responsive, style-agnostic
CSS framework

+

${version.version}

+ Get started +
+
+ + + + +  Docs + + +  Github + + +  Flavors + +
+
+
+ +

Fast and Responsive


+

Want to build websites that look beautiful on any and all devices, but also load fast on mobile connections? Then mini.css is the right tool for you! Its tiny size (under 10KB gzipped), along with its responsive grid and modern components ensures that all your users are satisfied and can access your website anytime, anywhere. Bridging the gap between fully-featured frameworks (e.g. Bootstrap and Semantic UI) and micro frameworks (e.g. Milligram and Pure.CSS), mini.css packs a lot of features in a small package, while it relies solely on CSS, meaning you do not have to worry about any conflicts with other Javascript libraries you might be using.

+
+
+
+
+ +

Tailored to Your Needs


+

Creating a CSS framework that caters to everyone's needs is no easy task, but mini.css manages to rise to the occasion by providing extensive and coherent documentation in combination with templates, examples and semantic HTML5 markup. Modern UX patterns and accessibility guidelines are well-documented and can be used out of the box, using one of the unique flavors that the framework provides. If you still want more, you can create your own custom flavor or tweak an existing one just by opening its CSS file and changing a few custom properties. It's that simple!

+
+
+
+
+

Get started now!


+

Head over to the documentation to learn how to get started using mini.css, as well as what flavors and components are availble and how to use them to create the website or web app you've always wanted. If you like the framework and want to support it, remember to to star it on Github. It means a lot to us and it only takes a couple of seconds!

+

Get started

+ mini.css on Github +
+
+ + +`; + +var indexOutputPath = './docs/v3/index.html'; // This path is relative to package.json. + +fs.writeFile(indexOutputPath, + `${indexHtml}`, + function(err) { if(err) return console.log(err); console.log("Index file generated!"); } +); + +// DOCUMENTATION +var docFragments = require('./doc-fragments/docFragments'); // Gets all document fragments as a list. +var docOutputPath = './docs/v3/docs.html'; // This path is relative to package.json. + +const FEATHER_BANNER = ` Powered by Feather`; + +var documentStart = ` + + + +mini.css - Docs + + + + + + + + +`; +var documentEnd = ``; + +var appShellStart = `
+ + + +  Github + + +  Flavors + +
+
`; +var appShellEnd = `
`; + +var appSidebarStart = ` +`; + +var mainStart = `
`; +var mainEnd = `
`; + +var documentationFragments = docFragments.map(f => buildFragment(f)).join('
'); +var documentationLinks = docFragments.map(f => buildLink(f)).join(''); +var documentationSearch = ` +`; + +function buildFragment(fragment){ + var fragmentHtml = `
+

${fragment.title}

+ ${fragment.id === 'icons'?FEATHER_BANNER:''} +
${fragment.description}
+ ${fragment.example?`

Example

${fragment.example}
`:''} + ${fragment.samples.length?`

Sample code

${fragment.samples.join('')}
`:''} + ${fragment.modifiers.length? + `

Modifiers

+ ${fragment.modifiers.map(m => `

${m.title}

${m.description}${m.example?`
Example
${m.example}`:''}${m.samples.length?`
Sample code
${m.samples.join('')}`:''}`).join('
')}
`:''} + ${fragment.dos.length||fragment.donts.length? + `

Best practices

${[fragment.dos.map(d => `
${d.sample}

Do: ${d.description}

`).join('
'),fragment.donts.map(d => `
${d.sample}

Don't: ${d.description}

`).join('
')].join('')}
` + :''} + ${fragment.notes.length?`

Notes

`:''} + ${fragment.customization.length?`

Customization

`:''} +
`; + return fragmentHtml; +} + +function buildLink(fragment){ + return `${fragment.title}`; +} + +function stripData(fragment){ + return `{id: "${fragment.id}", keys: [${fragment.keywords.map(k=>`"${k}"`)}] }`; +} + +fs.writeFile(docOutputPath, + `${documentStart}${appShellStart} + ${appSidebarStart}${documentationLinks}${appSidebarEnd} + ${mainStart}${documentationFragments}${mainEnd} + ${appShellEnd} + ${documentationSearch} + ${documentEnd}`, + function(err) { if(err) return console.log(err); console.log("Documentation file generated!"); } +); diff --git a/docs/doc-fragments/buttons.js b/docs/doc-fragments/buttons.js index 9675286..8418447 100644 --- a/docs/doc-fragments/buttons.js +++ b/docs/doc-fragments/buttons.js @@ -1,58 +1,58 @@ -module.exports = { - id: 'buttons', - title: 'Buttons', - keywords: [`button`, `input`, `reset`, `submit`, `link`, `a`, `label`, `primary`, `secondary`, `tertiary`, `aria`, `small`, `large`, `inverse`], - description: `

Buttons and button-like input elements have been styled by default to be consistent across browsers. You can also style other elements, such as links or form labels, to look like buttons, using the appropriate class (.button) or the button role.

`, - example: `Link`, - samples: [`
<button>Button</button>
-<input type="button" value="Button" />
-<input type="reset" value="Button" />
-<input type="submit" value="Button" />
-<a href="#" class="button">Link</a>
-<a href="#" role="button">Link</a>
-<label class="button">Label</label>
-<label role="button">Label</label>
`], - notes: [ - `It is recommended to use the button role instead of the provided class, if you want your custom buttons to be fully accessible.` - ], - customization: [ - `Text color for buttons can be changed by changing the value of the --button-fore-color variable.`, - `Background color for buttons can be changed by changing the value of the --button-back-color variable.`, - `Border color for buttons can be changed by changing the value of the --button-border-color variable.`, - `Background and border color for focused buttons can be changed by changing the values of the --button-hover-back-color and --button-hover-border-color variables respectively.`, - `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Color variants', - description: '

To make your buttons stand out, you can give them a primary (.primary), secondary (.secondary), tertiary (.tertiary) or inversed (.inverse) color palette.

', - example: ``, - samples: [`
<button class="primary">Primary</button>
-<button class="secondary">Secondary</button>
-<button class="tertiary">Tertiary</button>
-<button class="inverse">Inverse</button>
`] - }, - { - title : 'Size variants', - description: `

You can make buttons smaller (.small) or larger (.large), by applying the appropriate modifier.

`, - example: ``, - samples: [`
<button class="small">Small</button>
-<button class="large">Large</button>
`] - } - ], - dos: [{ - description: `File upload inputs are not styled by default, due to inconsistencies in how browsers handle them. If you want them to look like other buttons, you can hide them and use a linked label.`, - sample: `
<input type="file" id="file-input" style="display:none" />
-<label for="file-input" class="button">Upload file</label>
` - }], - donts: [ - { - description: `Avoid applying multiple modifiers of the same type on the same button.`, - sample: `
<button class="primary inverse">Button</button>
-<button class="small large">Button</button>
` - } - ] -} +module.exports = { + id: 'buttons', + title: 'Buttons', + keywords: [`button`, `input`, `reset`, `submit`, `link`, `a`, `label`, `primary`, `secondary`, `tertiary`, `aria`, `small`, `large`, `inverse`], + description: `

Buttons and button-like input elements have been styled by default to be consistent across browsers. You can also style other elements, such as links or form labels, to look like buttons, using the appropriate class (.button) or the button role.

`, + example: `Link`, + samples: [`
<button>Button</button>
+<input type="button" value="Button" />
+<input type="reset" value="Button" />
+<input type="submit" value="Button" />
+<a href="#" class="button">Link</a>
+<a href="#" role="button">Link</a>
+<label class="button">Label</label>
+<label role="button">Label</label>
`], + notes: [ + `It is recommended to use the button role instead of the provided class, if you want your custom buttons to be fully accessible.` + ], + customization: [ + `Text color for buttons can be changed by changing the value of the --button-fore-color variable.`, + `Background color for buttons can be changed by changing the value of the --button-back-color variable.`, + `Border color for buttons can be changed by changing the value of the --button-border-color variable.`, + `Background and border color for focused buttons can be changed by changing the values of the --button-hover-back-color and --button-hover-border-color variables respectively.`, + `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Color variants', + description: '

To make your buttons stand out, you can give them a primary (.primary), secondary (.secondary), tertiary (.tertiary) or inversed (.inverse) color palette.

', + example: ``, + samples: [`
<button class="primary">Primary</button>
+<button class="secondary">Secondary</button>
+<button class="tertiary">Tertiary</button>
+<button class="inverse">Inverse</button>
`] + }, + { + title : 'Size variants', + description: `

You can make buttons smaller (.small) or larger (.large), by applying the appropriate modifier.

`, + example: ``, + samples: [`
<button class="small">Small</button>
+<button class="large">Large</button>
`] + } + ], + dos: [{ + description: `File upload inputs are not styled by default, due to inconsistencies in how browsers handle them. If you want them to look like other buttons, you can hide them and use a linked label.`, + sample: `
<input type="file" id="file-input" style="display:none" />
+<label for="file-input" class="button">Upload file</label>
` + }], + donts: [ + { + description: `Avoid applying multiple modifiers of the same type on the same button.`, + sample: `
<button class="primary inverse">Button</button>
+<button class="small large">Button</button>
` + } + ] +} diff --git a/docs/doc-fragments/cardSections.js b/docs/doc-fragments/cardSections.js index 5a114d2..ccca3dd 100644 --- a/docs/doc-fragments/cardSections.js +++ b/docs/doc-fragments/cardSections.js @@ -1,85 +1,85 @@ -module.exports = { - id: 'card-sections', - title: 'Card sections', - keywords: [`card`, `row`, `section`, `container`, `col`, `column`, `media`, `double-padded`, `dark`], - description: '

Card content is usually organized in smaller sections (.section) to be more easily digestible. A card section can be any valid HTML5 element with the appropriate class applied to it.

', - example: `
-

Title section

This is a section with some textual content.

-
`, - samples: [`
<div class="card">
-  <div class="section"></div>
-  <div class="section"></div>
-</div>
`], - notes: [ - `While not mandatory, it is highly suggested that you wrap all of your cards' contents in one or more sections.`, - `Remember that a section can be any valid HTML5 element, so you can apply them to headings, paragraphs, input elements etc.`, - `Media sections have a default height of 200px.`, - `Due to the media sections using object-fit, you might want to use a polyfill for better browser support (recommended: image polyfill, video polyfill).`, - `Depending on the source website, some embedded videos might not display properly as media sections.` - ], - customization: [ - `Text color for cards and card sections can be changed by changing the value of the --card-fore-color variable.`, - `Background color for cards and card sections can be changed by changing the value of the --card-back-color variable.`, - `Border color for cards and card sections can be changed by changing the value of the --card-border-color variable.`, - `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` - ], - modifiers: [ - { - title : 'Media sections', - description: '

You can create sections for media (.media), such as images or videos (using an <img> or a <iframe> element respectively). These sections are styled appropriately for presentation of media content, meaning that the content will scale appropriately to fill up the available space.

', - example: `
-

Card with image

placeholder
-

Card with video

-
`, - samples: [`
<div class="card">
-  <img src="image.png" class="section media"/>
-</div>
`] - }, - { - title : 'Color variants', - description: '

You can create sections with a darker (.dark) background, by applying the appropriate modifier.

', - example: `
-

Normal section

Dark section

-
`, - samples: [`
<div class="card">
-  <div class="section dark"></div>
-</div>
`] - }, - { - title : 'Additional spacing', - description: '

You can create sections with additional spacing (.double-padded), by applying the appropriate modifier.

', - example: `
-

Normal spacing

Additional spacing

-
`, - samples: [`
<div class="card">
-  <div class="section double-padded"></div>
-</div>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid mixing regular content with content in sections. Instead, wrap all of your card's contents in sections.`, - sample: `
<div class="card">
-  <div class="section"></div>
-  <p>This should have been a section!</p>
-</div>
` - } - ] -} - -/* - Modifiers: - { - title : '', - description: '', - example: '', - samples: [] - } - Dos/Donts: - { - description: '', - sample: '' - } -*/ +module.exports = { + id: 'card-sections', + title: 'Card sections', + keywords: [`card`, `row`, `section`, `container`, `col`, `column`, `media`, `double-padded`, `dark`], + description: '

Card content is usually organized in smaller sections (.section) to be more easily digestible. A card section can be any valid HTML5 element with the appropriate class applied to it.

', + example: `
+

Title section

This is a section with some textual content.

+
`, + samples: [`
<div class="card">
+  <div class="section"></div>
+  <div class="section"></div>
+</div>
`], + notes: [ + `While not mandatory, it is highly suggested that you wrap all of your cards' contents in one or more sections.`, + `Remember that a section can be any valid HTML5 element, so you can apply them to headings, paragraphs, input elements etc.`, + `Media sections have a default height of 200px.`, + `Due to the media sections using object-fit, you might want to use a polyfill for better browser support (recommended: image polyfill, video polyfill).`, + `Depending on the source website, some embedded videos might not display properly as media sections.` + ], + customization: [ + `Text color for cards and card sections can be changed by changing the value of the --card-fore-color variable.`, + `Background color for cards and card sections can be changed by changing the value of the --card-back-color variable.`, + `Border color for cards and card sections can be changed by changing the value of the --card-border-color variable.`, + `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` + ], + modifiers: [ + { + title : 'Media sections', + description: '

You can create sections for media (.media), such as images or videos (using an <img> or a <iframe> element respectively). These sections are styled appropriately for presentation of media content, meaning that the content will scale appropriately to fill up the available space.

', + example: `
+

Card with image

placeholder
+

Card with video

+
`, + samples: [`
<div class="card">
+  <img src="image.png" class="section media"/>
+</div>
`] + }, + { + title : 'Color variants', + description: '

You can create sections with a darker (.dark) background, by applying the appropriate modifier.

', + example: `
+

Normal section

Dark section

+
`, + samples: [`
<div class="card">
+  <div class="section dark"></div>
+</div>
`] + }, + { + title : 'Additional spacing', + description: '

You can create sections with additional spacing (.double-padded), by applying the appropriate modifier.

', + example: `
+

Normal spacing

Additional spacing

+
`, + samples: [`
<div class="card">
+  <div class="section double-padded"></div>
+</div>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid mixing regular content with content in sections. Instead, wrap all of your card's contents in sections.`, + sample: `
<div class="card">
+  <div class="section"></div>
+  <p>This should have been a section!</p>
+</div>
` + } + ] +} + +/* + Modifiers: + { + title : '', + description: '', + example: '', + samples: [] + } + Dos/Donts: + { + description: '', + sample: '' + } +*/ diff --git a/docs/doc-fragments/cards.js b/docs/doc-fragments/cards.js index dfb26c7..e06fdfe 100644 --- a/docs/doc-fragments/cards.js +++ b/docs/doc-fragments/cards.js @@ -1,89 +1,89 @@ -module.exports = { - id: 'cards', - title: 'Cards', - keywords: [`card`, `row`, `section`, `container`, `col`, `column`, `small`, `large`, `fluid`, `warning`, `error`], - description: `

mini.css provides you with cards (.card), general-purpose containers that help you organize the content of your web apps. Cards should be used in combination with the grid system, meaning that they need to be placed inside a grid's rows to work properly. Layouts created with cards are responsive, realigning according to the available size on the screen.

`, - example: `
-

Card 1

This is a basic card with some sample content.

-

Card 2

This is another card with some sample content.

-

Card 3

This is one more card with some sample content.

-
`, - samples: [`
<div class="row">
-  <div class="card"></div>
-  <div class="card"></div>
-</div>
`], - notes: [`Due to the fact that fluid cards stretch to fill their parent container, they might not fully respect their margins sometimes, although this should not cause any noticable problems in your web apps' layouts.`], - customization: [ - `Text color for cards can be changed by changing the value of the --card-fore-color variable.`, - `Background color for cards can be changed by changing the value of the --card-back-color variable.`, - `Border color for cards can be changed by changing the value of the --card-border-color variable.`, - `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Alternative sizes', - description: `

You can create small (.small, 240px wide) or large (.large, 480px wide) cards by applying the appropriate modifiers to a card. Apart from that, you can also create fluid (.fluid) cards, that take up as much space as is available, however you will have to place these cards inside a grid layout's columns, effectively adding one extra step for them to display properly.

`, - example: `
-

Small Card

Small cards are 240px wide.

-

Large Card

Large cards are 480px wide.

-
-

Fluid Card

Fluid cards scale their width based on the column that contains them.

-
`, - samples: [`
<div class="row">
-  <div class="card small"></div>
-  <div class="card large"></div>
-  <div class="col-sm-12">
-    <div class="card fluid"></div>
-  </div>
-</div>
`] - }, - { - title : 'Color variants', - description: `

You can display warning (.warning) or error (.error) messages using cards, simply by adding the appropriate color modifiers to a card.

`, - example: `
-

Warning Card

Warning cards are used to display important information to users.

-

Error Card

Error cards are used to display error messages to users.

-
`, - samples: [`
<div class="row">
-  <div class="card warning"></div>
-  <div class="card error"></div>
-</div>
`] - } - ], - dos: [ - { - description: `You can create rows inside a card, which can in turn contain other cards.`, - sample: `
<div class="card">
-  <div class="row">
-    <div class="card"></div>
-  </div>
-</div>
` - } - ], - donts: [ - { - description: `An element cannot be a card and a row or column at the same time.`, - sample: `
<div class="card row"></div>
-<div class="card col-sm"></div>
` - }, - { - description: `Never forget to wrap your cards inside a row and your fluid cards inside a row and a column.`, - sample: `
<div>
-  <div class="card"></div>
-</div>
` - }, - { - description: `Try not to combine fixed-width and fluid cards. Instead, combine fixed-width cards with columns and place fluid cards inside them.`, - sample: `
<div class="row">
-  <div class="card"></div>
-  <div class="card fluid"></div>
-</div>
` - }, - { - description: `Avoid applying two color modifiers on the same card.`, - sample: `
<div class="card warning error"></div>
` - } - ] -} +module.exports = { + id: 'cards', + title: 'Cards', + keywords: [`card`, `row`, `section`, `container`, `col`, `column`, `small`, `large`, `fluid`, `warning`, `error`], + description: `

mini.css provides you with cards (.card), general-purpose containers that help you organize the content of your web apps. Cards should be used in combination with the grid system, meaning that they need to be placed inside a grid's rows to work properly. Layouts created with cards are responsive, realigning according to the available size on the screen.

`, + example: `
+

Card 1

This is a basic card with some sample content.

+

Card 2

This is another card with some sample content.

+

Card 3

This is one more card with some sample content.

+
`, + samples: [`
<div class="row">
+  <div class="card"></div>
+  <div class="card"></div>
+</div>
`], + notes: [`Due to the fact that fluid cards stretch to fill their parent container, they might not fully respect their margins sometimes, although this should not cause any noticable problems in your web apps' layouts.`], + customization: [ + `Text color for cards can be changed by changing the value of the --card-fore-color variable.`, + `Background color for cards can be changed by changing the value of the --card-back-color variable.`, + `Border color for cards can be changed by changing the value of the --card-border-color variable.`, + `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Alternative sizes', + description: `

You can create small (.small, 240px wide) or large (.large, 480px wide) cards by applying the appropriate modifiers to a card. Apart from that, you can also create fluid (.fluid) cards, that take up as much space as is available, however you will have to place these cards inside a grid layout's columns, effectively adding one extra step for them to display properly.

`, + example: `
+

Small Card

Small cards are 240px wide.

+

Large Card

Large cards are 480px wide.

+
+

Fluid Card

Fluid cards scale their width based on the column that contains them.

+
`, + samples: [`
<div class="row">
+  <div class="card small"></div>
+  <div class="card large"></div>
+  <div class="col-sm-12">
+    <div class="card fluid"></div>
+  </div>
+</div>
`] + }, + { + title : 'Color variants', + description: `

You can display warning (.warning) or error (.error) messages using cards, simply by adding the appropriate color modifiers to a card.

`, + example: `
+

Warning Card

Warning cards are used to display important information to users.

+

Error Card

Error cards are used to display error messages to users.

+
`, + samples: [`
<div class="row">
+  <div class="card warning"></div>
+  <div class="card error"></div>
+</div>
`] + } + ], + dos: [ + { + description: `You can create rows inside a card, which can in turn contain other cards.`, + sample: `
<div class="card">
+  <div class="row">
+    <div class="card"></div>
+  </div>
+</div>
` + } + ], + donts: [ + { + description: `An element cannot be a card and a row or column at the same time.`, + sample: `
<div class="card row"></div>
+<div class="card col-sm"></div>
` + }, + { + description: `Never forget to wrap your cards inside a row and your fluid cards inside a row and a column.`, + sample: `
<div>
+  <div class="card"></div>
+</div>
` + }, + { + description: `Try not to combine fixed-width and fluid cards. Instead, combine fixed-width cards with columns and place fluid cards inside them.`, + sample: `
<div class="row">
+  <div class="card"></div>
+  <div class="card fluid"></div>
+</div>
` + }, + { + description: `Avoid applying two color modifiers on the same card.`, + sample: `
<div class="card warning error"></div>
` + } + ] +} diff --git a/docs/doc-fragments/codeAndQuotations.js b/docs/doc-fragments/codeAndQuotations.js index 5177363..8a4cd51 100644 --- a/docs/doc-fragments/codeAndQuotations.js +++ b/docs/doc-fragments/codeAndQuotations.js @@ -1,51 +1,51 @@ -module.exports = { - id: 'code-and-quotations', - title: 'Code & quotations', - keywords: [`code`, `pre`, `kbd`, `blockquote`, `quotation`], - description: '

Code blocks and quotation elements are styled using custom rules that help make them stand out from the rest of the text, while inline code and keyboard input tags are minimally styled, aiming not to break the flow of regular text.

', - example: `

This is some text with some inline source code and some keyboard input.

-
function sum(num1, num2){
-  return num1 + num2;
-}
-
This is some text quoted from elsewhere.
`, - samples: [ -`
<p>This is some text with some inline <code>source code</code> and some keyboard <kbd>input</kbd>.</p>
-<pre>function sum(num1, num2){
-  return num1 + num2;
-}</pre>
-<blockquote cite="www.quotation.source">This is some text quoted from elsewhere.</blockquote>
` - ], - notes: [ -`The cite attribute of <blockquote> elements is not mandatory and can be omitted. The element's sizing will be automatically adjusted according to the presence of the cite attribute.` - ], - customization: [ - `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the text color of <code> and <pre> elements and background color of <kbd> elements.`, - `Background color can be changed globally by changing the value of the --back-color variable. This will affect the background color of <blockquote> elements and text color of <kbd>.`, - `You can change the background color of <code> and <pre> elements by changing the value of the --secondary-back-color variable.`, - `You can change the text color of <blockquote> elements by changing the value of the --secondary-fore-color variable.`, - `You can change the border color of <pre> and <blockquote> elements by changing the value of the --secondary-border-color variable.`, - `You can change the border color of the left border of <pre> elements by changing the value of the --pre-color variable.`, - `You can change the border color of the left border of <blockquote> elements by changing the value of the --blockquote-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [], - donts: [] -} - -/* - Modifiers: - { - title : '', - description: '', - example: '', - samples: [] - } - Dos/Donts: - { - description: '', - sample: '' - } -*/ +module.exports = { + id: 'code-and-quotations', + title: 'Code & quotations', + keywords: [`code`, `pre`, `kbd`, `blockquote`, `quotation`], + description: '

Code blocks and quotation elements are styled using custom rules that help make them stand out from the rest of the text, while inline code and keyboard input tags are minimally styled, aiming not to break the flow of regular text.

', + example: `

This is some text with some inline source code and some keyboard input.

+
function sum(num1, num2){
+  return num1 + num2;
+}
+
This is some text quoted from elsewhere.
`, + samples: [ +`
<p>This is some text with some inline <code>source code</code> and some keyboard <kbd>input</kbd>.</p>
+<pre>function sum(num1, num2){
+  return num1 + num2;
+}</pre>
+<blockquote cite="www.quotation.source">This is some text quoted from elsewhere.</blockquote>
` + ], + notes: [ +`The cite attribute of <blockquote> elements is not mandatory and can be omitted. The element's sizing will be automatically adjusted according to the presence of the cite attribute.` + ], + customization: [ + `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the text color of <code> and <pre> elements and background color of <kbd> elements.`, + `Background color can be changed globally by changing the value of the --back-color variable. This will affect the background color of <blockquote> elements and text color of <kbd>.`, + `You can change the background color of <code> and <pre> elements by changing the value of the --secondary-back-color variable.`, + `You can change the text color of <blockquote> elements by changing the value of the --secondary-fore-color variable.`, + `You can change the border color of <pre> and <blockquote> elements by changing the value of the --secondary-border-color variable.`, + `You can change the border color of the left border of <pre> elements by changing the value of the --pre-color variable.`, + `You can change the border color of the left border of <blockquote> elements by changing the value of the --blockquote-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [], + donts: [] +} + +/* + Modifiers: + { + title : '', + description: '', + example: '', + samples: [] + } + Dos/Donts: + { + description: '', + sample: '' + } +*/ diff --git a/docs/doc-fragments/commonTextualElements.js b/docs/doc-fragments/commonTextualElements.js index 4735642..b56f896 100644 --- a/docs/doc-fragments/commonTextualElements.js +++ b/docs/doc-fragments/commonTextualElements.js @@ -1,39 +1,39 @@ -module.exports = { - id: 'common-textual-elements', - title: 'Common textual elements', - tag: 'p', - keywords: ['p', 'paragraph', 'text', 'textual elements', 'strong', 'bold', 'b', 'em', 'i', 'emphasis', 'italics', 'small', 'a', 'link', 'hr', 'horizontal rule', 'sub', 'subscript', 'sup', 'exponent', 'superscript', 'normalize', 'reset'], - description: `

mini.css utilizes the ruleset of Normalize.css v7.0.0 to reliably deal with inconsistencies between browsers, while applying some tasteful defaults on top, such as using native font stack to figure out the best font for each device, setting the background and foreground colors, as well as the size of the text to 16px and its line height to 1.5.

-

All of the most common HTML5 elements, such as paragraphs, links, bold, small and slanted text, have been styled by default using clean, modern typography to make your pages look cool and stand out from the rest of the internet.

`, - example: `

This is a paragraph with some sample text. Did you know that the latest version of mini.css is codenamed Gluon? Well, now you do!


Remember that mini.css is totally free, no fine print involved!

`, - samples: [ -`
<p>This is a paragraph. with some <strong>bold text</strong> and some <em>italics text</em>.</p>
-<a href="#">This is a link.</a>
-<small>This is some small text.</small>
-<sub>Subscript</sub>
-<sup>Superscript</sup>
-<hr/>
` - ], - notes: [ - - ], - customization: [ - `Text color can be changed globally by changing the value of the --fore-color variable.`, - `Background color can be changed globally by changing the value of the --back-color variable.`, - `Border color can be changed globally by changing the value of the --border-color variable. This affects the color of <hr> elements.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `You can change the color of links by changing the values of the --a-link-color and --a-visited-color variables.` - ], - modifiers: [], - dos: [], - donts: [ - {description: `Avoid altering the base font size of 16px directly in your CSS code, as it can cause problems with the display of certain elements.`, - sample: -`
/* Do not do this (use Sass instead) */
-html {
-  font-size: 14px;
-}
` - } - ] -} +module.exports = { + id: 'common-textual-elements', + title: 'Common textual elements', + tag: 'p', + keywords: ['p', 'paragraph', 'text', 'textual elements', 'strong', 'bold', 'b', 'em', 'i', 'emphasis', 'italics', 'small', 'a', 'link', 'hr', 'horizontal rule', 'sub', 'subscript', 'sup', 'exponent', 'superscript', 'normalize', 'reset'], + description: `

mini.css utilizes the ruleset of Normalize.css v7.0.0 to reliably deal with inconsistencies between browsers, while applying some tasteful defaults on top, such as using native font stack to figure out the best font for each device, setting the background and foreground colors, as well as the size of the text to 16px and its line height to 1.5.

+

All of the most common HTML5 elements, such as paragraphs, links, bold, small and slanted text, have been styled by default using clean, modern typography to make your pages look cool and stand out from the rest of the internet.

`, + example: `

This is a paragraph with some sample text. Did you know that the latest version of mini.css is codenamed Gluon? Well, now you do!


Remember that mini.css is totally free, no fine print involved!

`, + samples: [ +`
<p>This is a paragraph. with some <strong>bold text</strong> and some <em>italics text</em>.</p>
+<a href="#">This is a link.</a>
+<small>This is some small text.</small>
+<sub>Subscript</sub>
+<sup>Superscript</sup>
+<hr/>
` + ], + notes: [ + + ], + customization: [ + `Text color can be changed globally by changing the value of the --fore-color variable.`, + `Background color can be changed globally by changing the value of the --back-color variable.`, + `Border color can be changed globally by changing the value of the --border-color variable. This affects the color of <hr> elements.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `You can change the color of links by changing the values of the --a-link-color and --a-visited-color variables.` + ], + modifiers: [], + dos: [], + donts: [ + {description: `Avoid altering the base font size of 16px directly in your CSS code, as it can cause problems with the display of certain elements.`, + sample: +`
/* Do not do this (use Sass instead) */
+html {
+  font-size: 14px;
+}
` + } + ] +} diff --git a/docs/doc-fragments/docFragments.js b/docs/doc-fragments/docFragments.js index 070e159..4d1340f 100644 --- a/docs/doc-fragments/docFragments.js +++ b/docs/doc-fragments/docFragments.js @@ -1,41 +1,41 @@ -var gettingStarted = require('./gettingStarted'); -var commonTextualElements = require('./commonTextualElements'); -var headings = require('./headings'); -var lists = require('./lists'); -var images = require('./images'); -var codeAndQuotations = require('./codeAndQuotations'); -var grid = require('./grid'); -var cards = require('./cards'); -var cardSections = require('./cardSections'); -var formsAndInput = require('./formsAndInput'); -var buttons = require('./buttons'); -var inputGrouping = require('./inputGrouping'); -var header = require('./header'); -var navigationBar = require('./navigationBar'); -var footer = require('./footer'); -var drawer = require('./drawer'); -var tables = require('./tables'); -var textHighlighting = require('./textHighlighting'); -var toasts = require('./toasts'); -var tooltips = require('./tooltips'); -var modalDialogs = require('./modalDialogs'); -var spoilersAndAccordions = require('./spoilersAndAccordions'); -var progressBars = require('./progressBars'); -var donutSpinners = require('./donutSpinners'); -var icons = require('./icons'); -var visibilityHelpers = require('./visibilityHelpers'); -var elementDecorators = require('./elementDecorators'); -var responsiveSpacingAndSizing = require('./responsiveSpacingAndSizing'); - -module.exports = [ - gettingStarted, - commonTextualElements, headings, images, lists, codeAndQuotations, - grid, cards, cardSections, - formsAndInput, buttons, inputGrouping, - header, navigationBar, footer, drawer, - tables, - textHighlighting, toasts, tooltips, modalDialogs, spoilersAndAccordions, - progressBars, donutSpinners, - icons, - visibilityHelpers, elementDecorators, responsiveSpacingAndSizing -] +var gettingStarted = require('./gettingStarted'); +var commonTextualElements = require('./commonTextualElements'); +var headings = require('./headings'); +var lists = require('./lists'); +var images = require('./images'); +var codeAndQuotations = require('./codeAndQuotations'); +var grid = require('./grid'); +var cards = require('./cards'); +var cardSections = require('./cardSections'); +var formsAndInput = require('./formsAndInput'); +var buttons = require('./buttons'); +var inputGrouping = require('./inputGrouping'); +var header = require('./header'); +var navigationBar = require('./navigationBar'); +var footer = require('./footer'); +var drawer = require('./drawer'); +var tables = require('./tables'); +var textHighlighting = require('./textHighlighting'); +var toasts = require('./toasts'); +var tooltips = require('./tooltips'); +var modalDialogs = require('./modalDialogs'); +var spoilersAndAccordions = require('./spoilersAndAccordions'); +var progressBars = require('./progressBars'); +var donutSpinners = require('./donutSpinners'); +var icons = require('./icons'); +var visibilityHelpers = require('./visibilityHelpers'); +var elementDecorators = require('./elementDecorators'); +var responsiveSpacingAndSizing = require('./responsiveSpacingAndSizing'); + +module.exports = [ + gettingStarted, + commonTextualElements, headings, images, lists, codeAndQuotations, + grid, cards, cardSections, + formsAndInput, buttons, inputGrouping, + header, navigationBar, footer, drawer, + tables, + textHighlighting, toasts, tooltips, modalDialogs, spoilersAndAccordions, + progressBars, donutSpinners, + icons, + visibilityHelpers, elementDecorators, responsiveSpacingAndSizing +] diff --git a/docs/doc-fragments/donutSpinners.js b/docs/doc-fragments/donutSpinners.js index dab393f..41dedb7 100644 --- a/docs/doc-fragments/donutSpinners.js +++ b/docs/doc-fragments/donutSpinners.js @@ -1,38 +1,38 @@ -module.exports = { - id: 'donut-spinners', - title: 'Donut spinners', - keywords: [`spinner`, `donut`, `loading`, `progress`, `primary`, `secondary`, `tertiary`, `inline`, `animation`, `animated`], - description: `

mini.css provides you with animated loading indicators (.spinner), which you can use to indicate that some content is loading.

`, - example: `
`, - samples: [`
<div class="spinner"></div>
`], - notes: [`You can use either a <div> or a <span> element to create a donut spinner.`, - `You can add the role="progressbar" attribute to spinner donut elements to increase accessibility.`, - `You can inline donut spinners inside a paragraph or some other textual content.`], - customization: [ - `Foreground color for donut spinners can be changed by changing the value of the --spinner-fore-color variable.`, - `Background color for donut spinners can be changed by changing the value of the --spinner-back-color variable.`, - `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` - ], - modifiers: [ - { - title : 'Color variants', - description: `

You can create primary, secondary or tertiary (.primary, .secondary, .tertiary) donut spinners, simply by adding the appropriate color modifier.

`, - example: ``, - samples: [`
<div class="spinner primary"></div>
-<div class="spinner secondary"></div>
-<div class="spinner tertiary"></div>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid inserting text inside donut spinners.`, - sample: `
<div class="spinner">Don't place text here.</div>
` - }, - { - description: `Avoid applying two color modifiers on the same donut spinner.`, - sample: `
<div class="spinner primary secondary"></div>
` - } - ] -} +module.exports = { + id: 'donut-spinners', + title: 'Donut spinners', + keywords: [`spinner`, `donut`, `loading`, `progress`, `primary`, `secondary`, `tertiary`, `inline`, `animation`, `animated`], + description: `

mini.css provides you with animated loading indicators (.spinner), which you can use to indicate that some content is loading.

`, + example: `
`, + samples: [`
<div class="spinner"></div>
`], + notes: [`You can use either a <div> or a <span> element to create a donut spinner.`, + `You can add the role="progressbar" attribute to spinner donut elements to increase accessibility.`, + `You can inline donut spinners inside a paragraph or some other textual content.`], + customization: [ + `Foreground color for donut spinners can be changed by changing the value of the --spinner-fore-color variable.`, + `Background color for donut spinners can be changed by changing the value of the --spinner-back-color variable.`, + `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` + ], + modifiers: [ + { + title : 'Color variants', + description: `

You can create primary, secondary or tertiary (.primary, .secondary, .tertiary) donut spinners, simply by adding the appropriate color modifier.

`, + example: ``, + samples: [`
<div class="spinner primary"></div>
+<div class="spinner secondary"></div>
+<div class="spinner tertiary"></div>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid inserting text inside donut spinners.`, + sample: `
<div class="spinner">Don't place text here.</div>
` + }, + { + description: `Avoid applying two color modifiers on the same donut spinner.`, + sample: `
<div class="spinner primary secondary"></div>
` + } + ] +} diff --git a/docs/doc-fragments/drawer.js b/docs/doc-fragments/drawer.js index 5418fd0..9409321 100644 --- a/docs/doc-fragments/drawer.js +++ b/docs/doc-fragments/drawer.js @@ -1,84 +1,84 @@ -module.exports = { - id: 'drawer', - title: 'Menu drawer', - keywords: [`drawer`, `checkbox`, `toggle`, `close`, `drawer-toggle`, `drawer-close`, `menu`, `navigation`, `hamburger`], - description: `

The drawer component of mini.css is used to create responsive navigation menus for your web apps. It is composed of three components - the drawer, the toggle button and the close button:

- `, - example: `

- - -
- Home
News
- About
Contact
-
`, - samples: [ - `
<label for="drawer-control" class="drawer-toggle"></label>
-
-<input type="checkbox" id="drawer-control" class="drawer">
-<div>
-  <label for="drawer-control" class="drawer-close"></label>
-  <a href="#">Home</a>
-</div>
` - ], - notes: [ - `Drawer menus are responsive by default and will expand into normal containers on screens larger or equal to 768px wide.`, - `It is highly recommended to place your drawer's toggle button inside your web app's header element.`, - `You can combine the navigation bar element with the drawer menu for better results.`, - `Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the drawer menu not rendering or behaving properly.` - ], - customization: [ - `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the text color of the toggle button and items inside the drawer container.`, - `Background color for the drawer container can be changed by changing the value of the --drawer-back-color variable.`, - `Border color for the drawer container can be changed by changing the value of the --drawer-border-color variable.`, - `Text color for the drawer close button can be changed by changing the values of the --drawer-close-color.`, - `Background color for the drawer close button when focused or hovered over can be changed by changing the values of the --drawer-hover-back-color.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : `Persistent drawer`, - description: `

If you want your drawer menus to not expand into normal containers on larger screens, simply add the appropriate modifier (.persistent) on the checkbox controlling the drawer and its toggle button.

`, - example: ``, - samples: [ - `
<label for="drawer-control" class="drawer-toggle persistent"></label>
-
-<input type="checkbox" id="drawer-control" class="drawer persistent">
-<div>
-  <label for="drawer-control" class="drawer-close"></label>
-  <a href="#">Home</a>
-</div>
` - ] - } - ], - dos: [ - { - description: `You can combine the drawer menu with the grid system to create responsive menus that are part of the layout of your web app.`, - sample: `
<div class="row">
-  <input type="checkbox" id="drawer-control" class="drawer">
-  <div class="col-md-4">
-    <label for="drawer-control" class="drawer-close"></label>
-    <a href="#">Home</a>
-  </div>
-  <div class="col-sm-12 col-md-8">
-    <p>Page content</p>
-  </div>
-</div>
` - } - ], - donts: [ - { - description: `You should not place anything between the checkbox controlling the drawer and the container.`, - sample: `
<input type="checkbox" id="drawer-control" class="drawer">
-<!-- Do not place other stuff between these -->
-<div>
-  <label for="drawer-control" class="drawer-close"></label>
-  <a href="#">Home</a>
-</div>
` - } - ] -} +module.exports = { + id: 'drawer', + title: 'Menu drawer', + keywords: [`drawer`, `checkbox`, `toggle`, `close`, `drawer-toggle`, `drawer-close`, `menu`, `navigation`, `hamburger`], + description: `

The drawer component of mini.css is used to create responsive navigation menus for your web apps. It is composed of three components - the drawer, the toggle button and the close button:

+ `, + example: `

+ + +
+ Home
News
+ About
Contact
+
`, + samples: [ + `
<label for="drawer-control" class="drawer-toggle"></label>
+
+<input type="checkbox" id="drawer-control" class="drawer">
+<div>
+  <label for="drawer-control" class="drawer-close"></label>
+  <a href="#">Home</a>
+</div>
` + ], + notes: [ + `Drawer menus are responsive by default and will expand into normal containers on screens larger or equal to 768px wide.`, + `It is highly recommended to place your drawer's toggle button inside your web app's header element.`, + `You can combine the navigation bar element with the drawer menu for better results.`, + `Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the drawer menu not rendering or behaving properly.` + ], + customization: [ + `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the text color of the toggle button and items inside the drawer container.`, + `Background color for the drawer container can be changed by changing the value of the --drawer-back-color variable.`, + `Border color for the drawer container can be changed by changing the value of the --drawer-border-color variable.`, + `Text color for the drawer close button can be changed by changing the values of the --drawer-close-color.`, + `Background color for the drawer close button when focused or hovered over can be changed by changing the values of the --drawer-hover-back-color.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : `Persistent drawer`, + description: `

If you want your drawer menus to not expand into normal containers on larger screens, simply add the appropriate modifier (.persistent) on the checkbox controlling the drawer and its toggle button.

`, + example: ``, + samples: [ + `
<label for="drawer-control" class="drawer-toggle persistent"></label>
+
+<input type="checkbox" id="drawer-control" class="drawer persistent">
+<div>
+  <label for="drawer-control" class="drawer-close"></label>
+  <a href="#">Home</a>
+</div>
` + ] + } + ], + dos: [ + { + description: `You can combine the drawer menu with the grid system to create responsive menus that are part of the layout of your web app.`, + sample: `
<div class="row">
+  <input type="checkbox" id="drawer-control" class="drawer">
+  <div class="col-md-4">
+    <label for="drawer-control" class="drawer-close"></label>
+    <a href="#">Home</a>
+  </div>
+  <div class="col-sm-12 col-md-8">
+    <p>Page content</p>
+  </div>
+</div>
` + } + ], + donts: [ + { + description: `You should not place anything between the checkbox controlling the drawer and the container.`, + sample: `
<input type="checkbox" id="drawer-control" class="drawer">
+<!-- Do not place other stuff between these -->
+<div>
+  <label for="drawer-control" class="drawer-close"></label>
+  <a href="#">Home</a>
+</div>
` + } + ] +} diff --git a/docs/doc-fragments/elementDecorators.js b/docs/doc-fragments/elementDecorators.js index bb7551b..68dd259 100644 --- a/docs/doc-fragments/elementDecorators.js +++ b/docs/doc-fragments/elementDecorators.js @@ -1,27 +1,27 @@ -module.exports = { - id: 'element-decorators', - title: 'Element decorators', - keywords: ['border','border-radius', 'bordered', 'rounded', 'circular', 'shadowed', 'utility'], - description: '

You can apply generic borders, shadows or border radiuses to any element, by using the appropriate class (.bordered, .shadowed, .rounded or .circular).

', - example: '

placeholder  placeholder

', - samples: [`
<span class="bordered">Bordered element.</span>
-<span class="shadowed">Shadowed element.</span>
-<span class="rounded">Rounded element.</span>
-<span class="circular">Circular element.</span>
`], - notes: [ - 'Element decorators use !important declarations to override any other styles, so exercise caution when using them.', - 'Element decorators can be used with pretty much every element or component that is available.' - ], - customization: [ - `Boder color for the generic border decorator can be changed by changing the value of the --generic-border-color variable.`, - `Box shadow style for the generic shadow can be changed by changing the value of the --generic-box-shadow variable.` - ], - modifiers: [], - dos: [], - donts: [ - { - description: `Avoid applying the .rounded and .circular decorators on the same element.`, - sample: `
<span class="rounded circular">Do not do this.</span>
` - } - ] -} +module.exports = { + id: 'element-decorators', + title: 'Element decorators', + keywords: ['border','border-radius', 'bordered', 'rounded', 'circular', 'shadowed', 'utility'], + description: '

You can apply generic borders, shadows or border radiuses to any element, by using the appropriate class (.bordered, .shadowed, .rounded or .circular).

', + example: '

placeholder  placeholder

', + samples: [`
<span class="bordered">Bordered element.</span>
+<span class="shadowed">Shadowed element.</span>
+<span class="rounded">Rounded element.</span>
+<span class="circular">Circular element.</span>
`], + notes: [ + 'Element decorators use !important declarations to override any other styles, so exercise caution when using them.', + 'Element decorators can be used with pretty much every element or component that is available.' + ], + customization: [ + `Boder color for the generic border decorator can be changed by changing the value of the --generic-border-color variable.`, + `Box shadow style for the generic shadow can be changed by changing the value of the --generic-box-shadow variable.` + ], + modifiers: [], + dos: [], + donts: [ + { + description: `Avoid applying the .rounded and .circular decorators on the same element.`, + sample: `
<span class="rounded circular">Do not do this.</span>
` + } + ] +} diff --git a/docs/doc-fragments/footer.js b/docs/doc-fragments/footer.js index 15ea779..f2890ff 100644 --- a/docs/doc-fragments/footer.js +++ b/docs/doc-fragments/footer.js @@ -1,30 +1,30 @@ -module.exports = { - id: 'footer', - title: 'Footer', - keywords: [`navigation`, `footer`, `sticky`, `link`], - description: `

The footer element has been minimally styled, aiming to provide you with a clean base to create your web apps' footers.

`, - example: ``, - samples: [`
<footer>
-  <p>Footer text</p>
-</footer>
`], - notes: [], - customization: [ - `Text color for the footer can be changed by changing the value of the --footer-fore-color variable.`, - `Background color for the footer can be changed by changing the value of the --footer-back-color variable.`, - `Border color for the footer can be changed by changing the value of the --footer-border-color variable.`, - `Text color for links inside the footer can be changed by changing the value of the --footer-link-color variable.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` - ], - modifiers: [ - { - title : 'Sticky footer', - description: `

You can make your web app's footer sticky (.sticky), by applying the appropriate modifier.

`, - example: '', -samples: [`
<footer class="sticky">
-  <p>Footer text</p>
-</footer>
`] - } - ], - dos: [], - donts: [] -} +module.exports = { + id: 'footer', + title: 'Footer', + keywords: [`navigation`, `footer`, `sticky`, `link`], + description: `

The footer element has been minimally styled, aiming to provide you with a clean base to create your web apps' footers.

`, + example: ``, + samples: [`
<footer>
+  <p>Footer text</p>
+</footer>
`], + notes: [], + customization: [ + `Text color for the footer can be changed by changing the value of the --footer-fore-color variable.`, + `Background color for the footer can be changed by changing the value of the --footer-back-color variable.`, + `Border color for the footer can be changed by changing the value of the --footer-border-color variable.`, + `Text color for links inside the footer can be changed by changing the value of the --footer-link-color variable.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` + ], + modifiers: [ + { + title : 'Sticky footer', + description: `

You can make your web app's footer sticky (.sticky), by applying the appropriate modifier.

`, + example: '', +samples: [`
<footer class="sticky">
+  <p>Footer text</p>
+</footer>
`] + } + ], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/formsAndInput.js b/docs/doc-fragments/formsAndInput.js index 914e2fc..4f0e068 100644 --- a/docs/doc-fragments/formsAndInput.js +++ b/docs/doc-fragments/formsAndInput.js @@ -1,76 +1,76 @@ -module.exports = { - id: 'forms-and-input', - title: 'Forms & input', - keywords: [`form`, `fieldset`, `legend`, `input`, `type`, `text`, `checkbox`, `radio`, `email`, `password`, `tel`, `input-group`, `input group`, `row`, `col`, `column`, `vertical`, `fluid`, `file`, `upload`, `select`, `textarea`, `option`, `label`], - description: `

Forms, labels and common HTML5 input elements have been styled using clean, modern rules, improving the accessibility and usability of your web apps' forms.

`, - example: `
Sample form -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
`, - samples: [`
<form>
-  <fieldset>
-    <legend>Simple form</legend>
-    <label for="username">Username</label>
-    <input type="text" id="Username" placeholder="Username"/>
-    <label for="password">Password</label>
-    <input type="password" id="password" placeholder="Password"/>
-  </fieldset>
-</form>
`], - notes: [ - `Using the <fieldset> and <legend> elements is highly recommended, as it improves semantic markup and accessibility.`, - `Some input elements, such as date & time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your web app.` - ], - customization: [ - `Text color for forms and legend elements can be changed by changing the value of the --form-fore-color variable.`, - `Background color for forms can be changed by changing the value of the --form-back-color variable.`, - `Border color for forms and fieldset elements can be changed by changing the value of the --form-border-color variable.`, - `Text color for input elements can be changed by changing the value of the --input-fore-color variable.`, - `Background color for input elements can be changed by changing the value of the --input-back-color variable.`, - `Border color for input elements can be changed by changing the value of the --input-border-color variable.`, - `Border color for focused and invalid input elements can be changed by changing the value of the --input-focus-color and --input-invalid-color variables respectively.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [ - { - description: 'Form inputs are inline by defaut, however you can combine forms with the grid system to create aligned forms.', - sample: `
<form>
-  <fieldset>
-    <legend>Simple form</legend>
-    <div> class="row">
-      <div> class="col-sm-12 col-md-6">
-        <label for="username">Username</label>
-        <input type="text" id="Username" placeholder="Username"/>
-      </div>
-      <div> class="col-sm-12 col-md-6">
-        <label for="password">Password</label>
-        <input type="password" id="password" placeholder="Password"/>
-      </div>
-    </div>
-  </fieldset>
-</form>
` - } - ], - donts: [] -} +module.exports = { + id: 'forms-and-input', + title: 'Forms & input', + keywords: [`form`, `fieldset`, `legend`, `input`, `type`, `text`, `checkbox`, `radio`, `email`, `password`, `tel`, `input-group`, `input group`, `row`, `col`, `column`, `vertical`, `fluid`, `file`, `upload`, `select`, `textarea`, `option`, `label`], + description: `

Forms, labels and common HTML5 input elements have been styled using clean, modern rules, improving the accessibility and usability of your web apps' forms.

`, + example: `
Sample form +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`, + samples: [`
<form>
+  <fieldset>
+    <legend>Simple form</legend>
+    <label for="username">Username</label>
+    <input type="text" id="Username" placeholder="Username"/>
+    <label for="password">Password</label>
+    <input type="password" id="password" placeholder="Password"/>
+  </fieldset>
+</form>
`], + notes: [ + `Using the <fieldset> and <legend> elements is highly recommended, as it improves semantic markup and accessibility.`, + `Some input elements, such as date & time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your web app.` + ], + customization: [ + `Text color for forms and legend elements can be changed by changing the value of the --form-fore-color variable.`, + `Background color for forms can be changed by changing the value of the --form-back-color variable.`, + `Border color for forms and fieldset elements can be changed by changing the value of the --form-border-color variable.`, + `Text color for input elements can be changed by changing the value of the --input-fore-color variable.`, + `Background color for input elements can be changed by changing the value of the --input-back-color variable.`, + `Border color for input elements can be changed by changing the value of the --input-border-color variable.`, + `Border color for focused and invalid input elements can be changed by changing the value of the --input-focus-color and --input-invalid-color variables respectively.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [ + { + description: 'Form inputs are inline by defaut, however you can combine forms with the grid system to create aligned forms.', + sample: `
<form>
+  <fieldset>
+    <legend>Simple form</legend>
+    <div> class="row">
+      <div> class="col-sm-12 col-md-6">
+        <label for="username">Username</label>
+        <input type="text" id="Username" placeholder="Username"/>
+      </div>
+      <div> class="col-sm-12 col-md-6">
+        <label for="password">Password</label>
+        <input type="password" id="password" placeholder="Password"/>
+      </div>
+    </div>
+  </fieldset>
+</form>
` + } + ], + donts: [] +} diff --git a/docs/doc-fragments/gettingStarted.js b/docs/doc-fragments/gettingStarted.js index 185160a..54221fd 100644 --- a/docs/doc-fragments/gettingStarted.js +++ b/docs/doc-fragments/gettingStarted.js @@ -1,29 +1,29 @@ -var version = require('../vinf').version; -module.exports = { - id: 'getting-started', - title: 'Getting started', - keywords: ['html', 'viewport', 'head', 'meta', 'getting started', 'introduction', 'browser support', 'installation', 'usage', 'setup', 'cdn', 'npm', 'yarn'], - description: `

You can get started using mini.css in one of many ways. It is published on npm and yarn, so you can easily download it, using your preferred package manager:

-
npm install mini.css
yarn add mini.css
-

Alternatively, you can use either rawgit or cdnjs to import mini.css into your HTML page's <head> tag:

-
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/${version}/dist/mini-default.min.css">
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mini.css/${version}/mini-default.min.css">
-

After adding mini.css to your project, remember to also add the following line inside your HTML page's <head> tag to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">
-

mini.css is crafted with long-term support in mind, so expect it to be compatible with all modern browsers, as well as their future versions. However, most legacy and proxy browsers, such as Internet Explorer, Opera Mini, IE Mobile and UC Browser are not officially supported, meaning certain features may not be displayed properly or behave exactly as expected.


-
-
edge

  Edge15

-
firefox

 Firefox35

-
chrome

 Chrome49

-
safari

 Safari9.1

-
opera

 Opera36

-
android

 Android56

-
Browser versions officially supported

`, - example: '', - samples: [], - notes: [], - customization: [], - modifiers: [], - dos: [], - donts: [] -} +var version = require('../vinf').version; +module.exports = { + id: 'getting-started', + title: 'Getting started', + keywords: ['html', 'viewport', 'head', 'meta', 'getting started', 'introduction', 'browser support', 'installation', 'usage', 'setup', 'cdn', 'npm', 'yarn'], + description: `

You can get started using mini.css in one of many ways. It is published on npm and yarn, so you can easily download it, using your preferred package manager:

+
npm install mini.css
yarn add mini.css
+

Alternatively, you can use either rawgit or cdnjs to import mini.css into your HTML page's <head> tag:

+
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/${version}/dist/mini-default.min.css">
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mini.css/${version}/mini-default.min.css">
+

After adding mini.css to your project, remember to also add the following line inside your HTML page's <head> tag to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+

mini.css is crafted with long-term support in mind, so expect it to be compatible with all modern browsers, as well as their future versions. However, most legacy and proxy browsers, such as Internet Explorer, Opera Mini, IE Mobile and UC Browser are not officially supported, meaning certain features may not be displayed properly or behave exactly as expected.


+
+
edge

  Edge15

+
firefox

 Firefox35

+
chrome

 Chrome49

+
safari

 Safari9.1

+
opera

 Opera36

+
android

 Android56

+
Browser versions officially supported

`, + example: '', + samples: [], + notes: [], + customization: [], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/grid.js b/docs/doc-fragments/grid.js index b08abb8..9043d10 100644 --- a/docs/doc-fragments/grid.js +++ b/docs/doc-fragments/grid.js @@ -1,245 +1,245 @@ -module.exports = { - id: 'grid', - title: 'Grid system', - keywords: [`grid`, `grid system`, `col`, `column`, `layout`, `row`, `container`, `small`, `medium`, `large`, `sm`, `md`, `lg`, `cols`, `predefined`, `offset`, `order`, `reorder`, `first`, `last`, `normal`], - description: `

The grid system of mini.css utilizes the Flexbox layout to provide you with a simple, modern, responsive layout system for your web apps. Like most modern CSS frameworks' grid systems, it is composed of three main components - containers, rows and columns:

- `, - example: `
-
1
11
-
2
10
-
3
9
-
4
8
-
5
7
-
6
6
-
12
-
fluid
fluid
-
`, - samples: [` -
<div class="container">
-  <div class="row">
-    <div class="col-sm-1"></div>  <div class="col-sm-11"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-2"></div>  <div class="col-sm-10"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-3"></div>  <div class="col-sm-9"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-4"></div>  <div class="col-sm-8"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-5"></div>  <div class="col-sm-7"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12"></div>
-  <div class="row">
-    <div class="col-sm"></div>  <div class="col-sm"></div>
-  </div>
-</div>
- `, - `

You can use the grid system to create a responsive media object in one of many ways. Below is a simple example of a two-column media object with an image and some text: -

<div class="row">
-  <div class="col-sm-2">
-    <img src="image.png" alt="Image description"/>
-  </div>
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
` -], - notes: [ - `mini.css uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.`, - `The specific breakpoints for small, medium and large screen sizes are as follows: - `, - `In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.`, - `You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).`, - `Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.`, - `You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.` - ], - customization: [ - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable. This only affects the padding of the container.` -], - modifiers: [ - { - title: `Screen sizes and width`, - description: `

Each column class is defined by specifying a screen size (small - sm, medium - md or large - lg) and a column width (a value between 1 and 12 or you can omit it for a fluid column), separated by dashes (e.g. .col-sm-6 for a 6-wide column on a small screen). Using these you can apply different layouts for different screen sizes, by altering the width of columns, using multiple classes. Note that column widths are applied recursively, meaning that if you do not specify a width for a specific screen size the column will use the width applied for the previous largest screen size.

`, - example: `
-
-
-
Small screen layout
-
sm-12
-
sm-12 md-8
sm-12 md-4
-
sm-12
-
-
-
Medium/Large screen layout
-
sm-12
-
sm-12 md-8
sm-12 md-4
-
sm-12
-
-
-
`, - samples: [`
<div class="container">
-  <div class="row">
-    <div class="col-sm-12 col-md-3 col-lg-2"></div>
-    <div class="col-sm-12 col-md-5 col-lg-7"></div>
-    <div class="col-sm-12 col-md-4 col-lg-3"></div>
-  </div>
-  <div class="row">
-    <div class="col-sm col-lg-10"></div>
-    <div class="col-sm-4 col-md"></div>
-  </div>
-</div>
`] - }, - { - title: `Predefined layouts`, - description: `

Rows can be modified to apply predefined layouts to the columns inside them, effectively reducing the amount of work required for simple layouts. To create a predefined layout, you can add a class to a row (.cols-*-*), specifying a screen size and width for the columns inside it (or omitting the width for fluid columns), similarly to the way columns are defined (e.g. .row.cols-sm-6 will cause all elements inside the row to be 6-wide on a small screen). Columns inside a predefined layout do not require any further classes to display and, much like normal column layouts, their widths are applied recursively.

`, - example: '', - samples: [`
<div class="row cols-sm-6">
-  <div>
-    <p>This paragraph is inside a 6-wide column.</p>
-  </div>
-  <div>
-    <p>This paragraph is inside a 6-wide column.</p>
-  </div>
-</div>
`] - }, - { - title: `Column offsets`, - description: `

Columns can be moved to the right, by applying offset classes (.col-*-offset-*), defining a screen size and an offset (a value between 0 and 11, e.g. .col-sm-offset-3 will move a column 25% to the right on a small screen). Like all other column modifiers, offsets are applied recursively.

`, - example: `
-
11
-
10
-
9
-
8
-
7
-
6
-
5
-
4
-
3
-
2
-
1
-
0
-
`, - samples: [`
<div class="row">
-  <div class="col-sm-8 col-sm-offset-2 col-md-offset-1 col-lg-offset-0"></div></div>
-<div class="row">
-  <div class="col-sm col-sm-offset-3 col-md-offset-4 col-lg-offset-0"></div>
-</div>
-<div class="row">
-  <div class="col-sm-4 col-md-offset-5"></div>
-</div>
`] - }, - { - title: `Column reordering`, - description: `

Columns can be reordered on different screen sizes, by applying a reordering class (.col-*-*), defining a screen size and the order (first, normal or last, e.g. .col-sm-last will move a column to the end of its row on a small screen). Like all other column modifiers, reordering is applied recursively.

`, - example: `
-
-
-
Small screen layout
-
md-last
 
md-first
-
-
-
Medium/Large screen layout
-
md-first
 
md-last
-
-
-
`, - samples: [`
<div class="row">
-  <div class="col-sm col-md-last col-lg-normal"></div>
-  <div class="col-sm col-sm-first col-md-last"></div>
-  <div class="col-sm col-md-first col-lg-normal"></div>
-</div>
`] - } - ], - dos: [ - { - description: `A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.`, - sample: `
<div class="col-sm-3">
-  <div class="container"></div>
-</div>
-<div class="col-sm-3">
-  <div class="row"></div>
-</div>
-<div class="col-sm-3 row">
-  <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
-</div>
` - }, - { - description: `You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds 12 (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.`, - sample: `
<div class="row">
-  <div class="col-sm-12"></div>
-  <div class="col-sm"></div>  <div class="col-sm-4"></div>
-</div>
` - }, - { - description: `You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of 12 (100%) on some displays, they will wrap accordingly.`, - sample: `
<div class="row">
-  <div class="col-sm-12 col-md-6"></div>
-  <div class="col-sm-12 col-md-6"></div>
-</div>
` - }, - { - description: `You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.`, - sample: `
<div class="row">
-  <div class="col-sm col-lg-3 col-md-last"></div>
-  <div class="col-sm-6 col-md-offset-2"></div>
-</div>
` - }, - { - description: `You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.`, - sample: `
<div class="row cols-sm-12 cols-md-6">
-  <div></div>  <div></div>
-</div>
` - }, - { - description: `To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to 0 for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to normal.`, - sample: `
<div class="row">
-  <div class="col-sm-8 col-sm-offset-1 col-md-offset-0"></div>
-  <div class="col-sm-last col-md-normal"></div>
-</div>
` - } - ], - donts: [ - { - description: `Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.`, - sample: `
<div class="col-sm">
-  <div class="col-sm"></div>
-</div>
` - }, - { - description: `Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.`, - sample: `
<div class="container">
-  <div class="row">
-    <div class="col-sm"></div>
-    <p>Do not do this.</p>
-  </div>
-  <p>Do not do this.</p>
-</div>
` - }, - { - description: `Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.`, - sample: `
<div class="row">
-  <div class="col-md"></div>
-</div>
-<div class="row cols-md"></div>
` - }, - { - description: `Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.`, - sample: `
<div class="row cols-sm-6">
-  <div class="row cols-sm-4"></div>
-</div>
` - } - ] -} +module.exports = { + id: 'grid', + title: 'Grid system', + keywords: [`grid`, `grid system`, `col`, `column`, `layout`, `row`, `container`, `small`, `medium`, `large`, `sm`, `md`, `lg`, `cols`, `predefined`, `offset`, `order`, `reorder`, `first`, `last`, `normal`], + description: `

The grid system of mini.css utilizes the Flexbox layout to provide you with a simple, modern, responsive layout system for your web apps. Like most modern CSS frameworks' grid systems, it is composed of three main components - containers, rows and columns:

+ `, + example: `
+
1
11
+
2
10
+
3
9
+
4
8
+
5
7
+
6
6
+
12
+
fluid
fluid
+
`, + samples: [` +
<div class="container">
+  <div class="row">
+    <div class="col-sm-1"></div>  <div class="col-sm-11"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-2"></div>  <div class="col-sm-10"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-3"></div>  <div class="col-sm-9"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-4"></div>  <div class="col-sm-8"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-5"></div>  <div class="col-sm-7"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12"></div>
+  <div class="row">
+    <div class="col-sm"></div>  <div class="col-sm"></div>
+  </div>
+</div>
+ `, + `

You can use the grid system to create a responsive media object in one of many ways. Below is a simple example of a two-column media object with an image and some text: +

<div class="row">
+  <div class="col-sm-2">
+    <img src="image.png" alt="Image description"/>
+  </div>
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
` +], + notes: [ + `mini.css uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.`, + `The specific breakpoints for small, medium and large screen sizes are as follows: + `, + `In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.`, + `You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).`, + `Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.`, + `You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.` + ], + customization: [ + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable. This only affects the padding of the container.` +], + modifiers: [ + { + title: `Screen sizes and width`, + description: `

Each column class is defined by specifying a screen size (small - sm, medium - md or large - lg) and a column width (a value between 1 and 12 or you can omit it for a fluid column), separated by dashes (e.g. .col-sm-6 for a 6-wide column on a small screen). Using these you can apply different layouts for different screen sizes, by altering the width of columns, using multiple classes. Note that column widths are applied recursively, meaning that if you do not specify a width for a specific screen size the column will use the width applied for the previous largest screen size.

`, + example: `
+
+
+
Small screen layout
+
sm-12
+
sm-12 md-8
sm-12 md-4
+
sm-12
+
+
+
Medium/Large screen layout
+
sm-12
+
sm-12 md-8
sm-12 md-4
+
sm-12
+
+
+
`, + samples: [`
<div class="container">
+  <div class="row">
+    <div class="col-sm-12 col-md-3 col-lg-2"></div>
+    <div class="col-sm-12 col-md-5 col-lg-7"></div>
+    <div class="col-sm-12 col-md-4 col-lg-3"></div>
+  </div>
+  <div class="row">
+    <div class="col-sm col-lg-10"></div>
+    <div class="col-sm-4 col-md"></div>
+  </div>
+</div>
`] + }, + { + title: `Predefined layouts`, + description: `

Rows can be modified to apply predefined layouts to the columns inside them, effectively reducing the amount of work required for simple layouts. To create a predefined layout, you can add a class to a row (.cols-*-*), specifying a screen size and width for the columns inside it (or omitting the width for fluid columns), similarly to the way columns are defined (e.g. .row.cols-sm-6 will cause all elements inside the row to be 6-wide on a small screen). Columns inside a predefined layout do not require any further classes to display and, much like normal column layouts, their widths are applied recursively.

`, + example: '', + samples: [`
<div class="row cols-sm-6">
+  <div>
+    <p>This paragraph is inside a 6-wide column.</p>
+  </div>
+  <div>
+    <p>This paragraph is inside a 6-wide column.</p>
+  </div>
+</div>
`] + }, + { + title: `Column offsets`, + description: `

Columns can be moved to the right, by applying offset classes (.col-*-offset-*), defining a screen size and an offset (a value between 0 and 11, e.g. .col-sm-offset-3 will move a column 25% to the right on a small screen). Like all other column modifiers, offsets are applied recursively.

`, + example: `
+
11
+
10
+
9
+
8
+
7
+
6
+
5
+
4
+
3
+
2
+
1
+
0
+
`, + samples: [`
<div class="row">
+  <div class="col-sm-8 col-sm-offset-2 col-md-offset-1 col-lg-offset-0"></div></div>
+<div class="row">
+  <div class="col-sm col-sm-offset-3 col-md-offset-4 col-lg-offset-0"></div>
+</div>
+<div class="row">
+  <div class="col-sm-4 col-md-offset-5"></div>
+</div>
`] + }, + { + title: `Column reordering`, + description: `

Columns can be reordered on different screen sizes, by applying a reordering class (.col-*-*), defining a screen size and the order (first, normal or last, e.g. .col-sm-last will move a column to the end of its row on a small screen). Like all other column modifiers, reordering is applied recursively.

`, + example: `
+
+
+
Small screen layout
+
md-last
 
md-first
+
+
+
Medium/Large screen layout
+
md-first
 
md-last
+
+
+
`, + samples: [`
<div class="row">
+  <div class="col-sm col-md-last col-lg-normal"></div>
+  <div class="col-sm col-sm-first col-md-last"></div>
+  <div class="col-sm col-md-first col-lg-normal"></div>
+</div>
`] + } + ], + dos: [ + { + description: `A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.`, + sample: `
<div class="col-sm-3">
+  <div class="container"></div>
+</div>
+<div class="col-sm-3">
+  <div class="row"></div>
+</div>
+<div class="col-sm-3 row">
+  <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
+</div>
` + }, + { + description: `You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds 12 (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.`, + sample: `
<div class="row">
+  <div class="col-sm-12"></div>
+  <div class="col-sm"></div>  <div class="col-sm-4"></div>
+</div>
` + }, + { + description: `You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of 12 (100%) on some displays, they will wrap accordingly.`, + sample: `
<div class="row">
+  <div class="col-sm-12 col-md-6"></div>
+  <div class="col-sm-12 col-md-6"></div>
+</div>
` + }, + { + description: `You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.`, + sample: `
<div class="row">
+  <div class="col-sm col-lg-3 col-md-last"></div>
+  <div class="col-sm-6 col-md-offset-2"></div>
+</div>
` + }, + { + description: `You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.`, + sample: `
<div class="row cols-sm-12 cols-md-6">
+  <div></div>  <div></div>
+</div>
` + }, + { + description: `To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to 0 for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to normal.`, + sample: `
<div class="row">
+  <div class="col-sm-8 col-sm-offset-1 col-md-offset-0"></div>
+  <div class="col-sm-last col-md-normal"></div>
+</div>
` + } + ], + donts: [ + { + description: `Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.`, + sample: `
<div class="col-sm">
+  <div class="col-sm"></div>
+</div>
` + }, + { + description: `Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.`, + sample: `
<div class="container">
+  <div class="row">
+    <div class="col-sm"></div>
+    <p>Do not do this.</p>
+  </div>
+  <p>Do not do this.</p>
+</div>
` + }, + { + description: `Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.`, + sample: `
<div class="row">
+  <div class="col-md"></div>
+</div>
+<div class="row cols-md"></div>
` + }, + { + description: `Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.`, + sample: `
<div class="row cols-sm-6">
+  <div class="row cols-sm-4"></div>
+</div>
` + } + ] +} diff --git a/docs/doc-fragments/header.js b/docs/doc-fragments/header.js index 4874add..91758ee 100644 --- a/docs/doc-fragments/header.js +++ b/docs/doc-fragments/header.js @@ -1,46 +1,46 @@ -module.exports = { - id: 'header', - title: 'Header', - keywords: [`navigation`, `header`, `sticky`, `button`, `logo`, `link`], - description: `

The header element has been minimally styled, allowing you to create modern headers for your web apps. A header can include a logo element (.logo), as well as buttons, links and labels, styled as buttons (.button).

`, - example: `
- - News - -
`, - samples: [`
<header>
-  <a href="#" class="logo">Logo</a>
-  <a href="#" class="button">Home</a>
-  <button>Download</button>
-</header>
`], - notes: [`The header element is partially responsive on smaller screens, displaying a scrollbar indicating that there is more content off-screen.`, - `The header element can be a row in a grid system, allowing you to create responsive headers.`], - customization: [ - `Text color for the header can be changed by changing the value of the --header-fore-color variable.`, - `Background color for the header can be changed by changing the value of the --header-back-color variable.`, - `Border color for the header can be changed by changing the value of the --header-border-color variable.`, - `Background color for focused buttons inside the header can be changed by changing the value of the --header-hover-back-color variable.` - ], - modifiers: [ - { - title : 'Sticky header', - description: `

You can make your web app's header sticky (.sticky), by applying the appropriate modifier.

`, - example: '', - samples: [`
<header class="sticky">
-  <a href="#" class="logo">Logo</a>
-  <a href="#" class="button">Home</a>
-  <button>Download</button>
-</header>
`] - } - ], - dos: [], - donts: [ - { - description: `You should not apply a .button class to the logo of your header, but you must make sure that all other elements inside the header are styled as buttons.`, - sample: `
<header>
-  <a href="#" class="button logo">Logo</a>
-  <a href="#">Home</a>
-</header>
` - } - ] -} +module.exports = { + id: 'header', + title: 'Header', + keywords: [`navigation`, `header`, `sticky`, `button`, `logo`, `link`], + description: `

The header element has been minimally styled, allowing you to create modern headers for your web apps. A header can include a logo element (.logo), as well as buttons, links and labels, styled as buttons (.button).

`, + example: `
+ + News + +
`, + samples: [`
<header>
+  <a href="#" class="logo">Logo</a>
+  <a href="#" class="button">Home</a>
+  <button>Download</button>
+</header>
`], + notes: [`The header element is partially responsive on smaller screens, displaying a scrollbar indicating that there is more content off-screen.`, + `The header element can be a row in a grid system, allowing you to create responsive headers.`], + customization: [ + `Text color for the header can be changed by changing the value of the --header-fore-color variable.`, + `Background color for the header can be changed by changing the value of the --header-back-color variable.`, + `Border color for the header can be changed by changing the value of the --header-border-color variable.`, + `Background color for focused buttons inside the header can be changed by changing the value of the --header-hover-back-color variable.` + ], + modifiers: [ + { + title : 'Sticky header', + description: `

You can make your web app's header sticky (.sticky), by applying the appropriate modifier.

`, + example: '', + samples: [`
<header class="sticky">
+  <a href="#" class="logo">Logo</a>
+  <a href="#" class="button">Home</a>
+  <button>Download</button>
+</header>
`] + } + ], + dos: [], + donts: [ + { + description: `You should not apply a .button class to the logo of your header, but you must make sure that all other elements inside the header are styled as buttons.`, + sample: `
<header>
+  <a href="#" class="button logo">Logo</a>
+  <a href="#">Home</a>
+</header>
` + } + ] +} diff --git a/docs/doc-fragments/headings.js b/docs/doc-fragments/headings.js index 151079d..06f0459 100644 --- a/docs/doc-fragments/headings.js +++ b/docs/doc-fragments/headings.js @@ -1,31 +1,31 @@ -module.exports = { - id: 'heading', - title: 'Headings', - keywords: [`heading`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `small`, `title`, `subtitle`, `subheading`], - description: `

All of the HTML5 heading elements are styled, using a customizable ratio and simple rules, providing a clean base for your web app's titles. Apart from the headings themselves, customized rules are provided for displaying subheadings or explanatory text below your web app's headings.

`, - example: `

Heading 1Subheading

-

Heading 2Subheading

-

Heading 3Subheading

-

Heading 4Subheading

-
Heading 5Subheading
-
Heading 6Subheading
`, - samples: [ -`
<h1>Heading 1 <small>Subheading</small></h1>
-<h2>Heading 2 <small>Subheading</small></h2>
-<h3>Heading 3 <small>Subheading</small></h3>
-<h4>Heading 4 <small>Subheading</small></h4>
-<h5>Heading 5 <small>Subheading</small></h5>
-<h6>Heading 6 <small>Subheading</small></h6>
-` - ], - notes: [], - customization: [ - `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the color of the headings' main text.`, - `Secondary text color can be changed globally by changing the value of the --secondary-fore-color variable. This will affect the color of subheadings.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `You can change the ratio of headings' size by chaning the value of the --heading-ratio variable. Bear in mind that the value of this variable must be unitless to work properly.` - ], - modifiers: [], - dos: [], - donts: [] -} +module.exports = { + id: 'heading', + title: 'Headings', + keywords: [`heading`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `small`, `title`, `subtitle`, `subheading`], + description: `

All of the HTML5 heading elements are styled, using a customizable ratio and simple rules, providing a clean base for your web app's titles. Apart from the headings themselves, customized rules are provided for displaying subheadings or explanatory text below your web app's headings.

`, + example: `

Heading 1Subheading

+

Heading 2Subheading

+

Heading 3Subheading

+

Heading 4Subheading

+
Heading 5Subheading
+
Heading 6Subheading
`, + samples: [ +`
<h1>Heading 1 <small>Subheading</small></h1>
+<h2>Heading 2 <small>Subheading</small></h2>
+<h3>Heading 3 <small>Subheading</small></h3>
+<h4>Heading 4 <small>Subheading</small></h4>
+<h5>Heading 5 <small>Subheading</small></h5>
+<h6>Heading 6 <small>Subheading</small></h6>
+` + ], + notes: [], + customization: [ + `Text color can be changed globally by changing the value of the --fore-color variable. This will affect the color of the headings' main text.`, + `Secondary text color can be changed globally by changing the value of the --secondary-fore-color variable. This will affect the color of subheadings.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `You can change the ratio of headings' size by chaning the value of the --heading-ratio variable. Bear in mind that the value of this variable must be unitless to work properly.` + ], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/icons.js b/docs/doc-fragments/icons.js index 51fd3a7..3b0702f 100644 --- a/docs/doc-fragments/icons.js +++ b/docs/doc-fragments/icons.js @@ -1,73 +1,73 @@ -module.exports = { - id: 'icons', - title: 'Icons', - keywords: [`icon`, `svg`, `feather`, `icons`], - description: `

mini.css comes with a set of 20 commonly-used icons (courtesy of Feather) that you can use anywhere in your web apps, utilizing the appropriate class for each icon.

`, - example: `
-

 .icon-alert

-

 .icon-bookmark

-

 .icon-calendar

-

 .icon-cart

-

 .icon-credit

-

 .icon-edit

-

 .icon-help

-

 .icon-home

-

 .icon-info

-

 .icon-link

-

 .icon-location

-

 .icon-lock

-

 .icon-mail

-

 .icon-phone

-

 .icon-rss

-

 .icon-search

-

 .icon-settings

-

 .icon-share

-

 .icon-upload

-

 .icon-user

-
`, - samples: [`
<span class="icon-alert"></span>
-<span class="icon-bookmark"></span>
-<span class="icon-calendar"></span>
-<span class="icon-cart"></span>
-<span class="icon-credit"></span>
-<span class="icon-edit"></span>
-<span class="icon-help"></span>
-<span class="icon-home"></span>
-<span class="icon-info"></span>
-<span class="icon-link"></span>
-<span class="icon-location"></span>
-<span class="icon-lock"></span>
-<span class="icon-mail"></span>
-<span class="icon-phone"></span>
-<span class="icon-rss"></span>
-<span class="icon-search"></span>
-<span class="icon-settings"></span>
-<span class="icon-share"></span>
-<span class="icon-upload"></span>
-<span class="icon-user"></span>
`], - notes: [`You can only use a <span> element to create an icon.`, - `You can inline icons inside a paragraph or pretty much any other textual content. Icons scale relative to their parent element.`], - customization: [ - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` - ], - modifiers: [ - { - title : 'Color variants', - description: `

You can create secondary or inverse (.secondary, .inverse) icons, simply by adding the appropriate color modifier.

`, - example: `

This is a secondary icon, which has a lighter color.

This is an inverse icon.

`, - samples: [`
<span class="icon-alert secondary"></span>
-<span class="icon-alert inverse"></span>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid inserting text inside icon elements.`, - sample: `
<span class="icon-alert">Don't place text here.</span>
` - }, - { - description: `Avoid applying two color modifiers on the same icon.`, - sample: `
<span class="icon-alert inverse secondary"></span>
` - } - ] -} +module.exports = { + id: 'icons', + title: 'Icons', + keywords: [`icon`, `svg`, `feather`, `icons`], + description: `

mini.css comes with a set of 20 commonly-used icons (courtesy of Feather) that you can use anywhere in your web apps, utilizing the appropriate class for each icon.

`, + example: `
+

 .icon-alert

+

 .icon-bookmark

+

 .icon-calendar

+

 .icon-cart

+

 .icon-credit

+

 .icon-edit

+

 .icon-help

+

 .icon-home

+

 .icon-info

+

 .icon-link

+

 .icon-location

+

 .icon-lock

+

 .icon-mail

+

 .icon-phone

+

 .icon-rss

+

 .icon-search

+

 .icon-settings

+

 .icon-share

+

 .icon-upload

+

 .icon-user

+
`, + samples: [`
<span class="icon-alert"></span>
+<span class="icon-bookmark"></span>
+<span class="icon-calendar"></span>
+<span class="icon-cart"></span>
+<span class="icon-credit"></span>
+<span class="icon-edit"></span>
+<span class="icon-help"></span>
+<span class="icon-home"></span>
+<span class="icon-info"></span>
+<span class="icon-link"></span>
+<span class="icon-location"></span>
+<span class="icon-lock"></span>
+<span class="icon-mail"></span>
+<span class="icon-phone"></span>
+<span class="icon-rss"></span>
+<span class="icon-search"></span>
+<span class="icon-settings"></span>
+<span class="icon-share"></span>
+<span class="icon-upload"></span>
+<span class="icon-user"></span>
`], + notes: [`You can only use a <span> element to create an icon.`, + `You can inline icons inside a paragraph or pretty much any other textual content. Icons scale relative to their parent element.`], + customization: [ + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` + ], + modifiers: [ + { + title : 'Color variants', + description: `

You can create secondary or inverse (.secondary, .inverse) icons, simply by adding the appropriate color modifier.

`, + example: `

This is a secondary icon, which has a lighter color.

This is an inverse icon.

`, + samples: [`
<span class="icon-alert secondary"></span>
+<span class="icon-alert inverse"></span>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid inserting text inside icon elements.`, + sample: `
<span class="icon-alert">Don't place text here.</span>
` + }, + { + description: `Avoid applying two color modifiers on the same icon.`, + sample: `
<span class="icon-alert inverse secondary"></span>
` + } + ] +} diff --git a/docs/doc-fragments/images.js b/docs/doc-fragments/images.js index 5356ee8..e2938bd 100644 --- a/docs/doc-fragments/images.js +++ b/docs/doc-fragments/images.js @@ -1,21 +1,21 @@ -module.exports = { - id: 'images-captions', - title: 'Images & captions', - keywords: [`img`, `image`, `responsive`, `responsiveness`, `caption`, `figure`, `figcaption`], - description: `

Image elements are responsive by default, automatically scaling down as necessary to display properly on smaller devices. Images retain their original aspect ratio and they will never scale above their original size.

-

If you want to add captions to images, you can use HTML5 figure elements, along with their related captions.

`, - example: '
placeholder
Image caption
', - samples: [`
<img src="image.png" alt="Image description"/>
`, -`
<figure>
-  <img src="image.png" alt="Image description"/>
-  <figcaption>Image caption</figcaption>
-</figure>
`], - notes: [`While not mandatory, it is considered a good practice to always add a alt attribute to image elements on your web apps.`], - customization: [ - `You can change the text color of <figcaption> elements by changing the value of the --secondary-fore-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` - ], - modifiers: [], - dos: [], - donts: [] -} +module.exports = { + id: 'images-captions', + title: 'Images & captions', + keywords: [`img`, `image`, `responsive`, `responsiveness`, `caption`, `figure`, `figcaption`], + description: `

Image elements are responsive by default, automatically scaling down as necessary to display properly on smaller devices. Images retain their original aspect ratio and they will never scale above their original size.

+

If you want to add captions to images, you can use HTML5 figure elements, along with their related captions.

`, + example: '
placeholder
Image caption
', + samples: [`
<img src="image.png" alt="Image description"/>
`, +`
<figure>
+  <img src="image.png" alt="Image description"/>
+  <figcaption>Image caption</figcaption>
+</figure>
`], + notes: [`While not mandatory, it is considered a good practice to always add a alt attribute to image elements on your web apps.`], + customization: [ + `You can change the text color of <figcaption> elements by changing the value of the --secondary-fore-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.` + ], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/inputGrouping.js b/docs/doc-fragments/inputGrouping.js index e5ef292..c65f248 100644 --- a/docs/doc-fragments/inputGrouping.js +++ b/docs/doc-fragments/inputGrouping.js @@ -1,68 +1,68 @@ -module.exports = { - id: 'input-grouping', - title: 'Input grouping', - keywords: [`input group`, `input-group`, `vertical`, `fluid`, `input`, `button`, `button group`, `button-group`], - description: `

You can ensure that input elements and labels display together on the same line, by grouping them together (.input-group). You can also group buttons together, using a different grouping class (.button-group).

`, - example: `
-
- Grouped inputs -

-
-
-
-
`, - samples: [ -`
<div class="input-group">
-  <label for="username">Username</label>
-  <input type="text" id="Username" placeholder="Username"/>
-</div>
`, -`
<div class="button-group">
-  <button>Button</button>
-  <button>Button</button>
-  <button>Button</button>
-</div>
` - ], - notes: [`It is highly recommended that you do not place checkboxes or radio buttons inside fluid or vertical input groups.`, - `Button groups will display horizontally on medium and large screens, but collapse into a vertical view on small screens.`], - customization: [], - modifiers: [ - { - title : `Fluid & vertical grouping`, - description: `

You can make your input groups fluid (.fluid) or vertical (.vertical), by applying the appropriate modifiers.

`, - example: `
-
- Fluid input groups -
-
-
-
-
-
- Vertical input groups -
-
-
-
`, - samples: [`
<div class="input-group fluid">
-  <label for="username">Username</label>
-  <input type="text" id="Username" placeholder="Username"/>
-</div>
-<div class="input-group vertical">
-  <label for="username">Username</label>
-  <input type="text" id="Username" placeholder="Username"/>
-</div>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid combining input groups with the grid system, as there might be overlapping styles.`, - sample: `
<div class="input-group row">
-  <div class="col-sm">
-    <label for="username">Username</label>
-    <input type="text" id="Username" placeholder="Username"/>
-  </div>
-</div>
` - } - ] -} +module.exports = { + id: 'input-grouping', + title: 'Input grouping', + keywords: [`input group`, `input-group`, `vertical`, `fluid`, `input`, `button`, `button group`, `button-group`], + description: `

You can ensure that input elements and labels display together on the same line, by grouping them together (.input-group). You can also group buttons together, using a different grouping class (.button-group).

`, + example: `
+
+ Grouped inputs +

+
+
+
+
`, + samples: [ +`
<div class="input-group">
+  <label for="username">Username</label>
+  <input type="text" id="Username" placeholder="Username"/>
+</div>
`, +`
<div class="button-group">
+  <button>Button</button>
+  <button>Button</button>
+  <button>Button</button>
+</div>
` + ], + notes: [`It is highly recommended that you do not place checkboxes or radio buttons inside fluid or vertical input groups.`, + `Button groups will display horizontally on medium and large screens, but collapse into a vertical view on small screens.`], + customization: [], + modifiers: [ + { + title : `Fluid & vertical grouping`, + description: `

You can make your input groups fluid (.fluid) or vertical (.vertical), by applying the appropriate modifiers.

`, + example: `
+
+ Fluid input groups +
+
+
+
+
+
+ Vertical input groups +
+
+
+
`, + samples: [`
<div class="input-group fluid">
+  <label for="username">Username</label>
+  <input type="text" id="Username" placeholder="Username"/>
+</div>
+<div class="input-group vertical">
+  <label for="username">Username</label>
+  <input type="text" id="Username" placeholder="Username"/>
+</div>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid combining input groups with the grid system, as there might be overlapping styles.`, + sample: `
<div class="input-group row">
+  <div class="col-sm">
+    <label for="username">Username</label>
+    <input type="text" id="Username" placeholder="Username"/>
+  </div>
+</div>
` + } + ] +} diff --git a/docs/doc-fragments/lists.js b/docs/doc-fragments/lists.js index dc1570f..0d5d4f7 100644 --- a/docs/doc-fragments/lists.js +++ b/docs/doc-fragments/lists.js @@ -1,28 +1,28 @@ -module.exports = { - id: 'lists', - title: 'Lists', - keywords: [`list`, `ul`, `ol`, `li`], - description: `

List elements, both unordered and ordered, are minimally styled to match with the rest of the framework's aesthetics. Their margins and padding are reset to properly align with the rest of the common HTML5 elements, providing a stable foundation for all of your web app's lists.

`, - example: `
-
  1. Wake up
  2. Eat breakfast
  3. Go to work
`, - samples: [`
<ul>
-  <li>Apple</li>
-  <li>Orange</li>
-  <li>Strawberry</li>
-</ul>
-<ol>
-  <li>Wake up</li>
-  <li>Eat breakfast</li>
-  <li>Go to work</li>
-</ol>
`], - notes: [], - customization: [ - `Text color can be changed globally by changing the value of the --fore-color variable.`, - `Background color can be changed globally by changing the value of the --back-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` - ], - modifiers: [], - dos: [], - donts: [] -} +module.exports = { + id: 'lists', + title: 'Lists', + keywords: [`list`, `ul`, `ol`, `li`], + description: `

List elements, both unordered and ordered, are minimally styled to match with the rest of the framework's aesthetics. Their margins and padding are reset to properly align with the rest of the common HTML5 elements, providing a stable foundation for all of your web app's lists.

`, + example: `
+
  1. Wake up
  2. Eat breakfast
  3. Go to work
`, + samples: [`
<ul>
+  <li>Apple</li>
+  <li>Orange</li>
+  <li>Strawberry</li>
+</ul>
+<ol>
+  <li>Wake up</li>
+  <li>Eat breakfast</li>
+  <li>Go to work</li>
+</ol>
`], + notes: [], + customization: [ + `Text color can be changed globally by changing the value of the --fore-color variable.`, + `Background color can be changed globally by changing the value of the --back-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.` + ], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/modalDialogs.js b/docs/doc-fragments/modalDialogs.js index 943d71f..9b22691 100644 --- a/docs/doc-fragments/modalDialogs.js +++ b/docs/doc-fragments/modalDialogs.js @@ -1,62 +1,62 @@ -module.exports = { - id: 'modal-dialogs', - title: 'Modal dialogs', - keywords: [`modal`, `dialog`, `contextual`, `alert`, `notification`], - description: `

mini.css provides you with a modal dialog component to display messages to users. It is composed of three components - the modal dialog, the toggle button and the close button:

- `, - example: ``, - samples: [`
<label for="modal-control">Show modal</label>
-
-<input type="checkbox" id="modal-control" class="modal">
-<div>
-  <div class="card">
-    <label for="modal-control" class="modal-close" ></label>
-    <h3 class="section">Modal</h3>
-    <p class="section">This is a modal dialog!</p>
-  </div>
-</div>
`], - notes: [ - `Modal dialogs should be used in combination with the card component for best results.`, - `Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the modal dialog not rendering or behaving properly.`, - `You can omit the toggle for the modal dialog and use Javascript to show/hide it, instead. You can also use any correctly linked label inside the modal dialog to change its state.` - ], - customization: [ - `Background color for the modal dialog overlay can be changed by changing the value of --modal-overlay-color.`, - `Text color for the modal dialog close button can be changed by changing the value of the --modal-close-color.`, - `Background color for the modal dialog close button when focused or hovered over can be changed by changing the value of the --modal-close-hover-color.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [ - { - description: `You can use the role="dialog" to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.`, - sample: `
<input type="checkbox" id="modal-control" class="modal">
-<div role="dialog" aria-labelledby="dialog-title">
-  <div class="card">
-    <label for="modal-control" class="modal-close" ></label>
-    <h3 class="section" id="dialog-title">Modal</h3>
-    <p class="section">This is a modal dialog!</p>
-  </div>
-</div>
` - } - ], - donts: [ - { - description: `You should not place anything between the checkbox controlling the modal dialog and the container.`, - sample: `
<input type="checkbox" id="modal-control" class="modal">
-<!-- Do not place other stuff between these -->
-<div>
-  <div class="card">
-    <label for="modal-control" class="modal-close" ></label>
-    <h3 class="section">Modal</h3>
-    <p class="section">This is a modal dialog!</p>
-  </div>
-</div>
` - } - ] -} +module.exports = { + id: 'modal-dialogs', + title: 'Modal dialogs', + keywords: [`modal`, `dialog`, `contextual`, `alert`, `notification`], + description: `

mini.css provides you with a modal dialog component to display messages to users. It is composed of three components - the modal dialog, the toggle button and the close button:

+ `, + example: ``, + samples: [`
<label for="modal-control">Show modal</label>
+
+<input type="checkbox" id="modal-control" class="modal">
+<div>
+  <div class="card">
+    <label for="modal-control" class="modal-close" ></label>
+    <h3 class="section">Modal</h3>
+    <p class="section">This is a modal dialog!</p>
+  </div>
+</div>
`], + notes: [ + `Modal dialogs should be used in combination with the card component for best results.`, + `Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the modal dialog not rendering or behaving properly.`, + `You can omit the toggle for the modal dialog and use Javascript to show/hide it, instead. You can also use any correctly linked label inside the modal dialog to change its state.` + ], + customization: [ + `Background color for the modal dialog overlay can be changed by changing the value of --modal-overlay-color.`, + `Text color for the modal dialog close button can be changed by changing the value of the --modal-close-color.`, + `Background color for the modal dialog close button when focused or hovered over can be changed by changing the value of the --modal-close-hover-color.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [ + { + description: `You can use the role="dialog" to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.`, + sample: `
<input type="checkbox" id="modal-control" class="modal">
+<div role="dialog" aria-labelledby="dialog-title">
+  <div class="card">
+    <label for="modal-control" class="modal-close" ></label>
+    <h3 class="section" id="dialog-title">Modal</h3>
+    <p class="section">This is a modal dialog!</p>
+  </div>
+</div>
` + } + ], + donts: [ + { + description: `You should not place anything between the checkbox controlling the modal dialog and the container.`, + sample: `
<input type="checkbox" id="modal-control" class="modal">
+<!-- Do not place other stuff between these -->
+<div>
+  <div class="card">
+    <label for="modal-control" class="modal-close" ></label>
+    <h3 class="section">Modal</h3>
+    <p class="section">This is a modal dialog!</p>
+  </div>
+</div>
` + } + ] +} diff --git a/docs/doc-fragments/navigationBar.js b/docs/doc-fragments/navigationBar.js index 65f78f6..edd2270 100644 --- a/docs/doc-fragments/navigationBar.js +++ b/docs/doc-fragments/navigationBar.js @@ -1,49 +1,49 @@ -module.exports = { - id: 'navigation-bar', - title: 'Navigation bar', - keywords: [`navigation`, `bar`, `nav`, `link`], - description: `

The navigation bar element has been minimally styled, allowing you to create simple vertical navigation menus for your web apps. Apart from styling from links, custom classes (.sublink-1 and .sublink-2) are provided for creating navigation trees.

`, - example: ``, - samples: [`
<nav>
-  <a href="#">Category 1</a>
-  <span>Category 2</span>
-  <a href="#" class="sublink-1">Item 2.1</a>
-  <span class="sublink-1">Category 2.2</span>
-  <a href="#" class="sublink-2">Item 2.2.1</a>
-</nav>
`], - notes: [`It is recommended that you combine the navigation bar element with the grid system to create responsive navigation menus for your web apps.`], - customization: [ - `Text color for navigation bars can be changed by changing the value of the --nav-fore-color variable.`, - `Background color for navigation bars can be changed by changing the value of the --nav-back-color variable.`, - `Border color for navigation bars can be changed by changing the value of the --nav-border-color variable.`, - `Background color for focused buttons inside navigation bars can be changed by changing the value of the --nav-hover-back-color variable.`, - `Text color for links inside navigation bars can be changed by changing the value of the --nav-link-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [], - donts: [] -} - -/* - Modifiers: - { - title : '', - description: '', - example: '', - samples: [] - } - Dos/Donts: - { - description: '', - sample: '' - } -*/ +module.exports = { + id: 'navigation-bar', + title: 'Navigation bar', + keywords: [`navigation`, `bar`, `nav`, `link`], + description: `

The navigation bar element has been minimally styled, allowing you to create simple vertical navigation menus for your web apps. Apart from styling from links, custom classes (.sublink-1 and .sublink-2) are provided for creating navigation trees.

`, + example: ``, + samples: [`
<nav>
+  <a href="#">Category 1</a>
+  <span>Category 2</span>
+  <a href="#" class="sublink-1">Item 2.1</a>
+  <span class="sublink-1">Category 2.2</span>
+  <a href="#" class="sublink-2">Item 2.2.1</a>
+</nav>
`], + notes: [`It is recommended that you combine the navigation bar element with the grid system to create responsive navigation menus for your web apps.`], + customization: [ + `Text color for navigation bars can be changed by changing the value of the --nav-fore-color variable.`, + `Background color for navigation bars can be changed by changing the value of the --nav-back-color variable.`, + `Border color for navigation bars can be changed by changing the value of the --nav-border-color variable.`, + `Background color for focused buttons inside navigation bars can be changed by changing the value of the --nav-hover-back-color variable.`, + `Text color for links inside navigation bars can be changed by changing the value of the --nav-link-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [], + donts: [] +} + +/* + Modifiers: + { + title : '', + description: '', + example: '', + samples: [] + } + Dos/Donts: + { + description: '', + sample: '' + } +*/ diff --git a/docs/doc-fragments/progressBars.js b/docs/doc-fragments/progressBars.js index 2a3b2d1..8e437b6 100644 --- a/docs/doc-fragments/progressBars.js +++ b/docs/doc-fragments/progressBars.js @@ -1,44 +1,44 @@ -module.exports = { - id: 'progress-bars', - title: 'Progress bars', - keywords: [`progress`, `bar`, `primary`, `secondary`, `tertiary`, `inline`], - description: `

Progress bars are minimally styled to match with the rest of the framework's aesthetics and be consistent across all modern browsers.

`, - example: ``, - samples: [`
<progress value="450" max="1000"></progress>
`], - notes: [`Progress bars are designed to work with a max="1000" attribute, as this covers the most common use-cases.`], - customization: [ - `Foreground color for progress bars can be changed by changing the value of the --progress-fore-color variable.`, - `Background color for progress bars can be changed by changing the value of the --progress-back-color variable.`, - `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Inline progress bars', - description: `

You can create inline progress bars (.inline), by applying the appropriate modifier.

`, - example: `

45% completed...

`, - samples: [`
<progress value="450" max="1000" class="inline"></progress>
`] - }, - { - title : 'Color variants', - description: `

You can create primary, secondary or tertiary (.primary, .secondary, .tertiary) progress bars, simply by adding the appropriate color modifier.

`, - example: ``, - samples: [`
<progress value="450" max="1000" class="primary"></progress>
-<progress value="450" max="1000" class="secondary"></progress>
-<progress value="450" max="1000" class="tertiary"></progress>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid using different values than 1000 for progress bars' max attribute, as well as floating point values for either max or value.`, - sample: `
<progress value="45" max="100"></progress>
-<progress value="450.0" max="1000.0"></progress>
` - }, - { - description: `Avoid applying two color modifiers on the same progress bar.`, - sample: `
<progress value="450" max="1000" class="primary secondary"></progress>
` - } - ] -} +module.exports = { + id: 'progress-bars', + title: 'Progress bars', + keywords: [`progress`, `bar`, `primary`, `secondary`, `tertiary`, `inline`], + description: `

Progress bars are minimally styled to match with the rest of the framework's aesthetics and be consistent across all modern browsers.

`, + example: ``, + samples: [`
<progress value="450" max="1000"></progress>
`], + notes: [`Progress bars are designed to work with a max="1000" attribute, as this covers the most common use-cases.`], + customization: [ + `Foreground color for progress bars can be changed by changing the value of the --progress-fore-color variable.`, + `Background color for progress bars can be changed by changing the value of the --progress-back-color variable.`, + `You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Inline progress bars', + description: `

You can create inline progress bars (.inline), by applying the appropriate modifier.

`, + example: `

45% completed...

`, + samples: [`
<progress value="450" max="1000" class="inline"></progress>
`] + }, + { + title : 'Color variants', + description: `

You can create primary, secondary or tertiary (.primary, .secondary, .tertiary) progress bars, simply by adding the appropriate color modifier.

`, + example: ``, + samples: [`
<progress value="450" max="1000" class="primary"></progress>
+<progress value="450" max="1000" class="secondary"></progress>
+<progress value="450" max="1000" class="tertiary"></progress>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid using different values than 1000 for progress bars' max attribute, as well as floating point values for either max or value.`, + sample: `
<progress value="45" max="100"></progress>
+<progress value="450.0" max="1000.0"></progress>
` + }, + { + description: `Avoid applying two color modifiers on the same progress bar.`, + sample: `
<progress value="450" max="1000" class="primary secondary"></progress>
` + } + ] +} diff --git a/docs/doc-fragments/responsiveSpacingAndSizing.js b/docs/doc-fragments/responsiveSpacingAndSizing.js index 8c3702c..f82464b 100644 --- a/docs/doc-fragments/responsiveSpacingAndSizing.js +++ b/docs/doc-fragments/responsiveSpacingAndSizing.js @@ -1,20 +1,20 @@ -module.exports = { - id: 'responsive-spacing-sizing', - title: 'Responsive spacing & sizing', - keywords: ['responsiveness', 'margin', 'padding', 'responsive-margin', 'responsive-margin'], - description: '

You can make elements\' spacing or sizing responsive by applying the appropriate class (.responsive-margin or .responsive-padding).

', - example: '', - samples: [`
<span class="responsive-margin">Responsive margin.</span>
-<span class="responsive-padding">Responsive padding.</span>
`], - notes: [ - 'Responsive spacing and sizing modifiers use !important declarations to override any other styles, so exercise caution when using them.', - 'Responsive spacing and sizing modifiers are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.' - ], - customization: [ - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable, affecting the responsive spacing modifier. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable, affecting the responsive sizing modifier.` -], - modifiers: [], - dos: [], - donts: [] -} +module.exports = { + id: 'responsive-spacing-sizing', + title: 'Responsive spacing & sizing', + keywords: ['responsiveness', 'margin', 'padding', 'responsive-margin', 'responsive-margin'], + description: '

You can make elements\' spacing or sizing responsive by applying the appropriate class (.responsive-margin or .responsive-padding).

', + example: '', + samples: [`
<span class="responsive-margin">Responsive margin.</span>
+<span class="responsive-padding">Responsive padding.</span>
`], + notes: [ + 'Responsive spacing and sizing modifiers use !important declarations to override any other styles, so exercise caution when using them.', + 'Responsive spacing and sizing modifiers are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.' + ], + customization: [ + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable, affecting the responsive spacing modifier. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable, affecting the responsive sizing modifier.` +], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/spoilersAndAccordions.js b/docs/doc-fragments/spoilersAndAccordions.js index 8a0d7f3..f3b8285 100644 --- a/docs/doc-fragments/spoilersAndAccordions.js +++ b/docs/doc-fragments/spoilersAndAccordions.js @@ -1,68 +1,68 @@ -module.exports = { - id: 'spoilers-and-accordions', - title: 'Spoilers & accordions', - keywords: [`spoiler`, `collapse`, `accordion`, `contextual`, `vertical tabs`], - description: `

mini.css provides you with accessible spoilers and accordions. They are composed of two components - the wrapper, the toggle button and the content container:

- -

If you want to create an accordion, simply repeat the last two steps above for each section of the accordion. In order to make collapsible spoilers and accordions fully accessible, it is highly recommended to add the aria-hidden="true" attribute to all labels and inputs that control the behavior of these components.

`, - example: `

This is the first section of the collapse

This is the second section of the collapse


-

This is the first section of the accordion

This is the second section of the accordion

`, - samples: [`
<div class="collapse">
-  <input type="checkbox" id="collapse-section1" checked aria-hidden="true">
-  <label for="collapse-section1" aria-hidden="true">Collapse section 1</label>
-  <div>
-    <p>This is the first section of the collapse</p>
-  </div>
-  <input type="checkbox" id="collapse-section2" aria-hidden="true">
-  <label for="collapse-section2" aria-hidden="true">Collapse section 2</label>
-  <div>
-    <p>This is the second section of the collapse</p>
-  </div>
-</div>
`, - `
<div class="collapse">
-  <input type="radio" id="accordion-section1" checked aria-hidden="true" name="accordion">
-  <label for="accordion-section1" aria-hidden="true">Accordion section 1</label>
-  <div>
-    <p>This is the first section of the accordion</p>
-  </div>
-  <input type="radio" id="accordion-section2" aria-hidden="true" name="accordion">
-  <label for="accordion-section2" aria-hidden="true">Accordion section 2</label>
-  <div>
-    <p>This is the second section of the accordion</p>
-  </div>
-</div>
`], - notes: [ - `Make sure all the radio buttons in the same accordion have the same name.`, - `If you want a collapsible spoiler or an accordion section to be expanded by default, you can add the checked attribute to the respective collapsible spooiler's or section's control.`, - `The max-height of the content container is 400px.`, - `Using the aria-hidden="true" attribute is highly recommended, as screen readers will ignore the controls of the collapsible spoiler or accordion and read all the contained content normally.` - ], - customization: [ - `Background color, text color and background color on hover for the collapsible spoiler's labels can be changed by changing the values of --collapse-label-back-color, --collapse-label-fore-color and --collapse-label-hover-back-color respectively.`, - `Border color for the collapsible spoiler can be changed by changing the value of the --collapse-border-color.`, - `Background color for the collapsible spoiler's content can be changed by changing the value of the --collapse-content-back-color.`, - `Background color and border for the spoiler's content selected labels can be changed by changing the values of the --collapse-selected-label-back-color and --collapse-selected-label-border-color respectively.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [], - donts: [ - { - description: `You should not place anything between the checkbox controlling the collapsible spoiler and its label or between the label and the content container.`, - sample: `
<div class="collapse">
-  <input type="checkbox" id="collapse-section1" checked aria-hidden="true">
-  <!-- Do not place other stuff between these -->
-  <label for="collapse-section1" aria-hidden="true">Collapse section 1</label>
-  <!-- Do not place other stuff between these -->
-  <div>
-    <p>This is the first section of the collapse</p>
-  </div>
-</div>
` - } - ] -} +module.exports = { + id: 'spoilers-and-accordions', + title: 'Spoilers & accordions', + keywords: [`spoiler`, `collapse`, `accordion`, `contextual`, `vertical tabs`], + description: `

mini.css provides you with accessible spoilers and accordions. They are composed of two components - the wrapper, the toggle button and the content container:

+ +

If you want to create an accordion, simply repeat the last two steps above for each section of the accordion. In order to make collapsible spoilers and accordions fully accessible, it is highly recommended to add the aria-hidden="true" attribute to all labels and inputs that control the behavior of these components.

`, + example: `

This is the first section of the collapse

This is the second section of the collapse


+

This is the first section of the accordion

This is the second section of the accordion

`, + samples: [`
<div class="collapse">
+  <input type="checkbox" id="collapse-section1" checked aria-hidden="true">
+  <label for="collapse-section1" aria-hidden="true">Collapse section 1</label>
+  <div>
+    <p>This is the first section of the collapse</p>
+  </div>
+  <input type="checkbox" id="collapse-section2" aria-hidden="true">
+  <label for="collapse-section2" aria-hidden="true">Collapse section 2</label>
+  <div>
+    <p>This is the second section of the collapse</p>
+  </div>
+</div>
`, + `
<div class="collapse">
+  <input type="radio" id="accordion-section1" checked aria-hidden="true" name="accordion">
+  <label for="accordion-section1" aria-hidden="true">Accordion section 1</label>
+  <div>
+    <p>This is the first section of the accordion</p>
+  </div>
+  <input type="radio" id="accordion-section2" aria-hidden="true" name="accordion">
+  <label for="accordion-section2" aria-hidden="true">Accordion section 2</label>
+  <div>
+    <p>This is the second section of the accordion</p>
+  </div>
+</div>
`], + notes: [ + `Make sure all the radio buttons in the same accordion have the same name.`, + `If you want a collapsible spoiler or an accordion section to be expanded by default, you can add the checked attribute to the respective collapsible spooiler's or section's control.`, + `The max-height of the content container is 400px.`, + `Using the aria-hidden="true" attribute is highly recommended, as screen readers will ignore the controls of the collapsible spoiler or accordion and read all the contained content normally.` + ], + customization: [ + `Background color, text color and background color on hover for the collapsible spoiler's labels can be changed by changing the values of --collapse-label-back-color, --collapse-label-fore-color and --collapse-label-hover-back-color respectively.`, + `Border color for the collapsible spoiler can be changed by changing the value of the --collapse-border-color.`, + `Background color for the collapsible spoiler's content can be changed by changing the value of the --collapse-content-back-color.`, + `Background color and border for the spoiler's content selected labels can be changed by changing the values of the --collapse-selected-label-back-color and --collapse-selected-label-border-color respectively.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [], + donts: [ + { + description: `You should not place anything between the checkbox controlling the collapsible spoiler and its label or between the label and the content container.`, + sample: `
<div class="collapse">
+  <input type="checkbox" id="collapse-section1" checked aria-hidden="true">
+  <!-- Do not place other stuff between these -->
+  <label for="collapse-section1" aria-hidden="true">Collapse section 1</label>
+  <!-- Do not place other stuff between these -->
+  <div>
+    <p>This is the first section of the collapse</p>
+  </div>
+</div>
` + } + ] +} diff --git a/docs/doc-fragments/tables.js b/docs/doc-fragments/tables.js index bb2f9ab..47b4985 100644 --- a/docs/doc-fragments/tables.js +++ b/docs/doc-fragments/tables.js @@ -1,208 +1,208 @@ -module.exports = { - id: 'tables', - title: 'Tables', - keywords: [`table`, `caption`, `thead`, `tbody`, `tr`, `th`, `td`, `horizontal`, `striped`, `hoverable`], - description: `

Tables are styled in a minimal, modern and responsive manner, allowing users on all devices to easily browse tabular data, taking advantage of the Flexbox layout's capabilities. To make tabular data properly display on mobile devices, remember to specify a data-label attribute for each <> element (usually same as the heading of the column).

`, - example: `
Desktop view
- - - - - - - - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom
MarkGerkisMarkie
JohnFergussonFergujohn
SylviaPouleauSylver
NormanJonesNormalJones
TrevorHeidelHeidi

Mobile view
- - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, - samples: [`
<table>
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
`], - notes: [`Remember to always specify a data-label attribute for all of your <td> elements, otherwise they will not display properly on mobile.`, - `Due to the way tables are displayed, the <tfoot> element is not supported.`, - `Tables are vertically scrollable by default, with a max-height property of 400px.`], - customization: [ - `Text color for <th> and <td> elements can be changed by changing the values of the --table-head-fore-color and --table-body-fore-color variables respectively.`, - `Background color for <th> and <td> elements can be changed by changing the values of the --table-head-back-color and --table-body-back-color variables respectively.`, - `Border color for tables can be changed by changing the value of the --table-border-color variable.`, - `Border color for the separator between a table's heading and a table's body can be changed by changing the value of the --table-border-separator-color variable.`, - `Alternative background color for <td> elements in striped tables can be changed by changing the value of the --table-body-alt-back-color variable.`, - `Hover background color for <tr> elements in hoverable tables can be changed by changing the value of the --table-body-hover-back-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Horizontal tables', - description: `

You can create horizontal tables (.horizontal), by applying the appropriate class.

`, - example: ` - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, - samples: [`
<table class="horizontal">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
`] - }, - { - title : 'Striped tables', - description: `

You can create striped tables (.striped), by applying the appropriate class.

`, - example: ` - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, - samples: [`
<table class="striped">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
`] - }, -{ - title : 'Hoverable tables', - description: `

You can create hoverable tables (.hoverable), by applying the appropriate class.

`, - example: ` - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, - samples: [`
<table class="hoverable">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
`] - } - ], - dos: [], - donts: [ - { - description: `Avoid placing <td> elements in the <thead> of your tables, as well as placing <th> elements in the <tbody>.`, - sample: `
<table>
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <td>Bad idea</td>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <th data-label="Bad">Also bad idea</th>
-    </tr>
-  </tbody>
-</table>
` - } - ] -} +module.exports = { + id: 'tables', + title: 'Tables', + keywords: [`table`, `caption`, `thead`, `tbody`, `tr`, `th`, `td`, `horizontal`, `striped`, `hoverable`], + description: `

Tables are styled in a minimal, modern and responsive manner, allowing users on all devices to easily browse tabular data, taking advantage of the Flexbox layout's capabilities. To make tabular data properly display on mobile devices, remember to specify a data-label attribute for each <> element (usually same as the heading of the column).

`, + example: `
Desktop view
+ + + + + + + + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom
MarkGerkisMarkie
JohnFergussonFergujohn
SylviaPouleauSylver
NormanJonesNormalJones
TrevorHeidelHeidi

Mobile view
+ + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, + samples: [`
<table>
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
`], + notes: [`Remember to always specify a data-label attribute for all of your <td> elements, otherwise they will not display properly on mobile.`, + `Due to the way tables are displayed, the <tfoot> element is not supported.`, + `Tables are vertically scrollable by default, with a max-height property of 400px.`], + customization: [ + `Text color for <th> and <td> elements can be changed by changing the values of the --table-head-fore-color and --table-body-fore-color variables respectively.`, + `Background color for <th> and <td> elements can be changed by changing the values of the --table-head-back-color and --table-body-back-color variables respectively.`, + `Border color for tables can be changed by changing the value of the --table-border-color variable.`, + `Border color for the separator between a table's heading and a table's body can be changed by changing the value of the --table-border-separator-color variable.`, + `Alternative background color for <td> elements in striped tables can be changed by changing the value of the --table-body-alt-back-color variable.`, + `Hover background color for <tr> elements in hoverable tables can be changed by changing the value of the --table-body-hover-back-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Horizontal tables', + description: `

You can create horizontal tables (.horizontal), by applying the appropriate class.

`, + example: ` + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, + samples: [`
<table class="horizontal">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
`] + }, + { + title : 'Striped tables', + description: `

You can create striped tables (.striped), by applying the appropriate class.

`, + example: ` + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, + samples: [`
<table class="striped">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
`] + }, +{ + title : 'Hoverable tables', + description: `

You can create hoverable tables (.hoverable), by applying the appropriate class.

`, + example: ` + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
`, + samples: [`
<table class="hoverable">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
`] + } + ], + dos: [], + donts: [ + { + description: `Avoid placing <td> elements in the <thead> of your tables, as well as placing <th> elements in the <tbody>.`, + sample: `
<table>
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <td>Bad idea</td>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <th data-label="Bad">Also bad idea</th>
+    </tr>
+  </tbody>
+</table>
` + } + ] +} diff --git a/docs/doc-fragments/template.js b/docs/doc-fragments/template.js index a923488..7ea05dd 100644 --- a/docs/doc-fragments/template.js +++ b/docs/doc-fragments/template.js @@ -1,28 +1,28 @@ -module.exports = { - id: '', - title: '', - keywords: [], - description: '', - example: '', - samples: [], - notes: [], - customization: [], - modifiers: [], - dos: [], - donts: [] -} - -/* - Modifiers: - { - title : '', - description: '', - example: '', - samples: [] - } - Dos/Donts: - { - description: '', - sample: '' - } -*/ +module.exports = { + id: '', + title: '', + keywords: [], + description: '', + example: '', + samples: [], + notes: [], + customization: [], + modifiers: [], + dos: [], + donts: [] +} + +/* + Modifiers: + { + title : '', + description: '', + example: '', + samples: [] + } + Dos/Donts: + { + description: '', + sample: '' + } +*/ diff --git a/docs/doc-fragments/textHighlighting.js b/docs/doc-fragments/textHighlighting.js index fa926ff..ca1f7c0 100644 --- a/docs/doc-fragments/textHighlighting.js +++ b/docs/doc-fragments/textHighlighting.js @@ -1,43 +1,43 @@ -module.exports = { - id: 'text-highlighting', - title: 'Text highlighting', - keywords: [`mark`, `highlight`, `text highlighting`, `tag`, `primary`, `secondary`, `tertiary`, `inline-block`], - description: `

The native HTML5 mark element has been minimally styled to allow for easy text highlighting.

`, - example: `

This is a paragraph with some highlighted text.

`, - samples: [`
<p>This is some <mark>highlighted text</mark>.</p>
`], - notes: [ - `Highlighted text scales according to its parent element, so it can be used inside any kind of element (headings, forms, paragraphs etc.).` - ], - customization: [ - `Text color for highlighted text can be changed by changing the value of the --mark-fore-color variable.`, - `Background color for highlighted text can be changed by changing the value of the --mark-back-color variable.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Color variants', - description: '

You can change the color of highlighted text, based on context by applying the appropriate class (secondary - .secondary or tertiary - .tertiary).

', - example: `

This is a secondary highlight and this is a tertiary highlight.

`, - samples: [`
<p>This is a <mark class="secondary">secondary highlight</mark> and this is a <mark class="tertiary">tertiary highlight</mark>.</p>
`] - }, - { - title : 'Style variants', - description: `

You can make highlights look like tags (.tag) or display as inline blocks (.inline-block), by applying the appropriate class.

`, - example: `

This is a highlight styled as a tag.

This is some highlighted text that is displayed as an inline block.

`, - samples: [`
<p>This is a highlight styled as a <mark class="tag">tag</mark>.</p>
-<p><mark class="inline-block">This is some highlighted text that is displayed as an inline block.</mark></p>
`] - } - ], - dos: [{ - description: `You can nest a highlight inside another one, if the outer one is displayed as an inline-block.`, - sample: `
<mark class="inline-block"><mark class="secondary">Secondary highlight</mark> inside a inline block.</mark>
` - }], - donts: [ - { - description: `Avoid applying multiple color modifiers on the same highlight.`, - sample: `
<mark class="primary inverse">Highlight</mark>
-
` - } - ] -} +module.exports = { + id: 'text-highlighting', + title: 'Text highlighting', + keywords: [`mark`, `highlight`, `text highlighting`, `tag`, `primary`, `secondary`, `tertiary`, `inline-block`], + description: `

The native HTML5 mark element has been minimally styled to allow for easy text highlighting.

`, + example: `

This is a paragraph with some highlighted text.

`, + samples: [`
<p>This is some <mark>highlighted text</mark>.</p>
`], + notes: [ + `Highlighted text scales according to its parent element, so it can be used inside any kind of element (headings, forms, paragraphs etc.).` + ], + customization: [ + `Text color for highlighted text can be changed by changing the value of the --mark-fore-color variable.`, + `Background color for highlighted text can be changed by changing the value of the --mark-back-color variable.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Color variants', + description: '

You can change the color of highlighted text, based on context by applying the appropriate class (secondary - .secondary or tertiary - .tertiary).

', + example: `

This is a secondary highlight and this is a tertiary highlight.

`, + samples: [`
<p>This is a <mark class="secondary">secondary highlight</mark> and this is a <mark class="tertiary">tertiary highlight</mark>.</p>
`] + }, + { + title : 'Style variants', + description: `

You can make highlights look like tags (.tag) or display as inline blocks (.inline-block), by applying the appropriate class.

`, + example: `

This is a highlight styled as a tag.

This is some highlighted text that is displayed as an inline block.

`, + samples: [`
<p>This is a highlight styled as a <mark class="tag">tag</mark>.</p>
+<p><mark class="inline-block">This is some highlighted text that is displayed as an inline block.</mark></p>
`] + } + ], + dos: [{ + description: `You can nest a highlight inside another one, if the outer one is displayed as an inline-block.`, + sample: `
<mark class="inline-block"><mark class="secondary">Secondary highlight</mark> inside a inline block.</mark>
` + }], + donts: [ + { + description: `Avoid applying multiple color modifiers on the same highlight.`, + sample: `
<mark class="primary inverse">Highlight</mark>
+
` + } + ] +} diff --git a/docs/doc-fragments/toasts.js b/docs/doc-fragments/toasts.js index 7573bf5..ae81a1b 100644 --- a/docs/doc-fragments/toasts.js +++ b/docs/doc-fragments/toasts.js @@ -1,21 +1,21 @@ -module.exports = { - id: 'toasts', - title: 'Toasts', - keywords: [`span`, `toast`, `mobile`, `contextual`, `message`], - description: `

mini.css provides you with toast messages (.toast), allowing you to display native-looking notifications on mobile devices.

`, - example: `
This is a toast message!
`, - samples: [`
<span class="toast">This is a toast message!</span>
`], - notes: [ - `Toast elements do not have any pre-defined behavior, but you can use Javascript to add functionality to them.` - ], - customization: [ - `Text color for toast messages can be changed by changing the value of the --toast-fore-color variable.`, - `Background color for toast messages can be changed by changing the value of the --toast-back-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [], - dos: [], - donts: [] -} +module.exports = { + id: 'toasts', + title: 'Toasts', + keywords: [`span`, `toast`, `mobile`, `contextual`, `message`], + description: `

mini.css provides you with toast messages (.toast), allowing you to display native-looking notifications on mobile devices.

`, + example: `
This is a toast message!
`, + samples: [`
<span class="toast">This is a toast message!</span>
`], + notes: [ + `Toast elements do not have any pre-defined behavior, but you can use Javascript to add functionality to them.` + ], + customization: [ + `Text color for toast messages can be changed by changing the value of the --toast-fore-color variable.`, + `Background color for toast messages can be changed by changing the value of the --toast-back-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/tooltips.js b/docs/doc-fragments/tooltips.js index 062a9b7..a29e51a 100644 --- a/docs/doc-fragments/tooltips.js +++ b/docs/doc-fragments/tooltips.js @@ -1,28 +1,28 @@ -module.exports = { - id: 'tooltips', - title: 'Tooltips', - keywords: [`tooltip`, `aria-label`, `contextual`, `bottom`, `span`], - description: `

You can utilize the aria-label property to create accessible tooltips (.tooltip), allowing you to display explanatory text for different elements.

`, - example: `

Hover over this text to see a tooltip!

`, - samples: [`
<span class="tooltip" aria-label="Tooltip text">Hover over text to see tooltip</span>
`], - notes: [ - `Tooltips depend on the aria-label property, so they are fully accessible on screen readers.` - ], - customization: [ - `Text color for tooltips can be changed by changing the value of the --tooltip-fore-color variable.`, - `Background color for tooltips can be changed by changing the value of the --tooltip-back-color variable.`, - `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, - `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, - `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` - ], - modifiers: [ - { - title : 'Position variant', - description: '

You can make tooltips display below the related text, by adding the appropriate class (.bottom).

', - example: `

Hover over this text to see a tooltip!

`, - samples: [`
<span class="tooltip bottom" aria-label="Tooltip text">Hover over text to see tooltip</span>
`] - } - ], - dos: [], - donts: [] -} +module.exports = { + id: 'tooltips', + title: 'Tooltips', + keywords: [`tooltip`, `aria-label`, `contextual`, `bottom`, `span`], + description: `

You can utilize the aria-label property to create accessible tooltips (.tooltip), allowing you to display explanatory text for different elements.

`, + example: `

Hover over this text to see a tooltip!

`, + samples: [`
<span class="tooltip" aria-label="Tooltip text">Hover over text to see tooltip</span>
`], + notes: [ + `Tooltips depend on the aria-label property, so they are fully accessible on screen readers.` + ], + customization: [ + `Text color for tooltips can be changed by changing the value of the --tooltip-fore-color variable.`, + `Background color for tooltips can be changed by changing the value of the --tooltip-back-color variable.`, + `Universal margin for elements can be changed globally by changing the value of the --universal-margin variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`, + `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable.`, + `Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius variable.` + ], + modifiers: [ + { + title : 'Position variant', + description: '

You can make tooltips display below the related text, by adding the appropriate class (.bottom).

', + example: `

Hover over this text to see a tooltip!

`, + samples: [`
<span class="tooltip bottom" aria-label="Tooltip text">Hover over text to see tooltip</span>
`] + } + ], + dos: [], + donts: [] +} diff --git a/docs/doc-fragments/visibilityHelpers.js b/docs/doc-fragments/visibilityHelpers.js index fe53500..4cd2416 100644 --- a/docs/doc-fragments/visibilityHelpers.js +++ b/docs/doc-fragments/visibilityHelpers.js @@ -1,34 +1,34 @@ -module.exports = { - id: 'visibility-helpers', - title: 'Visibility helpers', - keywords: ['hidden', 'visibility', 'visually-hidden', 'accessibility', 'utility'], - description: '

You can use visibility helper classes to hide elements for all users (.hidden) or for users not on screen readers (.visually-hidden). There are also responsive visibility helpers provided, for hiding or visually hiding content only for specific screen sizes (.hidden-sm, .hidden-md, .hidden-lg and .visually-hidden-sm, .visually-hidden-md and .visually-hidden-lg respectively).

', - example: '', - samples: [`
<p class="hidden">Not visible for any users.</p>
-<p class="visually-hidden">Visible only for screen readers.</p>
-<p class="hidden-sm">Not visible for users on screens under 768px wide.</p>
-<p class="hidden-md">Not visible for users on screens 768px-1280px wide.</p>
-<p class="hidden-lg">Not visible for users on screens wider than 1280px.</p>
-<p class="visually-hidden-sm">Visible only for screen readers under 768px wide.</p>
-<p class="visually-hidden-md">Visible only for screen readers 768px-1280px wide.</p>
-<p class="visually-hidden-lg">Visible only for screen readers wider than 1280px.</p>
`], - notes: [ - 'Visibility helpers use !important declarations to override any other styles, so exercise caution when using them.', - 'The specific breakpoints for small, medium and large screen sizes are as follows:', - 'Responsive visibility helper classes are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.' - ], - customization: [], - modifiers: [], - dos: [ - { - description: `You can apply multiple responsive visibility helpers on the same element.`, - sample: `
<p class="hidden-sm hidden-md">Not visible for users on screens under 1280px wide.</p>
` - } - ], - donts: [ - { - description: `Avoid combining .hidden and .visually-hidden or responsive helpers for the same screen size.`, - sample: `
<p class="hidden visually-hidden">Do not do this.</p>
` - } - ] -} +module.exports = { + id: 'visibility-helpers', + title: 'Visibility helpers', + keywords: ['hidden', 'visibility', 'visually-hidden', 'accessibility', 'utility'], + description: '

You can use visibility helper classes to hide elements for all users (.hidden) or for users not on screen readers (.visually-hidden). There are also responsive visibility helpers provided, for hiding or visually hiding content only for specific screen sizes (.hidden-sm, .hidden-md, .hidden-lg and .visually-hidden-sm, .visually-hidden-md and .visually-hidden-lg respectively).

', + example: '', + samples: [`
<p class="hidden">Not visible for any users.</p>
+<p class="visually-hidden">Visible only for screen readers.</p>
+<p class="hidden-sm">Not visible for users on screens under 768px wide.</p>
+<p class="hidden-md">Not visible for users on screens 768px-1280px wide.</p>
+<p class="hidden-lg">Not visible for users on screens wider than 1280px.</p>
+<p class="visually-hidden-sm">Visible only for screen readers under 768px wide.</p>
+<p class="visually-hidden-md">Visible only for screen readers 768px-1280px wide.</p>
+<p class="visually-hidden-lg">Visible only for screen readers wider than 1280px.</p>
`], + notes: [ + 'Visibility helpers use !important declarations to override any other styles, so exercise caution when using them.', + 'The specific breakpoints for small, medium and large screen sizes are as follows:', + 'Responsive visibility helper classes are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.' + ], + customization: [], + modifiers: [], + dos: [ + { + description: `You can apply multiple responsive visibility helpers on the same element.`, + sample: `
<p class="hidden-sm hidden-md">Not visible for users on screens under 1280px wide.</p>
` + } + ], + donts: [ + { + description: `Avoid combining .hidden and .visually-hidden or responsive helpers for the same screen size.`, + sample: `
<p class="hidden visually-hidden">Do not do this.</p>
` + } + ] +} diff --git a/docs/v2/contextual.html b/docs/v2/contextual.html index 9935db8..67bd171 100644 --- a/docs/v2/contextual.html +++ b/docs/v2/contextual.html @@ -1,309 +1,309 @@ - - - - - - mini.css - Contextual - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Contextual

-

The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Almost every website present on the web has some sort of content that needs highlighting in one way or another. The contextual module provides you with simple semantic text highlighting that utilises the <mark> HTML element. Apart from that, this module contains styles and definitions for a simple .toast container, that you can use to display toast messages on your websites and web apps. Toasts mimic the native application notifications of certain devices, making them mobile friendly. Finally, a simple accessible .tooltip implementation is included along with an implementation for .modal dialogs. All components in this module are fully accessible, so that's another thing not to worry about.


-
-
-

Quick start

-

To use the contextual module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Text highlighting

-
-
-
-

This is some text with a highlight.

-

Apart from the primary highlight style, there are also secondary and tertiary styles for highlighting.


-

If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.


-

Finally, you can create contextual tags like this or 7.


-
-
-
-

To add simple highlights in your text, you can use the <mark> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the .secondary or .tertiary class to a <mark> element. For longer pieces of text that need highlighting, consider adding the .inline-block class to make them stand out even more. Finally, you can create contextual tags, using the .tag class.

-

Sample code

-
<mark>primary</mark>
-<mark class="secondary">secondary</mark>
-<mark class="tertiary">tertiary</mark>
-<mark class="inline-block">long highlight text...</mark>
-<mark class="tag">tag</mark>
-
-
-
-

Notes

-
    -
  • Try to use elements with the .inline-block class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.
  • -
  • <mark> elements, along with their supporting classes (except for .inline-block) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.
  • -

-
-
-
<mark class="tag tertiary">green tag</mark>
-<!-- or -->
-<mark class="inline-block secondary">red chunk</mark>
-

Do: You can combine any of the contextual color classes (.secondary or .tertiary) with the .tag or .inline-block class.

-
-
-
<mark class="secondary tertiary">no, no</mark>
-<!-- or -->
-<mark class="inline-block tag">oh, no</mark>
-

Don't: Avoid combining two contextual color classes or a .tag and an .inline-block, as these combinations might result in unexpected behavior.

-
-
-
<mark class="inline-block">some
-  <mark class="secondary">text</mark>
-</mark>
-

Do: You can only nest a <mark> inside another if the outer one is of the .inline-block class. You can color the inner <mark> using any of the contextual color classes or even make it a .tag. Be careful, however, to not make the inner <mark> an .inline-block as well.

-
-
-
<mark>some
-  <mark class="secondary">text</mark>
-</mark>
-

Don't: Avoid using nested <mark> elements, unless the outer <mark> element is an .inline-block.

-
-
-
-
-
-
-
-
-
-

Toasts

-
-
-
- I'm a toast message!
- I'm a small toast message!
- I'm a large toast message! -
-
-
-

Toasts aim to help bridge the gap between web and native applications on mobile devices, by displaying native-looking toast messages. To create a toast, wrap some text inside a <span> element with the .toast class. Toasts appear at the bottom of the screen on top of everything else. If you want to create smaller or larger toast messasges, you can add the .small or .large classes respectively.

-

Sample code

-
<span class="toast">This is a normal toast message!</span>
-<span class="toast small">This is a large toast message!</span>
-<span class="toast large">This is a small toast message!</span>
-
-
-
-

Notes

-
    -
  • Toast elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.
  • -
  • If you want to create your own color or size variants for toast messages, check out the customization page.
  • -

-
-
-
<span class="toast small large">Not a good toast</span>
-

Don't: Avoid combining two toast size variants, as this might cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Tooltips

-
-
-
-

Hover over this text to see a tooltip!


-

Hover over this text to see a reverse tooltip!


-
-
-
-

Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the .tooltip class (our choice is usually a <span> element, but your needs may differ) and add an aria-label in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the .bottom class to them.

-

Sample code

-
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
-<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
-
-
-
-

Notes

-
    -
  • Tooltips are built to be accessible and should display properly on screenreaders.
  • -
  • If you are not satisfied with the default tooltip colors, please check out the customization page for instuctions on how to create your own tooltip variants.
  • -
  • Remember to always add the aria-label attribute, otherwise your tooltip will not have any text to show.
  • -
-
-
-
-
-
-
-
-

Modals

-
-
-

-

- - -
-
-
-

Modal dialogs are pretty ease to make. Simply create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class. Inside this element, you can add a .card element with your modal dialog's contents. Remember to add a <label> element linked to your modal dialog's <input type="checkbox"> to let users close the dialog. You can also apply the .close class to a <label> element to display a close icon at the top right of the modal dialog.

-

Sample code

-
<label for="modal-toggle">Show modal</label>
-
-<input id="modal-toggle" type="checkbox"/>
-<div class="modal">
-  <div class="card">
-    <label for="modal-toggle" class="close"></label>
-    <h3 class="section">Modal</h3>
-    <p class="section">This is a modal window!</p>
-  </div>
-</div>
-
-
-
-

Notes

-
    -
  • You can use any styles you want from the card module to create different dialogs based on context (e.g. alerts, warnings etc.).
  • -
  • Remember to add a <label> linked to your modal dialog's <input type="checkbox"> or use Javascript to alter its state, otherwise users will not be able to close the dialog.
  • -
  • You can place your modal dialog anywhere on your page, as long as the structure is not altered. You can also toggle it from anywhere on a page.
  • -

-
-
-
<label for="modal-toggle">Show modal</label>
-<input id="modal-toggle" type="checkbox"/>
-<div class="modal" role="dialog" aria-labelledby="dialogTitle">
-  <div class="card">
-    <label for="modal-toggle" class="close"></label>
-    <h3 class="section" id="dialogTitle">Bad Modal</h3>
-  </div>
-</div>
-

Do: You can use the role="dialog" to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.

-
-
-
<input id="modal-toggle" type="checkbox"/>
-<label for="modal-toggle">Show modal</label>
-<div class="modal">
-  <div class="card">
-    <label for="modal-toggle" class="close"></label>
-    <h3 class="section">Bad Modal</h3>
-  </div>
-</div>
-

Don't: The syntax and structure of the modal dialog's container is very strict. Try to follow it exactly as described in this section.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Contextual + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Contextual

+

The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Almost every website present on the web has some sort of content that needs highlighting in one way or another. The contextual module provides you with simple semantic text highlighting that utilises the <mark> HTML element. Apart from that, this module contains styles and definitions for a simple .toast container, that you can use to display toast messages on your websites and web apps. Toasts mimic the native application notifications of certain devices, making them mobile friendly. Finally, a simple accessible .tooltip implementation is included along with an implementation for .modal dialogs. All components in this module are fully accessible, so that's another thing not to worry about.


+
+
+

Quick start

+

To use the contextual module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Text highlighting

+
+
+
+

This is some text with a highlight.

+

Apart from the primary highlight style, there are also secondary and tertiary styles for highlighting.


+

If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.


+

Finally, you can create contextual tags like this or 7.


+
+
+
+

To add simple highlights in your text, you can use the <mark> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the .secondary or .tertiary class to a <mark> element. For longer pieces of text that need highlighting, consider adding the .inline-block class to make them stand out even more. Finally, you can create contextual tags, using the .tag class.

+

Sample code

+
<mark>primary</mark>
+<mark class="secondary">secondary</mark>
+<mark class="tertiary">tertiary</mark>
+<mark class="inline-block">long highlight text...</mark>
+<mark class="tag">tag</mark>
+
+
+
+

Notes

+
    +
  • Try to use elements with the .inline-block class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.
  • +
  • <mark> elements, along with their supporting classes (except for .inline-block) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.
  • +

+
+
+
<mark class="tag tertiary">green tag</mark>
+<!-- or -->
+<mark class="inline-block secondary">red chunk</mark>
+

Do: You can combine any of the contextual color classes (.secondary or .tertiary) with the .tag or .inline-block class.

+
+
+
<mark class="secondary tertiary">no, no</mark>
+<!-- or -->
+<mark class="inline-block tag">oh, no</mark>
+

Don't: Avoid combining two contextual color classes or a .tag and an .inline-block, as these combinations might result in unexpected behavior.

+
+
+
<mark class="inline-block">some
+  <mark class="secondary">text</mark>
+</mark>
+

Do: You can only nest a <mark> inside another if the outer one is of the .inline-block class. You can color the inner <mark> using any of the contextual color classes or even make it a .tag. Be careful, however, to not make the inner <mark> an .inline-block as well.

+
+
+
<mark>some
+  <mark class="secondary">text</mark>
+</mark>
+

Don't: Avoid using nested <mark> elements, unless the outer <mark> element is an .inline-block.

+
+
+
+
+
+
+
+
+
+

Toasts

+
+
+
+ I'm a toast message!
+ I'm a small toast message!
+ I'm a large toast message! +
+
+
+

Toasts aim to help bridge the gap between web and native applications on mobile devices, by displaying native-looking toast messages. To create a toast, wrap some text inside a <span> element with the .toast class. Toasts appear at the bottom of the screen on top of everything else. If you want to create smaller or larger toast messasges, you can add the .small or .large classes respectively.

+

Sample code

+
<span class="toast">This is a normal toast message!</span>
+<span class="toast small">This is a large toast message!</span>
+<span class="toast large">This is a small toast message!</span>
+
+
+
+

Notes

+
    +
  • Toast elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.
  • +
  • If you want to create your own color or size variants for toast messages, check out the customization page.
  • +

+
+
+
<span class="toast small large">Not a good toast</span>
+

Don't: Avoid combining two toast size variants, as this might cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Tooltips

+
+
+
+

Hover over this text to see a tooltip!


+

Hover over this text to see a reverse tooltip!


+
+
+
+

Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the .tooltip class (our choice is usually a <span> element, but your needs may differ) and add an aria-label in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the .bottom class to them.

+

Sample code

+
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
+<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
+
+
+
+

Notes

+
    +
  • Tooltips are built to be accessible and should display properly on screenreaders.
  • +
  • If you are not satisfied with the default tooltip colors, please check out the customization page for instuctions on how to create your own tooltip variants.
  • +
  • Remember to always add the aria-label attribute, otherwise your tooltip will not have any text to show.
  • +
+
+
+
+
+
+
+
+

Modals

+
+
+

+

+ + +
+
+
+

Modal dialogs are pretty ease to make. Simply create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class. Inside this element, you can add a .card element with your modal dialog's contents. Remember to add a <label> element linked to your modal dialog's <input type="checkbox"> to let users close the dialog. You can also apply the .close class to a <label> element to display a close icon at the top right of the modal dialog.

+

Sample code

+
<label for="modal-toggle">Show modal</label>
+
+<input id="modal-toggle" type="checkbox"/>
+<div class="modal">
+  <div class="card">
+    <label for="modal-toggle" class="close"></label>
+    <h3 class="section">Modal</h3>
+    <p class="section">This is a modal window!</p>
+  </div>
+</div>
+
+
+
+

Notes

+
    +
  • You can use any styles you want from the card module to create different dialogs based on context (e.g. alerts, warnings etc.).
  • +
  • Remember to add a <label> linked to your modal dialog's <input type="checkbox"> or use Javascript to alter its state, otherwise users will not be able to close the dialog.
  • +
  • You can place your modal dialog anywhere on your page, as long as the structure is not altered. You can also toggle it from anywhere on a page.
  • +

+
+
+
<label for="modal-toggle">Show modal</label>
+<input id="modal-toggle" type="checkbox"/>
+<div class="modal" role="dialog" aria-labelledby="dialogTitle">
+  <div class="card">
+    <label for="modal-toggle" class="close"></label>
+    <h3 class="section" id="dialogTitle">Bad Modal</h3>
+  </div>
+</div>
+

Do: You can use the role="dialog" to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.

+
+
+
<input id="modal-toggle" type="checkbox"/>
+<label for="modal-toggle">Show modal</label>
+<div class="modal">
+  <div class="card">
+    <label for="modal-toggle" class="close"></label>
+    <h3 class="section">Bad Modal</h3>
+  </div>
+</div>
+

Don't: The syntax and structure of the modal dialog's container is very strict. Try to follow it exactly as described in this section.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/core.html b/docs/v2/core.html index 0a275ac..0bf14e4 100644 --- a/docs/v2/core.html +++ b/docs/v2/core.html @@ -1,255 +1,255 @@ - - - - - - mini.css - Core - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Core

-

The core module contains basic reset and fix rules, based on Normalize.css v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The core module utilizes the ruleset of Normalize.css v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in core deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.


-
-
-

Quick start

-

To use the core module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">
-
-
-
-
-
-
-
-
-

Typography

-
-
-

For the basic typography rules we did the following, along with other things presented below:

-
    -
  • We use a native font stack to figure out the best font for your device.
  • -
  • We set the colors to background: #f8f8f8; and color: #212121;.
  • -
  • We use a font-size of 16px for the root element.
  • -
  • We set line-height to 1.5.
  • -
-
-
-
-

Notes

-
    -
  • Fluid typography is also included, but not enabled by default. If you want to try it out, check out the out the customization page.
  • -
-
-
-
-
-
-
-
-

Headings

-
-
-

Heading 1Subheading

-

Heading 2Subheading

-

Heading 3Subheading

-

Heading 4Subheading

-
Heading 5Subheading
-
Heading 6Subheading
-
-
-

All six of the HTML headings (<h1> - <h6>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <small> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.

-

Sample code

-
<h1>Heading 1<small>Subheading</small></h1>
-<h2>Heading 2<small>Subheading</small></h2>
-<h3>Heading 3<small>Subheading</small></h3>
-<h4>Heading 4<small>Subheading</small></h4>
-<h5>Heading 5<small>Subheading</small></h5>
-<h6>Heading 6<small>Subheading</small></h6>

-
-
-
-
-
-
-
-
-

Common textual elements

-
-
-

This is a paragraph with some sample text. Did you know mini.css v2 is codenamed Fermion? No? Well, now you do! Oh, by the way, that was some Bold text and here is some text in Italics. Maybe you want to know what our inline elements look like. For example a link to the GitHub repository of mini.css looks like that! Neat, right? Maybe you want to see some inline code or some sample input. Oh, also small text is cool, along with its siblings: the subscripthi! and the superscripthello!. Finally, check out the horizontal rule, preformatted code block and quotation below.


-
function sum(num1, num2) {
-    var num3 = num1 + num2;
-    console.log('Result: ' + num3);
-}
-
This is some quoted text from elsewhere.

-
-
-
-

The most common HTML5 elements must be things like <p>aragraphs, bold (<strong>) & italics (<em>) text, links (<a>), horizontal rules (<hr>) and <small> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.

-

Sample code

-
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
-<a href="#">This is a link.</a>
-<small>This is some small text.</small>
-<sub>Subscript</sub>
-<sup>Superscript</sup>
-<code>Inline code</code>
-<kbd>Keyboard Input</kbd>
-<hr>
-<pre>This is some preformatted text.</pre>
-<blockquote cite="www.quotation.source">
-  This is some quoted text from another website or person.
-</blockquote>

-
-
-
-
-
-
-
-
-

Lists

-
-
-

-
    -
  • Apple
  • -
  • Orange
  • -
  • Strawberry
  • -

-
    -
  1. Wake up
  2. -
  3. Eat breakfast
  4. -
  5. Go to work
  6. -

-
-
-
-

Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<ul>) and ordered lists (<ol>) are minimally pre-styled to make things a little bit easier for you.

-

Sample code

-
<ul>
-  <li>Apple</li>
-  <li>Orange</li>
-  <li>Strawberry</li>
-</ul>
-
-<ol>
-  <li>Wake up</li>
-  <li>Eat breakfast</li>
-  <li>Go to work</li>
-</ol>

-
-
-
-
-
-
-
-
-

Image responsiveness & captions

-
-
-
image
Image caption
-
-
-

Image elements (<img>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.

On a side note, if you want to add captions to images, you can use a <figcaption> element, while wrapping both the image and it inside a <figure>.

-

Sample code

-
<figure>
-  <img src="...">
-  <figcaption>Image caption</figcaption>
-</figure>

-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Core + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Core

+

The core module contains basic reset and fix rules, based on Normalize.css v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The core module utilizes the ruleset of Normalize.css v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in core deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.


+
+
+

Quick start

+

To use the core module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+
+
+
+
+
+

Typography

+
+
+

For the basic typography rules we did the following, along with other things presented below:

+
    +
  • We use a native font stack to figure out the best font for your device.
  • +
  • We set the colors to background: #f8f8f8; and color: #212121;.
  • +
  • We use a font-size of 16px for the root element.
  • +
  • We set line-height to 1.5.
  • +
+
+
+
+

Notes

+
    +
  • Fluid typography is also included, but not enabled by default. If you want to try it out, check out the out the customization page.
  • +
+
+
+
+
+
+
+
+

Headings

+
+
+

Heading 1Subheading

+

Heading 2Subheading

+

Heading 3Subheading

+

Heading 4Subheading

+
Heading 5Subheading
+
Heading 6Subheading
+
+
+

All six of the HTML headings (<h1> - <h6>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <small> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.

+

Sample code

+
<h1>Heading 1<small>Subheading</small></h1>
+<h2>Heading 2<small>Subheading</small></h2>
+<h3>Heading 3<small>Subheading</small></h3>
+<h4>Heading 4<small>Subheading</small></h4>
+<h5>Heading 5<small>Subheading</small></h5>
+<h6>Heading 6<small>Subheading</small></h6>

+
+
+
+
+
+
+
+
+

Common textual elements

+
+
+

This is a paragraph with some sample text. Did you know mini.css v2 is codenamed Fermion? No? Well, now you do! Oh, by the way, that was some Bold text and here is some text in Italics. Maybe you want to know what our inline elements look like. For example a link to the GitHub repository of mini.css looks like that! Neat, right? Maybe you want to see some inline code or some sample input. Oh, also small text is cool, along with its siblings: the subscripthi! and the superscripthello!. Finally, check out the horizontal rule, preformatted code block and quotation below.


+
function sum(num1, num2) {
+    var num3 = num1 + num2;
+    console.log('Result: ' + num3);
+}
+
This is some quoted text from elsewhere.

+
+
+
+

The most common HTML5 elements must be things like <p>aragraphs, bold (<strong>) & italics (<em>) text, links (<a>), horizontal rules (<hr>) and <small> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.

+

Sample code

+
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
+<a href="#">This is a link.</a>
+<small>This is some small text.</small>
+<sub>Subscript</sub>
+<sup>Superscript</sup>
+<code>Inline code</code>
+<kbd>Keyboard Input</kbd>
+<hr>
+<pre>This is some preformatted text.</pre>
+<blockquote cite="www.quotation.source">
+  This is some quoted text from another website or person.
+</blockquote>

+
+
+
+
+
+
+
+
+

Lists

+
+
+

+
    +
  • Apple
  • +
  • Orange
  • +
  • Strawberry
  • +

+
    +
  1. Wake up
  2. +
  3. Eat breakfast
  4. +
  5. Go to work
  6. +

+
+
+
+

Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<ul>) and ordered lists (<ol>) are minimally pre-styled to make things a little bit easier for you.

+

Sample code

+
<ul>
+  <li>Apple</li>
+  <li>Orange</li>
+  <li>Strawberry</li>
+</ul>
+
+<ol>
+  <li>Wake up</li>
+  <li>Eat breakfast</li>
+  <li>Go to work</li>
+</ol>

+
+
+
+
+
+
+
+
+

Image responsiveness & captions

+
+
+
image
Image caption
+
+
+

Image elements (<img>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.

On a side note, if you want to add captions to images, you can use a <figcaption> element, while wrapping both the image and it inside a <figure>.

+

Sample code

+
<figure>
+  <img src="...">
+  <figcaption>Image caption</figcaption>
+</figure>

+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/flavors.html b/docs/v2/flavors.html index 7f9bf5b..cea50c9 100644 --- a/docs/v2/flavors.html +++ b/docs/v2/flavors.html @@ -1,112 +1,112 @@ - - - - - - mini.css - Flavors - - - - - - - - - - - -
- - - - -  GitHub -
- - -
-
-
-

Flavors

-

One of the core ideas behind mini.css is its flavor system. A flavor is the final compiled stylesheet a website or web app uses. When you start using mini.css, you usually try out the default flavor, using one of the following references inside your HTML page's <head> tag:

-
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
-
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.7/dist/mini-default.min.css">

-

There are, however a handful of other flavors included with mini.css. Below, you can see a full list of them:


-
    -
  • -

    Default mini-default

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
    -

    The default flavor for mini.css uses a light gray background and gray-black foreground color. Certain containers, such as cards and tabs use white-gray backgrounds. The grid system has 12 columns and most of the components and modules use sharp corners and light border colors. All of the colors used in this flavor are loosely based on Google's Material design color palette.

    -
    -

    Author: Chalarangelo

    -

    Size: 7 KB

    -
    -
  • -
  • -

    Dark  View on Codepenmini-dark

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-dark.min.css">
    -

    The dark version of the default flavor, Dark uses a dark gray background with light gray foreground color. All modules are the same as in the default flavor, but with a dark palette, loosely based on Google's Material design color palette.

    -
    -

    Author: Chalarangelo

    -

    Size: 7 KB

    -
    -
  • -
  • -

    Lite  View on Codepenmini-lite

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-lite.min.css">
    -

    Lite is a light flavor that uses the default palette (light gray background and gray-black foreground color). It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use sharp corners without shadows. To make the flavor lighter, button groups, horizontal and vertical tables, certain card and progress styles, along with spinner donuts, tooltips, navigation bars, modals, drawers and toasts are not included.

    -
    -

    Author: Chalarangelo

    -

    Size: 5 KB

    -
    -
  • -
  • -

    Sucroa  View on Codepenmini-sucroa

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-sucroa.min.css">
    -

    Sucroa is a full flavor that uses a yellow-pink-lilac background color palette with dark purple-black foreground colors. It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. The card module's .dark and .darker classes have been replaced by the .light and .lighter classes respectively. Finally, the .shadowed class is replaced by varying degrees of generic shadows (.shadow-none, .shadow-small, .shadow-medium and .shadow-large).

    -
    -

    Author: Angeliki Daskalakis

    -

    Size: 7 KB (loads external fonts)

    -
    -
  • -
  • -

    Nord  View on Codepenmini-nord

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-nord.min.css">
    -

    Nord is a full flavor that uses the Nord color palette (arctic, north-bluish color palette). It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. All modules and components that are available in the default flavor are also available in Nord. Finally, the .shadowed class is replaced by varying degrees of generic shadows (.shadow-none, .shadow-small, .shadow-medium and .shadow-large).

    -
    -

    Author: tphecca

    -

    Size: 7 KB

    -
    -
  • -
  • -

    Progressive Web App  View on Codepenmini-pwa

    -
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-pwa.min.css">
    -

    The Progressive Web App flavor follows the Google Material Design Guidelines and targets mobile devices and especially those based on the Android operating system. It uses mostly the default naming conventions (.primary etc.). The grid system has 12 columns and most components use rounded corners with soft shadows. To make the flavor lighter, button groups, horizontal and vertical tables, certain card styles, the entirety of the progress and tab modules, along with tooltips, navigation bars, modals and most style variants are not included. Finally, the card module's .dark class has been replaced by the .accent class.

    -
    -

    Author: Chalarangelo

    -

    Size: 5 KB

    -
    -
  • -
-

If you would rather modify one of the pre-defined flavors or create your own, check out our customization page for instructions.

-
-
-
- - - - + + + + + + mini.css - Flavors + + + + + + + + + + + +
+ + + + +  GitHub +
+ + +
+
+
+

Flavors

+

One of the core ideas behind mini.css is its flavor system. A flavor is the final compiled stylesheet a website or web app uses. When you start using mini.css, you usually try out the default flavor, using one of the following references inside your HTML page's <head> tag:

+
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
+
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.7/dist/mini-default.min.css">

+

There are, however a handful of other flavors included with mini.css. Below, you can see a full list of them:


+
    +
  • +

    Default mini-default

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
    +

    The default flavor for mini.css uses a light gray background and gray-black foreground color. Certain containers, such as cards and tabs use white-gray backgrounds. The grid system has 12 columns and most of the components and modules use sharp corners and light border colors. All of the colors used in this flavor are loosely based on Google's Material design color palette.

    +
    +

    Author: Chalarangelo

    +

    Size: 7 KB

    +
    +
  • +
  • +

    Dark  View on Codepenmini-dark

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-dark.min.css">
    +

    The dark version of the default flavor, Dark uses a dark gray background with light gray foreground color. All modules are the same as in the default flavor, but with a dark palette, loosely based on Google's Material design color palette.

    +
    +

    Author: Chalarangelo

    +

    Size: 7 KB

    +
    +
  • +
  • +

    Lite  View on Codepenmini-lite

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-lite.min.css">
    +

    Lite is a light flavor that uses the default palette (light gray background and gray-black foreground color). It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use sharp corners without shadows. To make the flavor lighter, button groups, horizontal and vertical tables, certain card and progress styles, along with spinner donuts, tooltips, navigation bars, modals, drawers and toasts are not included.

    +
    +

    Author: Chalarangelo

    +

    Size: 5 KB

    +
    +
  • +
  • +

    Sucroa  View on Codepenmini-sucroa

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-sucroa.min.css">
    +

    Sucroa is a full flavor that uses a yellow-pink-lilac background color palette with dark purple-black foreground colors. It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. The card module's .dark and .darker classes have been replaced by the .light and .lighter classes respectively. Finally, the .shadowed class is replaced by varying degrees of generic shadows (.shadow-none, .shadow-small, .shadow-medium and .shadow-large).

    +
    +

    Author: Angeliki Daskalakis

    +

    Size: 7 KB (loads external fonts)

    +
    +
  • +
  • +

    Nord  View on Codepenmini-nord

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-nord.min.css">
    +

    Nord is a full flavor that uses the Nord color palette (arctic, north-bluish color palette). It uses the default naming conventions (.primary, .secondary etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. All modules and components that are available in the default flavor are also available in Nord. Finally, the .shadowed class is replaced by varying degrees of generic shadows (.shadow-none, .shadow-small, .shadow-medium and .shadow-large).

    +
    +

    Author: tphecca

    +

    Size: 7 KB

    +
    +
  • +
  • +

    Progressive Web App  View on Codepenmini-pwa

    +
    <link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-pwa.min.css">
    +

    The Progressive Web App flavor follows the Google Material Design Guidelines and targets mobile devices and especially those based on the Android operating system. It uses mostly the default naming conventions (.primary etc.). The grid system has 12 columns and most components use rounded corners with soft shadows. To make the flavor lighter, button groups, horizontal and vertical tables, certain card styles, the entirety of the progress and tab modules, along with tooltips, navigation bars, modals and most style variants are not included. Finally, the card module's .dark class has been replaced by the .accent class.

    +
    +

    Author: Chalarangelo

    +

    Size: 5 KB

    +
    +
  • +
+

If you would rather modify one of the pre-defined flavors or create your own, check out our customization page for instructions.

+
+
+
+ + + + diff --git a/docs/v2/grid.html b/docs/v2/grid.html index 90e7b9c..89a394f 100644 --- a/docs/v2/grid.html +++ b/docs/v2/grid.html @@ -1,692 +1,692 @@ - - - - - - mini.css - Grid - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Grid

-

The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Easy page layout is one of the main advantages of using a CSS framework over writing your own styles. The grid module utilizes the Flexbox Layout to provide you with a modern and responsive layout grid system for all your needs. Rules in the grid module help you create basic fluid containers for your grid and allow you to design layouts that work well on all screen sizes using a simple row and column structure. The grid system contains definitions for both fluid columns that resize according to their siblings and columns with preset sizes on different screen sizes, as well as rules that allow you to offset or move certain columns to the first or last place on the grid's row on different devices, helping you present the page in a different layout without duplicating any content. All of the rules in the module are built around accessibility, so screen readers can easily read you pages.


-
-
-

Quick start

-

To use the grid module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">
-
-
-
-
-
-
-
-
-

Basic layout

-
-
-

-
1
11
-
2
10
-
3
9
-
4
8
-
5
7
-
6
6
-
12
-
fluid
fluid
-
-
-
-

The grid system's basic layout is composed of three components, presented below in the order they should be added to the DOM tree:

-
    -
  1. The grid's .container is the outermost layer of your grid system. It is a fluid container that wraps the flexible grid system inside it.
  2. -
  3. Inside the container, .rows are added to specify each row of the grid layout. Rows serve to provide you with a simple basis for your layout's columns.
  4. -
  5. Finally, inside the rows, .col- elements are added for the columns. The columns are a little bit more complex than the container and rows, as they are what makes the layout respond to changes. There are two basic ways to define a column for your layout: -
      -
    • using .col-SCR_SZ to specify fluid columns, replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens).
    • -
    • using .col-SCR_SZ-COL_WD to specify columns with fixed width, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the column (1 meaning 1/12 of the width of the row and 12 meaning 100% of the width of the row).
    • -
    -
  6. -
-

Sample code

-

The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on Show sample code below to see the code sample for this example. Also, the example presented showcases the grid system's syntax for smaller screens, but you can do the same thing for any screen size.


-
- - -
-
<div class="container">
-  <div class="row">
-    <div class="col-sm-1">
-    </div>
-    <div class="col-sm-11">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-2">
-    </div>
-    <div class="col-sm-10">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-3">
-    </div>
-    <div class="col-sm-9">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-4">
-    </div>
-    <div class="col-sm-8">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-5">
-    </div>
-    <div class="col-sm-7">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-6">
-    </div>
-    <div class="col-sm-6">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12">
-    </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-    <div class="col-sm">
-    </div>
-  </div>
-</div>
-
-

-
-
-
-

Notes

-
    -
  • mini.css uses a mobile-first approach in its grid system. This means that specifying a layout for smaller device sizes will apply the same layout on medium-sized and larger screens, so you do not have to rewrite the same layout for all three screen sizes. However, if you want to change the layout on different screen sizes, check the section below.
  • -
  • The grid module is compatible with modern browsers, but might not display properly in older browsers.
  • -
  • The specific breakpoints for small, medium and large screen sizes are as follows: -
      -
    • small: less than 768px wide
    • -
    • medium: more than or equal to 768px wide but less than 1280px wide
    • -
    • large: 1280px wide or more
    • -
    -
  • -
  • Fluid columns can be used for sizes that are not of the form 100%/12×X where X an integer value between 1 and 12. For example, if you have 7 .col-sm elements in one row, each of the elements will have a width of 1/7th the width of the row.
  • -

-
-
-
<div class="col-sm">
-  <div class="container">
-  </div>
-</div>
-<!-- or -->
-<div class="col-sm">
-  <div class="row">
-  </div>
-</div>
-

Do: A column can contain a container or a row inside it. The container can also be skipped if inside a column, so you only need to add a row.

-
-
-
<div class="col-sm">
-  <div class="col-sm">
-  </div>
-</div>
-

Don't: Avoid using columns inside columns without a row wrapping them. Either make the outer column a row in itself or wrap the inside columns in a row.

-
-
-
<div class="col-sm row">
-  <div class="col-sm-6">
-  </div>
-  <div class="col-sm-6">
-  </div>
-</div>
-

Do: A column can also be a row at the same time, if you want to include sub-columns inside it. You can make the same element both a column in its own row and a row for its containing columns. The same idea can be applied for the container. Containers can, however, be omitted, when already inside a grid.

-

-
-
-
<div class="row">
-  <p>Content without columns...</p>
-</div>
-

Don't: Avoid using rows with content inside that is not wrapped in columns. Try to use a single .col-sm to wrap the content inside these, otherwise there might be unexpected behavior.

-
-
-
<div class="row">
-  <div class="col-sm">
-  <div>
-  <div class="col-sm-4">
-  </div>
- </div>
-<!-- or -->
-<div class="row">
-  <div class="col-sm-12">
-  <div>
-  <div class="col-sm-12">
-  </div>
-</div>
-

Do: Mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns with a total size of more than 12, meaning with a total width of over 100%. The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.

-
-
-
<div class="container">
-  <div class="row">
-    <div class="col-sm">
-    <div>
-    </div>
-  <p>Normal paragraph.</p>
-</div>
-<!-- or -->
-<div class="row">
-  <div class="col-sm">
-  </div>
-  <p>Normal paragraph.</p>
-</div>
-

Don't: Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid system. Always wrap content inside the proper containers (container, row or column) in your grid layout.

-
-
-
-
-
-
-
-
-
-

Screen-specific layouts

-
-
-
-
-
-

Small screen layout


-
-
-
-
-
-

Medium/Large screen layout


-
-
-
-
-
-
-
-
-

You can specify different layouts for your pages and web apps, using the grid system's columns. To do this add classes to your columns for different screen sizes, using either the fluid column syntax (.col-SCR_SZ) or the fixed width column syntax (.col-SCR_SZ-COL_WD) or even both.

-

Sample code

-
<div class="container">
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12 col-md-3 col-lg-2">
-    </div>
-    <div class="col-sm-12 col-md-5 col-lg-7">
-    </div>
-    <div class="col-sm-12 col-md-4 col-lg-3">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-</div>

-
-
-
-

Notes

-
    -
  • Leaving a column's size unspecified for a resolution will use the style applied for the previous largest resolution recursively.
  • -
  • Changing the layout for different screen sizes can sometimes require complex content realignment, offsetting and reordering. For these features, check the sections below.
  • -

-
-
-
<div class="row">
-  <div class="col-sm-12 col-md-6">
-  </div>
-  <div class="col-sm-12 col-md-6">
-  </div>
-</div>
-

Do: You can radically change the layout of your content for different displays. Laying out your content vertically in .col-sm-12s for small devices and then compacting it to .col-md-6s for medium displays is pretty common. If your columns exceed a total size of 12 on some displays, they will wrap accordingly, so do not worry.

-
-
-
<div class="row">
-  <div class="col-sm-12 col-md-6">
-  </div>
-</div>
-<div class="row">
-  <div class="col-sm-12 col-md-6">
-  </div>
-</div>
-

Don't: If you want to place two columns side by side on some displays, but not on others (e.g. placing them vertically on smaller displays, then next to each other on medium-sized or larger displays), place them in one row, not multiple, otherwise you will not achieve the desired effect.

-
-
-
<div class="row">
-  <div class="col-sm col-lg-3">
-  </div>
-  <div class="col-sm-6 col-md-8">
-  </div>
-</div>
-

Do: Specify only the screen-specific column sizes that you need. You can omit the medium-sized screens' size from a column if its layout on smaller screens is fluid or should be the same as in medium-sized displays. Or, if your larger screen layout is the same as your medium-sized screen layout, you can omit the class for the larger screen.

-
-
-
<div class="row">
-  <div class="col-md">
-  </div>
-  <div class="col-lg">
-  </div>
-</div>
-

Don't: Never omit the class needed for the smallest screen size you have (.col-sm or .col-sm-COL_WD), otherwise the column's layout on smaller displays might behave unexpectedly. You can, however, omit layout for the other two screen sizes if you want.

-
-
-
-
-
-
-
-
-
-

Predefined layouts

-
-
-

Some simple grid layout problems can be solved using predefined layouts. To use a predefined layout, simply add a predefined layout class to a .row element. Predefined classes can be written using one of two syntaxes, similar to normal column classes:

-
    -
  • fluid column layouts can be specified using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names.
  • -
  • fixed width columns layouts can be specified using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns.
  • -
-

Sample code

-
<div class="row cols-sm-6">
-  <div>
-    <p>col-sm-6</p>
-  </div>
-  <div>
-    <p>col-sm-6</p>
-  </div>
-</div>

-
-
-
-

Notes

-
    -
  • Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering.
  • -
  • If you use a fluid predefined layout, its columns will always be placed in one row.
  • -
  • Not specifying a predefined layout for a resolution will use the style applied for the previous largest resolution recursively.
  • -

-
-
-
<div class="row cols-sm-12 cols-md-6">
-  <div>
-    <p>col-sm-12, col-md-6</p>
-  </div>
-  <div>
-    <p>col-sm-12, col-md-6</p>
-  </div>
-</div>
-

Do: You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.

-
-
-
<div class="row cols-sm-6">
-  <div class="row cols-sm-7">
-    <p>col-sm-6</p>
-  </div>
-  <div class="row cols-sm-5">
-    <p>col-sm-6</p>
-  </div>
-</div>
-

Don't: Avoid using the normal column classes in conjunction with predefined layouts, as they will most likely not apply and can sometimes cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Column offsets

-
-
-

-
size = 8, offset = 2
-
size = 6, offset = 3
-
size = 4, offset = 4
-
-
size = 4, offset = 1
-
size = 4, offset = 2
-
-
-
-
-

If you want to move columns to the right, you can use the offset classes on your columns. Offset classes use the .col-SCR_SZ-offset-COL_WD syntax, where SCR_SZ is one of the available screen size names (sm, md or lg) and COL_WD a number from 0 to 11 specifying the width of the column's offset. Offsets can also be used in combination with screen-specific layouts and column sizes, providing you with greater flexibility when spacing out your content.

-

Sample code

-

The example presented below showcases the grid system's offsetting syntax for smaller screens, but you can do the same thing for any screen size.

-
<div class="container">
-  <div class="row">
-    <div class="col-sm-8 col-sm-offset-2">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-6 col-sm-offset-3">
-    </div>
-  </div>
-<div class="row">
-    <div class="col-sm-4 col-sm-offset-4">
-    </div>
-</div>
-  <div class="row">
-    <div class="col-sm col-sm-offset-1">
-    </div>
-  <div class="row">
-    <div class="col-sm-4 col-sm-offset-1">
-    </div>
-    <div class="col-sm-4 col-sm-offset-2">
-    </div>
-  </div>
-</div>

-
-
-
-

Notes

-
    -
  • Columns with offsets and columns without offsets can be mixed for better results. In fact, we strongly suggest you try that.
  • -
  • Remember to specify a basic layout and/or screen specific layouts in addition to the offset classes.
  • -

-
-
-
<div class="row">
-  <div class="col-sm col-md-offset-1 col-md-5 col-lg-4">
-  </div>
-  <div class="col-sm col-md-5 col-lg-4 col-lg-offset-2">
-  </div>
-</div>
-

Do: You can specify offset classes when you need them and omit them otherwise. This means that, if you want to offset a column only on a medium-sized or a larger screen, you can just specify the offset for that specific screen. Specifying an offset for a smaller screen, however, will apply it to medium-sized and larger screens as well, medium-sized screen offsets will apply to larger screens etc. similar to how the layout system works.

-
-
-
<div class="row">
-  <div class="col-sm col-md-10 col-offset-1 col-lg col-lg-offset-0">
-  </div>
-</div>
-

Do: To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can use the .col-SCR_SZ-offset-0 class, replacing SCR_SZ with the desired screen size, effectively resetting all offsets.

-
-
-
-
-
-
-
-
-
-

Column reordering

-
-
-
-


-
-
first
-
 
-
 
-


-
-
 
-
normal
-
 
-
-


-
-
 
-
 
-
last
-
-
-
-
-

Additionally, if you want to reorder your columns, you can do that to some extent using the .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes to your columns, replacing SCR_SZ with one of the available screen size names (sm, md or lg). These classes will change the ordering of your columns appropriately to allow you to move content around any way you want (e.g. moving a navigation sidebar from the left of the content on larger displays to the end of the content on smaller displays).

-

Sample code

-
<div class="container">
-  <div class="row">
-    <div class="col-sm col-md-last col-lg-normal">
-    </div>
-    <div class="col-sm-first col-md-normal">
-    </div>
-    <div class="col-sm col-md-first col-lg-normal">
-    </div>
-  </div>
-</div>

-
-
-
-

Notes

-
    -
  • Columns are ordered by default in order of appearance. You should only apply column reordering classes to the columns you want to reorder on the screen-specific layouts you need them.
  • -
  • Remember to specify a basic layout and/or screen specific layouts in addition to the column reordering classes.
  • -
  • Column reordering is applied from smaller to larger screens, similar to how column layout and offsetting work.
  • -

-
-
-
<div class="row">
-  <div class="col-sm col-md-last">
-  </div>
-  <div class="col-sm col-md-last">
-  </div>
-  <div class="col-sm">
-  </div>
-</div>
-

Do: You can use multiple .col-SCR_SZ-firsts and .col-SCR_SZ-lasts, replacing SCR_SZ with the desired screen size, in the same row for the same screen size. If you specify more than one column to be first or last, the columns with the same order will be placed at the beggining or end of the row and the order between them will be determined based on their order of appearance in the DOM tree afterwards.

-
-
-
<div class="row">
-  <div class="col-sm-last col-md-normal">
-  </div>
-  <div class="col-sm">
-  </div>
-</div>
-

Do: To remove a previously applied reorder from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no reordering is active on a column, you can use the .col-SCR_SZ-normal class, replacing SCR_SZ with the desired screen size, effectively resetting all reorders. You do not, however, need to add this class to all other columns or use it when there are no reorders applied.

-
-
-
-
-
-
-
-
-
-

Media object pattern

-
-
-
-

-
-
image
-
-
-

Media object heading

-

This is an example implementation of the popular media object pattern, using simple grid rules.

-
-
-
-
-
-
-

Last, but not least, you can use the grid system's classes to create a media object in one of many ways, based on your needs. The simplest way to implement a media object is using two columns, one for the media (i.e. <img>) and one for the textual content next to the media.

-

Sample code

-
<div class="row">
-  <div class="col-sm-1">
-    <img src="...">
-  </div>
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>

-
-
-
-

Notes

-
    -
  • The media object is not a different component, but rather a popular pattern that can be implemented using the standard grid system classes.
  • -
  • You can use many different elements for your media object. For example, you can make the right side of the media object contain a form or an input field.
  • -

-
-
-
<div class="row">
-  <div class="col-sm-1 col-md-2 col-lg-3">
-    <img src="...">
-  </div>
-  <div class="col-sm-11 col-md-10 col-lg-9">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
-

Do: You can make your media object responsive, by adding screen-specific layout classes to its columns.

-
-
-
<div class="row">
-  <div class="col-sm-1 col-sm-last">
-    <img src="...">
-  </div>
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
-

Do: You can align the media object's content to the left of the image (instead of the other way round), using the .col-SCR_SZ-normal class, replacing SCR_SZ with the desired screen size.

-
-
-
<div class="row">
-  <div class="col-sm-2">
-    <img src="...">
-  </div>
-  <div class="col-sm">
-    <div class="row">
-      <div class="col-sm">
-        <h2>Parent media object</h2>
-        <p>Parent media object content...</p>
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-sm-2">
-        <img src="...">
-      </div>
-      <div class="col-sm">
-        <h2>Child media object</h2>
-        <p>Child media object content...</p>
-      </div>
-    </div>
-  </div>
-</div>
-
-

Do: Media objects can be easily nested. You can use .row elements in the content column of the media object to make everything align perfectly.

-
-
-
<div class="row">
-  <img src="..." class="col-sm-1">
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
-

Don't: Do not apply a column class directly to the media element (e.g.<img>) or the content of the media object, as this can cause problems with certain elements. Wrap your media objects columns in <div> elements and apply the grid classes to them, instead.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Grid + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Grid

+

The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Easy page layout is one of the main advantages of using a CSS framework over writing your own styles. The grid module utilizes the Flexbox Layout to provide you with a modern and responsive layout grid system for all your needs. Rules in the grid module help you create basic fluid containers for your grid and allow you to design layouts that work well on all screen sizes using a simple row and column structure. The grid system contains definitions for both fluid columns that resize according to their siblings and columns with preset sizes on different screen sizes, as well as rules that allow you to offset or move certain columns to the first or last place on the grid's row on different devices, helping you present the page in a different layout without duplicating any content. All of the rules in the module are built around accessibility, so screen readers can easily read you pages.


+
+
+

Quick start

+

To use the grid module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+
+
+
+
+
+

Basic layout

+
+
+

+
1
11
+
2
10
+
3
9
+
4
8
+
5
7
+
6
6
+
12
+
fluid
fluid
+
+
+
+

The grid system's basic layout is composed of three components, presented below in the order they should be added to the DOM tree:

+
    +
  1. The grid's .container is the outermost layer of your grid system. It is a fluid container that wraps the flexible grid system inside it.
  2. +
  3. Inside the container, .rows are added to specify each row of the grid layout. Rows serve to provide you with a simple basis for your layout's columns.
  4. +
  5. Finally, inside the rows, .col- elements are added for the columns. The columns are a little bit more complex than the container and rows, as they are what makes the layout respond to changes. There are two basic ways to define a column for your layout: +
      +
    • using .col-SCR_SZ to specify fluid columns, replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens).
    • +
    • using .col-SCR_SZ-COL_WD to specify columns with fixed width, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the column (1 meaning 1/12 of the width of the row and 12 meaning 100% of the width of the row).
    • +
    +
  6. +
+

Sample code

+

The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on Show sample code below to see the code sample for this example. Also, the example presented showcases the grid system's syntax for smaller screens, but you can do the same thing for any screen size.


+
+ + +
+
<div class="container">
+  <div class="row">
+    <div class="col-sm-1">
+    </div>
+    <div class="col-sm-11">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-2">
+    </div>
+    <div class="col-sm-10">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-3">
+    </div>
+    <div class="col-sm-9">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-4">
+    </div>
+    <div class="col-sm-8">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-5">
+    </div>
+    <div class="col-sm-7">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-6">
+    </div>
+    <div class="col-sm-6">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12">
+    </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+    <div class="col-sm">
+    </div>
+  </div>
+</div>
+
+

+
+
+
+

Notes

+
    +
  • mini.css uses a mobile-first approach in its grid system. This means that specifying a layout for smaller device sizes will apply the same layout on medium-sized and larger screens, so you do not have to rewrite the same layout for all three screen sizes. However, if you want to change the layout on different screen sizes, check the section below.
  • +
  • The grid module is compatible with modern browsers, but might not display properly in older browsers.
  • +
  • The specific breakpoints for small, medium and large screen sizes are as follows: +
      +
    • small: less than 768px wide
    • +
    • medium: more than or equal to 768px wide but less than 1280px wide
    • +
    • large: 1280px wide or more
    • +
    +
  • +
  • Fluid columns can be used for sizes that are not of the form 100%/12×X where X an integer value between 1 and 12. For example, if you have 7 .col-sm elements in one row, each of the elements will have a width of 1/7th the width of the row.
  • +

+
+
+
<div class="col-sm">
+  <div class="container">
+  </div>
+</div>
+<!-- or -->
+<div class="col-sm">
+  <div class="row">
+  </div>
+</div>
+

Do: A column can contain a container or a row inside it. The container can also be skipped if inside a column, so you only need to add a row.

+
+
+
<div class="col-sm">
+  <div class="col-sm">
+  </div>
+</div>
+

Don't: Avoid using columns inside columns without a row wrapping them. Either make the outer column a row in itself or wrap the inside columns in a row.

+
+
+
<div class="col-sm row">
+  <div class="col-sm-6">
+  </div>
+  <div class="col-sm-6">
+  </div>
+</div>
+

Do: A column can also be a row at the same time, if you want to include sub-columns inside it. You can make the same element both a column in its own row and a row for its containing columns. The same idea can be applied for the container. Containers can, however, be omitted, when already inside a grid.

+

+
+
+
<div class="row">
+  <p>Content without columns...</p>
+</div>
+

Don't: Avoid using rows with content inside that is not wrapped in columns. Try to use a single .col-sm to wrap the content inside these, otherwise there might be unexpected behavior.

+
+
+
<div class="row">
+  <div class="col-sm">
+  <div>
+  <div class="col-sm-4">
+  </div>
+ </div>
+<!-- or -->
+<div class="row">
+  <div class="col-sm-12">
+  <div>
+  <div class="col-sm-12">
+  </div>
+</div>
+

Do: Mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns with a total size of more than 12, meaning with a total width of over 100%. The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.

+
+
+
<div class="container">
+  <div class="row">
+    <div class="col-sm">
+    <div>
+    </div>
+  <p>Normal paragraph.</p>
+</div>
+<!-- or -->
+<div class="row">
+  <div class="col-sm">
+  </div>
+  <p>Normal paragraph.</p>
+</div>
+

Don't: Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid system. Always wrap content inside the proper containers (container, row or column) in your grid layout.

+
+
+
+
+
+
+
+
+
+

Screen-specific layouts

+
+
+
+
+
+

Small screen layout


+
+
+
+
+
+

Medium/Large screen layout


+
+
+
+
+
+
+
+
+

You can specify different layouts for your pages and web apps, using the grid system's columns. To do this add classes to your columns for different screen sizes, using either the fluid column syntax (.col-SCR_SZ) or the fixed width column syntax (.col-SCR_SZ-COL_WD) or even both.

+

Sample code

+
<div class="container">
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12 col-md-3 col-lg-2">
+    </div>
+    <div class="col-sm-12 col-md-5 col-lg-7">
+    </div>
+    <div class="col-sm-12 col-md-4 col-lg-3">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+</div>

+
+
+
+

Notes

+
    +
  • Leaving a column's size unspecified for a resolution will use the style applied for the previous largest resolution recursively.
  • +
  • Changing the layout for different screen sizes can sometimes require complex content realignment, offsetting and reordering. For these features, check the sections below.
  • +

+
+
+
<div class="row">
+  <div class="col-sm-12 col-md-6">
+  </div>
+  <div class="col-sm-12 col-md-6">
+  </div>
+</div>
+

Do: You can radically change the layout of your content for different displays. Laying out your content vertically in .col-sm-12s for small devices and then compacting it to .col-md-6s for medium displays is pretty common. If your columns exceed a total size of 12 on some displays, they will wrap accordingly, so do not worry.

+
+
+
<div class="row">
+  <div class="col-sm-12 col-md-6">
+  </div>
+</div>
+<div class="row">
+  <div class="col-sm-12 col-md-6">
+  </div>
+</div>
+

Don't: If you want to place two columns side by side on some displays, but not on others (e.g. placing them vertically on smaller displays, then next to each other on medium-sized or larger displays), place them in one row, not multiple, otherwise you will not achieve the desired effect.

+
+
+
<div class="row">
+  <div class="col-sm col-lg-3">
+  </div>
+  <div class="col-sm-6 col-md-8">
+  </div>
+</div>
+

Do: Specify only the screen-specific column sizes that you need. You can omit the medium-sized screens' size from a column if its layout on smaller screens is fluid or should be the same as in medium-sized displays. Or, if your larger screen layout is the same as your medium-sized screen layout, you can omit the class for the larger screen.

+
+
+
<div class="row">
+  <div class="col-md">
+  </div>
+  <div class="col-lg">
+  </div>
+</div>
+

Don't: Never omit the class needed for the smallest screen size you have (.col-sm or .col-sm-COL_WD), otherwise the column's layout on smaller displays might behave unexpectedly. You can, however, omit layout for the other two screen sizes if you want.

+
+
+
+
+
+
+
+
+
+

Predefined layouts

+
+
+

Some simple grid layout problems can be solved using predefined layouts. To use a predefined layout, simply add a predefined layout class to a .row element. Predefined classes can be written using one of two syntaxes, similar to normal column classes:

+
    +
  • fluid column layouts can be specified using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names.
  • +
  • fixed width columns layouts can be specified using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns.
  • +
+

Sample code

+
<div class="row cols-sm-6">
+  <div>
+    <p>col-sm-6</p>
+  </div>
+  <div>
+    <p>col-sm-6</p>
+  </div>
+</div>

+
+
+
+

Notes

+
    +
  • Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering.
  • +
  • If you use a fluid predefined layout, its columns will always be placed in one row.
  • +
  • Not specifying a predefined layout for a resolution will use the style applied for the previous largest resolution recursively.
  • +

+
+
+
<div class="row cols-sm-12 cols-md-6">
+  <div>
+    <p>col-sm-12, col-md-6</p>
+  </div>
+  <div>
+    <p>col-sm-12, col-md-6</p>
+  </div>
+</div>
+

Do: You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.

+
+
+
<div class="row cols-sm-6">
+  <div class="row cols-sm-7">
+    <p>col-sm-6</p>
+  </div>
+  <div class="row cols-sm-5">
+    <p>col-sm-6</p>
+  </div>
+</div>
+

Don't: Avoid using the normal column classes in conjunction with predefined layouts, as they will most likely not apply and can sometimes cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Column offsets

+
+
+

+
size = 8, offset = 2
+
size = 6, offset = 3
+
size = 4, offset = 4
+
+
size = 4, offset = 1
+
size = 4, offset = 2
+
+
+
+
+

If you want to move columns to the right, you can use the offset classes on your columns. Offset classes use the .col-SCR_SZ-offset-COL_WD syntax, where SCR_SZ is one of the available screen size names (sm, md or lg) and COL_WD a number from 0 to 11 specifying the width of the column's offset. Offsets can also be used in combination with screen-specific layouts and column sizes, providing you with greater flexibility when spacing out your content.

+

Sample code

+

The example presented below showcases the grid system's offsetting syntax for smaller screens, but you can do the same thing for any screen size.

+
<div class="container">
+  <div class="row">
+    <div class="col-sm-8 col-sm-offset-2">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-6 col-sm-offset-3">
+    </div>
+  </div>
+<div class="row">
+    <div class="col-sm-4 col-sm-offset-4">
+    </div>
+</div>
+  <div class="row">
+    <div class="col-sm col-sm-offset-1">
+    </div>
+  <div class="row">
+    <div class="col-sm-4 col-sm-offset-1">
+    </div>
+    <div class="col-sm-4 col-sm-offset-2">
+    </div>
+  </div>
+</div>

+
+
+
+

Notes

+
    +
  • Columns with offsets and columns without offsets can be mixed for better results. In fact, we strongly suggest you try that.
  • +
  • Remember to specify a basic layout and/or screen specific layouts in addition to the offset classes.
  • +

+
+
+
<div class="row">
+  <div class="col-sm col-md-offset-1 col-md-5 col-lg-4">
+  </div>
+  <div class="col-sm col-md-5 col-lg-4 col-lg-offset-2">
+  </div>
+</div>
+

Do: You can specify offset classes when you need them and omit them otherwise. This means that, if you want to offset a column only on a medium-sized or a larger screen, you can just specify the offset for that specific screen. Specifying an offset for a smaller screen, however, will apply it to medium-sized and larger screens as well, medium-sized screen offsets will apply to larger screens etc. similar to how the layout system works.

+
+
+
<div class="row">
+  <div class="col-sm col-md-10 col-offset-1 col-lg col-lg-offset-0">
+  </div>
+</div>
+

Do: To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can use the .col-SCR_SZ-offset-0 class, replacing SCR_SZ with the desired screen size, effectively resetting all offsets.

+
+
+
+
+
+
+
+
+
+

Column reordering

+
+
+
+


+
+
first
+
 
+
 
+


+
+
 
+
normal
+
 
+
+


+
+
 
+
 
+
last
+
+
+
+
+

Additionally, if you want to reorder your columns, you can do that to some extent using the .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes to your columns, replacing SCR_SZ with one of the available screen size names (sm, md or lg). These classes will change the ordering of your columns appropriately to allow you to move content around any way you want (e.g. moving a navigation sidebar from the left of the content on larger displays to the end of the content on smaller displays).

+

Sample code

+
<div class="container">
+  <div class="row">
+    <div class="col-sm col-md-last col-lg-normal">
+    </div>
+    <div class="col-sm-first col-md-normal">
+    </div>
+    <div class="col-sm col-md-first col-lg-normal">
+    </div>
+  </div>
+</div>

+
+
+
+

Notes

+
    +
  • Columns are ordered by default in order of appearance. You should only apply column reordering classes to the columns you want to reorder on the screen-specific layouts you need them.
  • +
  • Remember to specify a basic layout and/or screen specific layouts in addition to the column reordering classes.
  • +
  • Column reordering is applied from smaller to larger screens, similar to how column layout and offsetting work.
  • +

+
+
+
<div class="row">
+  <div class="col-sm col-md-last">
+  </div>
+  <div class="col-sm col-md-last">
+  </div>
+  <div class="col-sm">
+  </div>
+</div>
+

Do: You can use multiple .col-SCR_SZ-firsts and .col-SCR_SZ-lasts, replacing SCR_SZ with the desired screen size, in the same row for the same screen size. If you specify more than one column to be first or last, the columns with the same order will be placed at the beggining or end of the row and the order between them will be determined based on their order of appearance in the DOM tree afterwards.

+
+
+
<div class="row">
+  <div class="col-sm-last col-md-normal">
+  </div>
+  <div class="col-sm">
+  </div>
+</div>
+

Do: To remove a previously applied reorder from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no reordering is active on a column, you can use the .col-SCR_SZ-normal class, replacing SCR_SZ with the desired screen size, effectively resetting all reorders. You do not, however, need to add this class to all other columns or use it when there are no reorders applied.

+
+
+
+
+
+
+
+
+
+

Media object pattern

+
+
+
+

+
+
image
+
+
+

Media object heading

+

This is an example implementation of the popular media object pattern, using simple grid rules.

+
+
+
+
+
+
+

Last, but not least, you can use the grid system's classes to create a media object in one of many ways, based on your needs. The simplest way to implement a media object is using two columns, one for the media (i.e. <img>) and one for the textual content next to the media.

+

Sample code

+
<div class="row">
+  <div class="col-sm-1">
+    <img src="...">
+  </div>
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>

+
+
+
+

Notes

+
    +
  • The media object is not a different component, but rather a popular pattern that can be implemented using the standard grid system classes.
  • +
  • You can use many different elements for your media object. For example, you can make the right side of the media object contain a form or an input field.
  • +

+
+
+
<div class="row">
+  <div class="col-sm-1 col-md-2 col-lg-3">
+    <img src="...">
+  </div>
+  <div class="col-sm-11 col-md-10 col-lg-9">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
+

Do: You can make your media object responsive, by adding screen-specific layout classes to its columns.

+
+
+
<div class="row">
+  <div class="col-sm-1 col-sm-last">
+    <img src="...">
+  </div>
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
+

Do: You can align the media object's content to the left of the image (instead of the other way round), using the .col-SCR_SZ-normal class, replacing SCR_SZ with the desired screen size.

+
+
+
<div class="row">
+  <div class="col-sm-2">
+    <img src="...">
+  </div>
+  <div class="col-sm">
+    <div class="row">
+      <div class="col-sm">
+        <h2>Parent media object</h2>
+        <p>Parent media object content...</p>
+      </div>
+    </div>
+    <div class="row">
+      <div class="col-sm-2">
+        <img src="...">
+      </div>
+      <div class="col-sm">
+        <h2>Child media object</h2>
+        <p>Child media object content...</p>
+      </div>
+    </div>
+  </div>
+</div>
+
+

Do: Media objects can be easily nested. You can use .row elements in the content column of the media object to make everything align perfectly.

+
+
+
<div class="row">
+  <img src="..." class="col-sm-1">
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
+

Don't: Do not apply a column class directly to the media element (e.g.<img>) or the content of the media object, as this can cause problems with certain elements. Wrap your media objects columns in <div> elements and apply the grid classes to them, instead.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/icons/bacteria.svg b/docs/v2/icons/bacteria.svg index 1ea9a08..4395fda 100644 --- a/docs/v2/icons/bacteria.svg +++ b/docs/v2/icons/bacteria.svg @@ -1,54 +1,54 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/v2/icons/meteor.svg b/docs/v2/icons/meteor.svg index 17a4008..c9ddf0c 100644 --- a/docs/v2/icons/meteor.svg +++ b/docs/v2/icons/meteor.svg @@ -1,74 +1,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/v2/icons/wings.svg b/docs/v2/icons/wings.svg index bd01e94..7285f7c 100644 --- a/docs/v2/icons/wings.svg +++ b/docs/v2/icons/wings.svg @@ -1,51 +1,51 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/v2/input_control.html b/docs/v2/input_control.html index e773ec8..b345b6f 100644 --- a/docs/v2/input_control.html +++ b/docs/v2/input_control.html @@ -1,563 +1,563 @@ - - - - - - mini.css - Input Control - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Input Control

-

The input_control module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The input_control module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.


-
-
-

Quick start

-

To use the input_control module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Forms & input

-
-
-
-
- Inline form (default style) -
 
-
-
-
-
-
- Fluid form -
-
-
-
-
-
- Vertical form -
-
-
-
-
-
- Aligned form (using grid) -
-
- -
-
- -
-
-
-
- -
-
- -
- -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
-
-

Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <form> element and add your <input> elements inside. Link them to <label> elements for ease of access and you are pretty much set. We highly recommend using the <fieldset> and <legend> elements to annotate your forms as well, but you can skip them if you wish.

-

Forms are inline by default. Use the .input-group class on a <div> wrapping inside it an <input> and <label> pair to make sure they always display together in one line. You can make your .input-groups respond to viewport changes, by adding the .fluid class to them or you can align them vertically by adding the .vertical class. Finally, if you want to create aligned forms with a preset layout, you can utilize the grid module's rows and columns.

-

Sample code

-
<form>
-  <fieldset>
-    <legend>Simple form</legend>
-    <div class="input-group fluid">
-      <label for="username">Username</label>
-      <input type="email" value="" id="username" placeholder="username">
-    </div>
-    <div class="input-group fluid">
-      <label for="pwd">Password</label>
-      <input type="password" value="" id="pwd" placeholder="password">
-    </div>
-    <div class="input-group vertical">
-      <label for="nmbr">Number</label>
-      <input type="number" id="nmbr" value="5">
-    </div>
-  </fieldset>
-</form>
-
-
-
-

Notes

-
    -
  • Using the <fieldset> and <legend> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).
  • -
  • Some <input> elements, such as date & time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your website or app.
  • -
  • Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.
  • -
  • Try not to combine the grid module's classes with .fluid or .vertical .input-groups, as this might cause certain styles to overlap and not display exactly like you want them to.
  • -

-
-
-
<form>
-  <fieldset>
-    <legend>Responsive form</legend>
-    <div class="row">
-      <div class="col-sm-12 col-md-4">
-        <label for="username">username</label>
-      </div>
-      <div class="col-sm-12 col-md">
-        <input type="email" value="" id="username" placeholder="username">
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-sm-12 col-md-4">
-        <label for="pwd">password</label>
-      </div>
-      <div class="col-sm-12 col-md-4">
-        <input type="password" value="" id="pwd" placeholder="password">
-      </div>
-    </div>
-  </fieldset>
-</form>
-

Do: You can use .row and .col-SCR_SZ or .col-SCR_SZ-COL_WD (replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens and COL_WD with a number from 1 to 12 specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.

-
-
-
<form>
-  <fieldset>
-    <legend>Responsive form</legend>
-    <div class="row">
-      <div class="col-sm-12 col-md-10 col-md-offset-1">
-        <label for="username">username</label>
-        <input type="email" value="" id="username" placeholder="username">
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-sm-12 col-md-10 col-md-offset-1">
-        <label for="pwd">password</label>
-        <input type="password" value="" id="pwd" placeholder="password">
-      </div>
-    </div>
-  </fieldset>
-</form>
-

Do: Apart from using .row and .col-SCR_SZ or .col-SCR_SZ-COL_WD for responsiveness, you can also use other classes from the grid module such as the offset classes to make your form layouts more interesting.

-
-
-
<style>
-  .label-aligned {
-    align-items: center;
-  }
-</style>
-<form>
-  <fieldset>
-    <legend>Responsive form</legend>
-    <div class="row label-aligned">
-      <div class="col-sm-12 col-md-4">
-        <label for="username">username</label>
-      </div>
-      <div class="col-sm-12 col-md">
-        <input type="email" value="" id="username" placeholder="username">
-      </div>
-    </div>
-  </fieldset>
-</form>
-

Do: When creating aligned forms using the grid module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent .row element, if you want to adjust their vertical alignment.

-
-
-
<form>
-  <fieldset>
-    <legend>Responsive form</legend>
-    <div class="row input-group">
-      <div class="col-sm-12 col-md-4">
-        <label for="username">username</label>
-      </div>
-      <div class="col-sm-12 col-md">
-        <input type="email" value="" id="username" placeholder="username">
-      </div>
-    </div>
-  </fieldset>
-</form>
-

Don't: Avoid using the .input-group class when creating aligned forms. This might cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Checkboxes & radio buttons

-
-
-
-
-
- -
-

-
-   
-   
-   
-
-

-
-
-
-

Checkboxes and radio buttons come pre-styled, using the checkbox hack, while remaining fully accessible. To create a checkbox or radio button, start using a <div> that implements the .input-group class, and then add an <input> of the proper type inside it ("checkbox" or "radio"), followed immediately by a <label> linking to it. Remember to add tabindex="0" to your <input>, so that it will register properly for screen readers.

-

Sample code

-
<div class="input-group">
-  <input type="checkbox" id="check1" tabindex="0">
-  <label for="check1">Checkbox</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
-  <label for="rad1">Radio</label>
-</div>
-
-
-
-

Notes

-
    -
  • Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.
  • -

-
-
-
<div class="input-group">
-  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
-  <label for="rad1">Value 1</label>
-  <input type="radio" id="rad2" tabindex="0" name="radio-group-1">
-  <label for="rad2">Value 2</label>
-</div>
-

Do: You can add multiple radio buttons inside one .input-group, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.

-
-
-
<input type="checkbox" id="check1" tabindex="0">
-<label for="check1">Checkbox</label>
-

Don't: Always use an .input-group for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.

-
-
-
<div class="input-group">
-  <input type="checkbox" id="check1"
-  <label for="check1">Checkbox</label>
-</div>
-

Don't: Remember to add tabindex="0" to all your checkboxes and radio buttons to make them accessible.

-
-
-
<div class="input-group">
-  <label for="check1">Checkbox</label>
-  <input type="checkbox" id="check1" tabindex="0">
-</div>
-

Don't: The structure of checkboxes and radio buttons is very strict, meaning that the <label> should always be after the <input> and never before, otherwise the checkbox or radio button will not display properly.

-
-
-
<div class="input-group">
-  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
-  <input type="radio" id="rad2" tabindex="0" name="radio-group-1">
-  <label for="rad2">Value 2</label>
-  <label for="rad1">Value 1</label>
-</div>
-

Don't: When using multiple radio buttons inside an .input-group, remember to use the usual structure of the radio button component for each radio button (i.e. the <input> and <label>). Not doing so will cause the radio buttons to not display properly.

-
-
-
<div class="input-group">
-  <input type="checkbox" id="check1" tabindex="0">
-</div>
-

Don't: Never leave a checkbox or radio button without a <label>. The <label> is essential to properly display the checkbox or radio button.

-
-
-
-
-
-
-
-
-
-

Switches

-
-
-
-
-
- - -
-
-
-
-
-
-

Switches are almost identical in structure to checkboxes and radio buttons (an .input-group containing an <input> of the proper type inside it ("checkbox" or "radio"), followed immediately by a <label> linking to it), their only difference being that you need to add the .switch class to <label> element to turn your input into a switch. Remember to apply tabindex="0" to your <input> to make it accessible.

-

Sample code

-
<div class="input-group">
-  <input type="checkbox" id="switch1" tabindex="0">
-  <label for="switch1" class="switch">Checkbox switch</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
-  <label for="radswitch1" class="switch">Radio switch</label>
-</div>
-
-
-
-

Notes

-
    -
  • You can create your own color variants for the .switch component. For more information, check out the customization page.
  • -

-
-
-
<div class="input-group">
-  <label for="switch1">Switch with text on its left</label>
-  <input type="checkbox" id="switch1" tabindex="0">
-  <label for="switch1" class="switch"></label>
-</div>
-

Do: By using two <label> elements, you can move the actual .switch to the right of the label's text, effectively allowing you to change the layout. Remember to not add any text to your second <label> that implements the .switch class. You might want, however, to add a few trailing spaces to the first <label> element to make sure the text does not get covered by the component.

-
-
-
-
-
-
-
-
-
-

Buttons & button groups

-
-
- - - - - - - - -

Button group

-
-
-
-

All button types have been stylized by default, while maintaining accessiblity. Simply add any <button> or an <input> with a button type (i.e. "button", "submit" or "reset") and they will be styled accordingly. You can also use the .button class or the role="button" attribute for links, labels and other elements of your choice to make them look like buttons.

-

Color variants are available in the form of the .primary, .secondary, .tertiary and .inverse classes. Size variants are available as well in the form of .small and .large classes.

-

Finally, you can create responsive groups of buttons by wrapping them inside a <div> with the .button-group class.

-

Sample code

-
<button>Default button</button>
-<input type="button" class="primary" value="Primary button">
-<input type="reset" class="secondary" value="Secondary button">
-<input type="submit" class="tertiary" value="Tertiary button">
-<button class="inverse">Inverse button</button>
-<button class="small">Small button</button>
-<button class="large">Large button</button>
-<button disabled>Disabled button</button>
-<a href="#" class="button">Link button</a>
-<a href="#" role="button">Link button</a>
-<label class="button">Label button</label>
-<label role="button">Label button</label>
-
-<div class="button-group">
-  <button>Button</button>
-  <button>Button</button>
-  <button>Button</button>
-</div>
-
-
-
-

Notes

-
    -
  • If you want more color or size variants for your buttons, check out the customization page.
  • -
  • The .button-group component is compatible with modern browsers, but might not display properly in older browsers.
  • -
  • .button-groups will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.
  • -

-
-
-
<button class="inverse small">Small inverse button</button>
-

Do: You can mix and match button color and size variants to achieve the desired effect.

-
-
-
<button class="secondary inverse">Problematic button</button>
-<!-- or -->
-<button class="small large">Problematic button</button>
-

Don't: Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.

-
-
-
<div class="button-group">
-  <button>Button</button>
-  <input type="reset" class="secondary" value="Secondary button">
-  <label class="button inverse">Label button</label>
-</div>
-

Do: You can use button color variants inside the same .button-group. You can also use any component styled like a button inside a .button-group.

-
-
-
<div class="button-group">
-  <button class="large">Button</button>
-  <button>Button</button>
-  <button class="small">Button</button>
-</div>
-

Don't: Avoid using button size variants inside a .button-group, as this might result in unexpected behavior.

-
-
-
-
-
-
-
-
-
-

File upload buttons

-
-
-
-
- - -
-
-
-
-

File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <input type="file">, while maintaining accessibility and using a linked <label> of the .button class to display it in a modern way.

-

Sample code

-
<input type="file" id="file-input">
-<label for="file-input" class="button">Upload file...</label>
-
-
-
-

Notes

-
    -
  • The icon displayed in the example above is not part of the button styling.
  • -
  • File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.
  • -
  • File upload buttons cannot be focused (i.e. have a :focus state) using the keyboard and this applies to linked labels, too. You can use Javascript to add this functionality, if you wish.
  • -

-
-
-
<div class="input-group">
-  <input type="file" id="file-input">
-  <label for="file-input" class="button">Upload file...</label>
-</div>
-

Do: You can use an .input-group to wrap the file upload <input> and its linked <label>, if you wish.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Input Control + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Input Control

+

The input_control module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The input_control module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.


+
+
+

Quick start

+

To use the input_control module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Forms & input

+
+
+
+
+ Inline form (default style) +
 
+
+
+
+
+
+ Fluid form +
+
+
+
+
+
+ Vertical form +
+
+
+
+
+
+ Aligned form (using grid) +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+

Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <form> element and add your <input> elements inside. Link them to <label> elements for ease of access and you are pretty much set. We highly recommend using the <fieldset> and <legend> elements to annotate your forms as well, but you can skip them if you wish.

+

Forms are inline by default. Use the .input-group class on a <div> wrapping inside it an <input> and <label> pair to make sure they always display together in one line. You can make your .input-groups respond to viewport changes, by adding the .fluid class to them or you can align them vertically by adding the .vertical class. Finally, if you want to create aligned forms with a preset layout, you can utilize the grid module's rows and columns.

+

Sample code

+
<form>
+  <fieldset>
+    <legend>Simple form</legend>
+    <div class="input-group fluid">
+      <label for="username">Username</label>
+      <input type="email" value="" id="username" placeholder="username">
+    </div>
+    <div class="input-group fluid">
+      <label for="pwd">Password</label>
+      <input type="password" value="" id="pwd" placeholder="password">
+    </div>
+    <div class="input-group vertical">
+      <label for="nmbr">Number</label>
+      <input type="number" id="nmbr" value="5">
+    </div>
+  </fieldset>
+</form>
+
+
+
+

Notes

+
    +
  • Using the <fieldset> and <legend> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).
  • +
  • Some <input> elements, such as date & time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your website or app.
  • +
  • Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.
  • +
  • Try not to combine the grid module's classes with .fluid or .vertical .input-groups, as this might cause certain styles to overlap and not display exactly like you want them to.
  • +

+
+
+
<form>
+  <fieldset>
+    <legend>Responsive form</legend>
+    <div class="row">
+      <div class="col-sm-12 col-md-4">
+        <label for="username">username</label>
+      </div>
+      <div class="col-sm-12 col-md">
+        <input type="email" value="" id="username" placeholder="username">
+      </div>
+    </div>
+    <div class="row">
+      <div class="col-sm-12 col-md-4">
+        <label for="pwd">password</label>
+      </div>
+      <div class="col-sm-12 col-md-4">
+        <input type="password" value="" id="pwd" placeholder="password">
+      </div>
+    </div>
+  </fieldset>
+</form>
+

Do: You can use .row and .col-SCR_SZ or .col-SCR_SZ-COL_WD (replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens and COL_WD with a number from 1 to 12 specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.

+
+
+
<form>
+  <fieldset>
+    <legend>Responsive form</legend>
+    <div class="row">
+      <div class="col-sm-12 col-md-10 col-md-offset-1">
+        <label for="username">username</label>
+        <input type="email" value="" id="username" placeholder="username">
+      </div>
+    </div>
+    <div class="row">
+      <div class="col-sm-12 col-md-10 col-md-offset-1">
+        <label for="pwd">password</label>
+        <input type="password" value="" id="pwd" placeholder="password">
+      </div>
+    </div>
+  </fieldset>
+</form>
+

Do: Apart from using .row and .col-SCR_SZ or .col-SCR_SZ-COL_WD for responsiveness, you can also use other classes from the grid module such as the offset classes to make your form layouts more interesting.

+
+
+
<style>
+  .label-aligned {
+    align-items: center;
+  }
+</style>
+<form>
+  <fieldset>
+    <legend>Responsive form</legend>
+    <div class="row label-aligned">
+      <div class="col-sm-12 col-md-4">
+        <label for="username">username</label>
+      </div>
+      <div class="col-sm-12 col-md">
+        <input type="email" value="" id="username" placeholder="username">
+      </div>
+    </div>
+  </fieldset>
+</form>
+

Do: When creating aligned forms using the grid module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent .row element, if you want to adjust their vertical alignment.

+
+
+
<form>
+  <fieldset>
+    <legend>Responsive form</legend>
+    <div class="row input-group">
+      <div class="col-sm-12 col-md-4">
+        <label for="username">username</label>
+      </div>
+      <div class="col-sm-12 col-md">
+        <input type="email" value="" id="username" placeholder="username">
+      </div>
+    </div>
+  </fieldset>
+</form>
+

Don't: Avoid using the .input-group class when creating aligned forms. This might cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Checkboxes & radio buttons

+
+
+
+
+
+ +
+

+
+   
+   
+   
+
+

+
+
+
+

Checkboxes and radio buttons come pre-styled, using the checkbox hack, while remaining fully accessible. To create a checkbox or radio button, start using a <div> that implements the .input-group class, and then add an <input> of the proper type inside it ("checkbox" or "radio"), followed immediately by a <label> linking to it. Remember to add tabindex="0" to your <input>, so that it will register properly for screen readers.

+

Sample code

+
<div class="input-group">
+  <input type="checkbox" id="check1" tabindex="0">
+  <label for="check1">Checkbox</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
+  <label for="rad1">Radio</label>
+</div>
+
+
+
+

Notes

+
    +
  • Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.
  • +

+
+
+
<div class="input-group">
+  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
+  <label for="rad1">Value 1</label>
+  <input type="radio" id="rad2" tabindex="0" name="radio-group-1">
+  <label for="rad2">Value 2</label>
+</div>
+

Do: You can add multiple radio buttons inside one .input-group, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.

+
+
+
<input type="checkbox" id="check1" tabindex="0">
+<label for="check1">Checkbox</label>
+

Don't: Always use an .input-group for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.

+
+
+
<div class="input-group">
+  <input type="checkbox" id="check1"
+  <label for="check1">Checkbox</label>
+</div>
+

Don't: Remember to add tabindex="0" to all your checkboxes and radio buttons to make them accessible.

+
+
+
<div class="input-group">
+  <label for="check1">Checkbox</label>
+  <input type="checkbox" id="check1" tabindex="0">
+</div>
+

Don't: The structure of checkboxes and radio buttons is very strict, meaning that the <label> should always be after the <input> and never before, otherwise the checkbox or radio button will not display properly.

+
+
+
<div class="input-group">
+  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
+  <input type="radio" id="rad2" tabindex="0" name="radio-group-1">
+  <label for="rad2">Value 2</label>
+  <label for="rad1">Value 1</label>
+</div>
+

Don't: When using multiple radio buttons inside an .input-group, remember to use the usual structure of the radio button component for each radio button (i.e. the <input> and <label>). Not doing so will cause the radio buttons to not display properly.

+
+
+
<div class="input-group">
+  <input type="checkbox" id="check1" tabindex="0">
+</div>
+

Don't: Never leave a checkbox or radio button without a <label>. The <label> is essential to properly display the checkbox or radio button.

+
+
+
+
+
+
+
+
+
+

Switches

+
+
+
+
+
+ + +
+
+
+
+
+
+

Switches are almost identical in structure to checkboxes and radio buttons (an .input-group containing an <input> of the proper type inside it ("checkbox" or "radio"), followed immediately by a <label> linking to it), their only difference being that you need to add the .switch class to <label> element to turn your input into a switch. Remember to apply tabindex="0" to your <input> to make it accessible.

+

Sample code

+
<div class="input-group">
+  <input type="checkbox" id="switch1" tabindex="0">
+  <label for="switch1" class="switch">Checkbox switch</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
+  <label for="radswitch1" class="switch">Radio switch</label>
+</div>
+
+
+
+

Notes

+
    +
  • You can create your own color variants for the .switch component. For more information, check out the customization page.
  • +

+
+
+
<div class="input-group">
+  <label for="switch1">Switch with text on its left</label>
+  <input type="checkbox" id="switch1" tabindex="0">
+  <label for="switch1" class="switch"></label>
+</div>
+

Do: By using two <label> elements, you can move the actual .switch to the right of the label's text, effectively allowing you to change the layout. Remember to not add any text to your second <label> that implements the .switch class. You might want, however, to add a few trailing spaces to the first <label> element to make sure the text does not get covered by the component.

+
+
+
+
+
+
+
+
+
+

Buttons & button groups

+
+
+ + + + + + + + +

Button group

+
+
+
+

All button types have been stylized by default, while maintaining accessiblity. Simply add any <button> or an <input> with a button type (i.e. "button", "submit" or "reset") and they will be styled accordingly. You can also use the .button class or the role="button" attribute for links, labels and other elements of your choice to make them look like buttons.

+

Color variants are available in the form of the .primary, .secondary, .tertiary and .inverse classes. Size variants are available as well in the form of .small and .large classes.

+

Finally, you can create responsive groups of buttons by wrapping them inside a <div> with the .button-group class.

+

Sample code

+
<button>Default button</button>
+<input type="button" class="primary" value="Primary button">
+<input type="reset" class="secondary" value="Secondary button">
+<input type="submit" class="tertiary" value="Tertiary button">
+<button class="inverse">Inverse button</button>
+<button class="small">Small button</button>
+<button class="large">Large button</button>
+<button disabled>Disabled button</button>
+<a href="#" class="button">Link button</a>
+<a href="#" role="button">Link button</a>
+<label class="button">Label button</label>
+<label role="button">Label button</label>
+
+<div class="button-group">
+  <button>Button</button>
+  <button>Button</button>
+  <button>Button</button>
+</div>
+
+
+
+

Notes

+
    +
  • If you want more color or size variants for your buttons, check out the customization page.
  • +
  • The .button-group component is compatible with modern browsers, but might not display properly in older browsers.
  • +
  • .button-groups will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.
  • +

+
+
+
<button class="inverse small">Small inverse button</button>
+

Do: You can mix and match button color and size variants to achieve the desired effect.

+
+
+
<button class="secondary inverse">Problematic button</button>
+<!-- or -->
+<button class="small large">Problematic button</button>
+

Don't: Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.

+
+
+
<div class="button-group">
+  <button>Button</button>
+  <input type="reset" class="secondary" value="Secondary button">
+  <label class="button inverse">Label button</label>
+</div>
+

Do: You can use button color variants inside the same .button-group. You can also use any component styled like a button inside a .button-group.

+
+
+
<div class="button-group">
+  <button class="large">Button</button>
+  <button>Button</button>
+  <button class="small">Button</button>
+</div>
+

Don't: Avoid using button size variants inside a .button-group, as this might result in unexpected behavior.

+
+
+
+
+
+
+
+
+
+

File upload buttons

+
+
+
+
+ + +
+
+
+
+

File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <input type="file">, while maintaining accessibility and using a linked <label> of the .button class to display it in a modern way.

+

Sample code

+
<input type="file" id="file-input">
+<label for="file-input" class="button">Upload file...</label>
+
+
+
+

Notes

+
    +
  • The icon displayed in the example above is not part of the button styling.
  • +
  • File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.
  • +
  • File upload buttons cannot be focused (i.e. have a :focus state) using the keyboard and this applies to linked labels, too. You can use Javascript to add this functionality, if you wish.
  • +

+
+
+
<div class="input-group">
+  <input type="file" id="file-input">
+  <label for="file-input" class="button">Upload file...</label>
+</div>
+

Do: You can use an .input-group to wrap the file upload <input> and its linked <label>, if you wish.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/modules.html b/docs/v2/modules.html index ae80e15..dbd5c3e 100644 --- a/docs/v2/modules.html +++ b/docs/v2/modules.html @@ -1,210 +1,210 @@ - - - - - - mini.css - Modules - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Modules

-

mini.css uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose mini.css.


-
-
-
-
-
-

 Core

-

The core module contains basic reset and fix rules, based on Normalize.css v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like. More specifically, the core module contains:

See more -
-
-
-
-

 Grid

-

The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens. More specifically, the grid module contains:

See more -
-
-
-
-
-
-

 Input Control

-

The input_control module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way. More specifically, the input_control module contains:

See more -
-
-
-
-

 Navigation

-

The navigation module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus. More specifically, the navigation module contains:

See more -
-
-
-
-
-
-

 Table

-

The table module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view. More specifically, the table module contains:

See more -
-
-
-
-

 Card

-

The card module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly. More specifically, the card module contains:

See more -
-
-
-
-
-
-

 Tab

-

The tab module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want. More specifically, the tab module contains:

See more -
-
-
-
-

 Contextual

-

The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily. More specifically, the contextual module contains:

See more -
-
-
-
-
-
-

 Progress

-

The progress module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading. More specifically, the progress module contains:

See more -
-
-
-
-

 Utility

-

The utility module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere. More specifically, the utility module contains:

See more -
-
-
-
- - - + + + + + + mini.css - Modules + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Modules

+

mini.css uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose mini.css.


+
+
+
+
+
+

 Core

+

The core module contains basic reset and fix rules, based on Normalize.css v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like. More specifically, the core module contains:

See more +
+
+
+
+

 Grid

+

The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens. More specifically, the grid module contains:

See more +
+
+
+
+
+
+

 Input Control

+

The input_control module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way. More specifically, the input_control module contains:

See more +
+
+
+
+

 Navigation

+

The navigation module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus. More specifically, the navigation module contains:

See more +
+
+
+
+
+
+

 Table

+

The table module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view. More specifically, the table module contains:

See more +
+
+
+
+

 Card

+

The card module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly. More specifically, the card module contains:

See more +
+
+
+
+
+
+

 Tab

+

The tab module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want. More specifically, the tab module contains:

See more +
+
+
+
+

 Contextual

+

The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily. More specifically, the contextual module contains:

See more +
+
+
+
+
+
+

 Progress

+

The progress module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading. More specifically, the progress module contains:

See more +
+
+
+
+

 Utility

+

The utility module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere. More specifically, the utility module contains:

See more +
+
+
+
+ + + diff --git a/docs/v2/navigation.html b/docs/v2/navigation.html index f13e0c6..effec64 100644 --- a/docs/v2/navigation.html +++ b/docs/v2/navigation.html @@ -1,368 +1,368 @@ - - - - - - mini.css - Navigation - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
- -
-
-
-
-

Quick overview

-

Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The navigation module takes a step back from the complicated menu and navigation design paradigms of the modern web, using HTML5 elements (i.e. header, nav and footer) for basic navigation, while providing fully accessibility for screen readers. Apart from the simple horizontal navigation (headers) and vertical menus (sidebars), we opted to add a responsive slide-in drawer menu that works well with any page layout. Finally, footers are also part of the navigation module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.


-
-
-

Quick start

-

To use the navigation module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
- - -
-
-
-

Drawer

-
-
-

- -

- -
-
-
-

The drawer component is used to create responsive and collapsible navigation menus. To create the drawer system, follow the steps presented below:

-
    -
  • Inside your <header> element, add a <label> element with the .drawer-toggle class (remember to add the .button class to apply the necessary styles).
  • -
  • Create an <input type="checkbox"> element. Give it an id to be able to link it to the necessary interactive elements.
  • -
  • Immediately after the previous <input type="checkbox">, create a <div> element with the .drawer class. This is where you will put your menu's contents.
  • -
  • Add an empty <label> element inside your .drawer, adding the .close class to it.
  • -
  • Finally, link the .drawer-toggle and .close elements to the id of your <input type="checkbox">.
  • -
-

Drawers are responsive and will expand into normal containers on larger screens. If you want to avoid this, add the .persistent class to both your .drawer-toggle and .drawer elements. You can also change the position of the drawer from the left side of the screen to the right by applying the .right class to your .drawer element.

-

Sample code

-
<header>
-  <label for="drawer-checkbox" class="button drawer-toggle"></label>
-</header>
-
-<input type="checkbox" id="drawer-checkbox">
-<div class="drawer">
-  <label for="drawer-checkbox" class="close"></label>
-  <a href="#">Home</a>
-</div>
-
-
-
-

Notes

-
    -
  • The .drawer component can be easily and effectively combined with the grid module's system and classes, as well as the utility module's responsive visibility helper classes to create fully responsive navigation menus.
  • -
  • It's best to use the .drawer component in combination with a <header> element that has the .sticky class (check the last section of this page).
  • -

-
-
-
<nav class="drawer">
-  <label for="drawer-checkbox" class="close"></label>
-  <a href="#">Home</a>
-</nav>
-

Do: You can apply the .drawer class to a <nav> element, effectively making your page's navigation menu collapse on smaller screen sizes.

-
-
-
<input type="checkbox" id="drawer-checkbox">
-<!-- Other stuff here -->
-<div class="drawer">
-  <h3>Bad drawer</h3>
-</div>
-

Don't: The syntax and structure of the drawer container is very strict. Try to follow it exactly as described in this section.

-
-
-
<div class="row">
-  <input type="checkbox" id="drawer-checkbox">
-  <div class="drawer col-md-4">
-    <label for="drawer-checkbox" class="close"></label>
-    <a href="#">Home</a>
-  </div>
-
-  <div class="col-sm-12 col-md-8">
-    <p>Page content</p>
-  </div>
-</div>
-

Do: You can combine the .drawer component with the grid system, similarly to any other element or component. The .drawer will be displayed as a slide-in menu on smaller screens, but it's part of the layout on medium-sized and larger screens.

-
-
-
<header>
-  <label for="drawer-checkbox" class="button drawer-toggle persistent"></label>
-</header>
-<input type="checkbox" id="drawer-checkbox">
-<div class="drawer">...</div>
-<!-- or -->
-<header>
-  <label for="drawer-checkbox" class="button drawer-toggle"></label>
-</header>
-<input type="checkbox" id="drawer-checkbox">
-<div class="drawer peristent">...</div>
-

Don't: Remember to apply the .persistent class to the .drawer-toggle and .drawer elements to avoid unexpected behavior.

-
-
-
-
-
-
- -
-
-
-

Sticky headers and footers

-
-
-

You can create sticky headers and footers, using the .sticky class on either of these elements.

-

Sample code

-
<header class="sticky">
-  <a href="#" class="logo">Logo</a> <button>Home</button> <button>About</button>
-</header>
-
-<footer class="sticky">
-  <p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
-</footer>
-
-
-
-

Notes

-
    -
  • Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support position:sticky.
  • -
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Navigation + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+ +
+
+
+
+

Quick overview

+

Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The navigation module takes a step back from the complicated menu and navigation design paradigms of the modern web, using HTML5 elements (i.e. header, nav and footer) for basic navigation, while providing fully accessibility for screen readers. Apart from the simple horizontal navigation (headers) and vertical menus (sidebars), we opted to add a responsive slide-in drawer menu that works well with any page layout. Finally, footers are also part of the navigation module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.


+
+
+

Quick start

+

To use the navigation module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+ + +
+
+
+

Drawer

+
+
+

+ +

+ +
+
+
+

The drawer component is used to create responsive and collapsible navigation menus. To create the drawer system, follow the steps presented below:

+
    +
  • Inside your <header> element, add a <label> element with the .drawer-toggle class (remember to add the .button class to apply the necessary styles).
  • +
  • Create an <input type="checkbox"> element. Give it an id to be able to link it to the necessary interactive elements.
  • +
  • Immediately after the previous <input type="checkbox">, create a <div> element with the .drawer class. This is where you will put your menu's contents.
  • +
  • Add an empty <label> element inside your .drawer, adding the .close class to it.
  • +
  • Finally, link the .drawer-toggle and .close elements to the id of your <input type="checkbox">.
  • +
+

Drawers are responsive and will expand into normal containers on larger screens. If you want to avoid this, add the .persistent class to both your .drawer-toggle and .drawer elements. You can also change the position of the drawer from the left side of the screen to the right by applying the .right class to your .drawer element.

+

Sample code

+
<header>
+  <label for="drawer-checkbox" class="button drawer-toggle"></label>
+</header>
+
+<input type="checkbox" id="drawer-checkbox">
+<div class="drawer">
+  <label for="drawer-checkbox" class="close"></label>
+  <a href="#">Home</a>
+</div>
+
+
+
+

Notes

+
    +
  • The .drawer component can be easily and effectively combined with the grid module's system and classes, as well as the utility module's responsive visibility helper classes to create fully responsive navigation menus.
  • +
  • It's best to use the .drawer component in combination with a <header> element that has the .sticky class (check the last section of this page).
  • +

+
+
+
<nav class="drawer">
+  <label for="drawer-checkbox" class="close"></label>
+  <a href="#">Home</a>
+</nav>
+

Do: You can apply the .drawer class to a <nav> element, effectively making your page's navigation menu collapse on smaller screen sizes.

+
+
+
<input type="checkbox" id="drawer-checkbox">
+<!-- Other stuff here -->
+<div class="drawer">
+  <h3>Bad drawer</h3>
+</div>
+

Don't: The syntax and structure of the drawer container is very strict. Try to follow it exactly as described in this section.

+
+
+
<div class="row">
+  <input type="checkbox" id="drawer-checkbox">
+  <div class="drawer col-md-4">
+    <label for="drawer-checkbox" class="close"></label>
+    <a href="#">Home</a>
+  </div>
+
+  <div class="col-sm-12 col-md-8">
+    <p>Page content</p>
+  </div>
+</div>
+

Do: You can combine the .drawer component with the grid system, similarly to any other element or component. The .drawer will be displayed as a slide-in menu on smaller screens, but it's part of the layout on medium-sized and larger screens.

+
+
+
<header>
+  <label for="drawer-checkbox" class="button drawer-toggle persistent"></label>
+</header>
+<input type="checkbox" id="drawer-checkbox">
+<div class="drawer">...</div>
+<!-- or -->
+<header>
+  <label for="drawer-checkbox" class="button drawer-toggle"></label>
+</header>
+<input type="checkbox" id="drawer-checkbox">
+<div class="drawer peristent">...</div>
+

Don't: Remember to apply the .persistent class to the .drawer-toggle and .drawer elements to avoid unexpected behavior.

+
+
+
+
+
+
+ +
+
+
+

Sticky headers and footers

+
+
+

You can create sticky headers and footers, using the .sticky class on either of these elements.

+

Sample code

+
<header class="sticky">
+  <a href="#" class="logo">Logo</a> <button>Home</button> <button>About</button>
+</header>
+
+<footer class="sticky">
+  <p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
+</footer>
+
+
+
+

Notes

+
    +
  • Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support position:sticky.
  • +
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/progress.html b/docs/v2/progress.html index f605150..4f4d7b0 100644 --- a/docs/v2/progress.html +++ b/docs/v2/progress.html @@ -1,251 +1,251 @@ - - - - - - mini.css - Progress - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Progress

-

The progress module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The progress module provides you with two essential tools to communicate this information: the <progress> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the .spinner-donut class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.


-
-
-

Quick start

-

To use the progress module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Basic progress bar

-
-
-

Process is 0% complete!

-

Process is 45% complete!

-

Process is 100% complete!

-
-
-

To create a progress bar, use the <progress> HTML element, specify the preset maximum of max="1000" and set a value between 0 and 1000. Update your <progress> element using some Javascript code, by changing its value to any integer in the same range.

-

Sample code

-
<progress value="0" max="1000"></progress>
-<progress value="450" max="1000"></progress>
-<progress value="1000" max="1000"></progress>
-
-
-
-

Notes

-
    -
  • We made sure that the <progress> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.
  • -
  • If the preset max="1000" does not suit your needs, you should check the customization page for instructions on how to set your own maximum value for the <progress> element.
  • -

-
-
-
<progress value="80" max="100"></progress>
-

Don't: Avoid using different values for the <progress> element's max, except for the preset one (1000).

-
-
-
<progress value="450.5" max="1000.0"></progress>
-

Don't: Try not to use floating point values for either the <progress> element's value or max. During testing of the module, we found that floating point values could cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Progress bar variants

-
-
-

Secondary process is 60% complete!

-

Tertiary process is 30% complete!

-

Inline progress bar:

-
-
-

Apart from the default style for the <progress> element, we have also included a couple of variants for it. As with many other elements, you can change the color of your progress bars, based on the context, using the .secondary or .tertiary class. You can also make a <progress> element display inline, using the .inline class.

-

Sample code

-
<progress class="secondary" value="600" max="1000"></progress>
-<progress class="tertiary" value="300" max="1000"></progress>
-<progress class="inline" value="150" max="1000"></progress>
-
-
-
-

Notes

-
    -
  • If you want to add your own custom size classes for <progress> elements, check the customization page for instructions.
  • -

-
-
-
<progress class="inline secondary" value="800" max="1000"></progress>
-<!-- or -->
-<progress class="inline tertiary" value="650" max="1000"></progress>
-

Do: You can mix size and color classes for <progress> elements as needed.

-
-
-
<progress class="secondary teriary" value="450" max="1000"></progress>
-

Don't: Avoid mixing two classes of the same type (i.e. two color classes or two size classes).

-
-
-
-
-
-
-
-
-
-

Donut spinner

-
-
-

-

-
-
-
-

Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the .spinner-donut class to an element of your liking. We would recommend using a <div> element for most cases, but <span> elements should work pretty well, too.

-

Sample code

-
<div class="spinner-donut"></div>
-
-
-
-

Notes

-
    -
  • The .spinner-donut is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.
  • -
  • In certain cases, it might be useful to add the role="progressbar" attribute to increase donut spinner accessibility.
  • -

-
-
-
<p>Loading... <span class="spinner-donut"></span></p>
-

Do: You can place a .spinner-donut inside a paragraph or some other textual context and it will display inline.

-
-
-
<div class="spinner-donut">Loading...</div>
-

Don't: Avoid inserting text inside the .spinner-donut, as this might cause unexpected bahavior and will probably make the text spin along with it.

-
-
-
-
-
-
-
-
-
-

Donut spinner variants

-
-
-

-



-
-
-
-

Apart from the default donut spinner style, there are also two more contextual color classes: .secondary and .tertiary. If your donut spinners are too small, you can also use the .large class to make it pop out a little bit more.

-

Sample code

-
<div class="spinner-donut secondary"></div>
-<div class="spinner-donut tertiary"></div>
-<div class="spinner-donut large"></div>
-
-
-
-

Notes

-
    -
  • You can mix one of the contextual color classes and the .large class, if you want, similarly to what you can do with progress bars.
  • -
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Progress + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Progress

+

The progress module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The progress module provides you with two essential tools to communicate this information: the <progress> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the .spinner-donut class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.


+
+
+

Quick start

+

To use the progress module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Basic progress bar

+
+
+

Process is 0% complete!

+

Process is 45% complete!

+

Process is 100% complete!

+
+
+

To create a progress bar, use the <progress> HTML element, specify the preset maximum of max="1000" and set a value between 0 and 1000. Update your <progress> element using some Javascript code, by changing its value to any integer in the same range.

+

Sample code

+
<progress value="0" max="1000"></progress>
+<progress value="450" max="1000"></progress>
+<progress value="1000" max="1000"></progress>
+
+
+
+

Notes

+
    +
  • We made sure that the <progress> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.
  • +
  • If the preset max="1000" does not suit your needs, you should check the customization page for instructions on how to set your own maximum value for the <progress> element.
  • +

+
+
+
<progress value="80" max="100"></progress>
+

Don't: Avoid using different values for the <progress> element's max, except for the preset one (1000).

+
+
+
<progress value="450.5" max="1000.0"></progress>
+

Don't: Try not to use floating point values for either the <progress> element's value or max. During testing of the module, we found that floating point values could cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Progress bar variants

+
+
+

Secondary process is 60% complete!

+

Tertiary process is 30% complete!

+

Inline progress bar:

+
+
+

Apart from the default style for the <progress> element, we have also included a couple of variants for it. As with many other elements, you can change the color of your progress bars, based on the context, using the .secondary or .tertiary class. You can also make a <progress> element display inline, using the .inline class.

+

Sample code

+
<progress class="secondary" value="600" max="1000"></progress>
+<progress class="tertiary" value="300" max="1000"></progress>
+<progress class="inline" value="150" max="1000"></progress>
+
+
+
+

Notes

+
    +
  • If you want to add your own custom size classes for <progress> elements, check the customization page for instructions.
  • +

+
+
+
<progress class="inline secondary" value="800" max="1000"></progress>
+<!-- or -->
+<progress class="inline tertiary" value="650" max="1000"></progress>
+

Do: You can mix size and color classes for <progress> elements as needed.

+
+
+
<progress class="secondary teriary" value="450" max="1000"></progress>
+

Don't: Avoid mixing two classes of the same type (i.e. two color classes or two size classes).

+
+
+
+
+
+
+
+
+
+

Donut spinner

+
+
+

+

+
+
+
+

Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the .spinner-donut class to an element of your liking. We would recommend using a <div> element for most cases, but <span> elements should work pretty well, too.

+

Sample code

+
<div class="spinner-donut"></div>
+
+
+
+

Notes

+
    +
  • The .spinner-donut is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.
  • +
  • In certain cases, it might be useful to add the role="progressbar" attribute to increase donut spinner accessibility.
  • +

+
+
+
<p>Loading... <span class="spinner-donut"></span></p>
+

Do: You can place a .spinner-donut inside a paragraph or some other textual context and it will display inline.

+
+
+
<div class="spinner-donut">Loading...</div>
+

Don't: Avoid inserting text inside the .spinner-donut, as this might cause unexpected bahavior and will probably make the text spin along with it.

+
+
+
+
+
+
+
+
+
+

Donut spinner variants

+
+
+

+



+
+
+
+

Apart from the default donut spinner style, there are also two more contextual color classes: .secondary and .tertiary. If your donut spinners are too small, you can also use the .large class to make it pop out a little bit more.

+

Sample code

+
<div class="spinner-donut secondary"></div>
+<div class="spinner-donut tertiary"></div>
+<div class="spinner-donut large"></div>
+
+
+
+

Notes

+
    +
  • You can mix one of the contextual color classes and the .large class, if you want, similarly to what you can do with progress bars.
  • +
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/quick_reference.html b/docs/v2/quick_reference.html index 7b299b3..b5ba95d 100644 --- a/docs/v2/quick_reference.html +++ b/docs/v2/quick_reference.html @@ -1,2639 +1,2639 @@ - - - - - - mini.css - Quick Reference - - - - - - - - - - - -
- - - - - -  Github -
-
-
- -
-
-
-

Quick Reference

-

If you are familiar with mini.css and want a cheat sheet, you've come to the right place. Below you will find a quick overview of the framework and examples to help you brush up on your website-building skills. For more detailed instructions on modules, check out the modules page.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-

Setup & usage

-
-

You can download mini.css using npm, yarn or Bower:

-
-
npm install mini.css
-
yarn add mini.css
-
bower install mini.css
-

-

You can import the default flavor of mini.css in your webpage by simply adding one of the following references inside your HTML page's <head> tag:

-
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
-
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.4/dist/mini-default.min.css">

-

You can also find mini.css on cdnjs, which you can use to include it in your projects.


-

We strongly suggest you add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">
-
-
-
-
-
-
-
-

 Core

-
-
-

Headings  View on Codepen

-
<h1>Heading 1<small>Subheading</small></h1>
-<h2>Heading 2<small>Subheading</small></h2>
-<h3>Heading 3<small>Subheading</small></h3>
-<h4>Heading 4<small>Subheading</small></h4>
-<h5>Heading 5<small>Subheading</small></h5>
-<h6>Heading 6<small>Subheading</small></h6>
-
-
-

Typography

-
    -
  • Basic reset and fix rules applied, based on Normalize.css v5.0.0
  • -
  • A native font stack is used
  • -
  • The colors are set to background: #f5f5f5; and color: #212121;
  • -
  • The font-size for the root element is 16px
  • -
  • The line-height is 1.5
  • -
  • All HTML headings are pre-styled
  • -
  • Styling provided for <small> elements inside headings
  • -
  • Common HTML elements like paragraphs, horizontal rules, lists and code elements are pre-styled
  • -
  • Images are responsive by default
  • -
-
-
-
-
-

Common textual elements  View on Codepen

-
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
-<a href="#">This is a link.</a>
-<small>This is some small text.</small>
-<sub>Subscript</sub>
-<sup>Superscript</sup>
-<code>Inline code</code>
-<kbd>Keyboard Input</kbd>
-<hr>
-<pre>This is some preformatted text.</pre>
-<blockquote cite="Quotation source">
-  This is some quoted text from another website or person.
-</blockquote>
-
-
-

Lists & images View on Codepen

-
<ul>
-  <li>Apple</li>
-  <li>Orange</li>
-  <li>Strawberry</li>
-</ul>
-
-<ol>
-  <li>Wake up</li>
-  <li>Eat breakfast</li>
-  <li>Go to work</li>
-</ol>
-
-<figure>
-  <img src="...">
-  <figcaption>Image caption</figcaption>
-</figure>
-
-
-
-
-
-
-
-
-

 Grid

-
-
-

Basic layout  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm-1">
-    </div>
-    <div class="col-sm-11">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-2">
-    </div>
-    <div class="col-sm-10">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-3">
-    </div>
-    <div class="col-sm-9">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-4">
-    </div>
-    <div class="col-sm-8">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-5">
-    </div>
-    <div class="col-sm-7">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-6">
-    </div>
-    <div class="col-sm-6">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12">
-    </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-    <div class="col-sm">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Based on the Flexbox Layout Module
  • -
  • Grid structured as follows: -
      -
    1. .container serves as the grid system's wrapper
    2. -
    3. Multiple .row elements serve as the grid system's rows
    4. -
    5. Multiple .col-SCR_SZ and/or .col-SCR_SZ-COL_WD elements specify serve as the grid system's columns (fluid and preset respectively)
    6. -
    -
  • -
  • SCR_SZ values: -
      -
    • sm for screens below 768px wide
    • -
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • -
    • lg for screens wider than 1280px
    • -
    -
  • -
  • COL_WD can be any integer value between 1 and 12 (both inclusive)
  • -
  • Fluid columns can create irregularly-sized columns in a layout
  • -
  • You can nest rows inside columns, but not columns inside columns or rows inside rows
  • -
  • An element can be a row and column at the same time
  • -
  • You can mix preset and fluid columns
  • -
  • Always wrap content in columns, never leave content unwrapped inside a row
  • -
  • Do not mix rows or columns with unwrapped content on the same level
  • -
-
-
-
-
-

Screen-specific layouts  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12 col-md-3 col-lg-2">
-    </div>
-    <div class="col-sm-12 col-md-5 col-lg-7">
-    </div>
-    <div class="col-sm-12 col-md-4 col-lg-3">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Apply multiple column classes to the same element, one for each screen size, to define different layouts
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • Try to make page content vertical for smaller devices, using .col-sm-12 and transition to two or three columns on larger screen sizes
  • -
  • Combine with offsets and reordering as shown below
  • -
  • You can omit the style of a screen size if it is the same one as the one applied in the immediately smaller screen size
  • -
  • Always start with a .col-sm or .col-sm-COL_WD style, otherwise smaller devices will not display your content properly
  • -
-
-
-
-
-

Predefined layouts  View on Codepen

-
<div class="row cols-sm-6">
-  <div>
-    <p>col-sm-6</p>
-  </div>
-  <div>
-    <p>col-sm-6</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Available both as fluid column layouts, using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names and fixed width column layouts, using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns
  • -
  • Can define screen-specific predefined layouts
  • -
  • Can be combined with offsets and reordering, but not normal grid layout classes
  • -
-
-
-
-
-

Column offsets  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm-10 col-sm-offset-1">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm col-sm-offset-2">
-    </div>
-  </div>
-<div class="row">
-    <div class="col-sm-6 col-sm-offset-3">
-    </div>
-</div>
-  <div class="row">
-    <div class="col-sm-8 col-sm-offset-4">
-    </div>
-  <div class="row">
-    <div class="col-sm-5 col-sm-offset-1">
-    </div>
-    <div class="col-sm-5 col-sm-offset-1">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create offsets using the .col-SCR_SZ-offset-COL_WD classes
  • -
  • COL_WD can be any integer from 0 to 11 (both inclusive)
  • -
  • You can mix offset columns and non-offset columns
  • -
  • Specify offsets in combination with existing column styling, not instead
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • You can omit offsets whenever not needed, but you will have to override existing offsets for larger screen sizes, using .col-SCR_SZ-offset-0
  • -
-
-
-
-
-

Column reordering  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm col-md-last col-lg-normal">
-    </div>
-    <div class="col-sm-first col-md-normal">
-    </div>
-    <div class="col-sm col-md-first col-lg-normal">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create reorders using .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes for first, last and normal ordering respectively
  • -
  • Default ordering is based on order of appearance
  • -
  • Specify reorders in combination with existing column styling, not instead
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • You can use multiple .col-SCR_SZ-first and .col-SCR_SZ-last elements to group your elements according to the desired layout
  • -
  • You can omit reorders whenever not needed, but you will have to override existing reorders for larger screen sizes, using .col-SCR_SZ-normal
  • -
-
-
-
-
-

Media object pattern View on Codepen

-
<div class="row">
-  <div class="col-sm-1">
-    <img src="...">
-  </div>
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Not a new component, rather a popular pattern
  • -
  • Use two columns, one for the media (i.e. <img>) and one for the textual content
  • -
  • Compatible with most elements
  • -
  • Can use screen-specific layouts, reordering and offsets
  • -
  • Media objects can easily be nested inside each other
  • -
-
-
-
-
-
-
-
-
-
-

 Input Control

-
-
-
-

Forms & input  View on Codepen

-
<form>
-  <fieldset>
-    <legend>Simple form</legend>
-    <div class="input-group fluid">
-      <label for="username">Username</label>
-      <input type="email" value="" id="username" placeholder="username">
-    </div>
-    <div class="input-group fluid">
-      <label for="pwd">Password</label>
-      <input type="password" value="" id="pwd" placeholder="password">
-    </div>
-    <div class="input-group vertical">
-      <label for="nmbr">Number</label>
-      <input type="number" id="nmbr" value="5">
-    </div>
-  </fieldset>
-</form>
-
-
-

Notes

-
    -
  • Link <label> elements to their respective <input> elements for ease-of-use
  • -
  • Use of the <fieldset> and <legend> elements is highly recommended
  • -
  • Forms are inline by default, use .input-group to align elements inside them
  • -
  • Non-standard input types are not stylized like the rest
  • -
  • Checkboxes and radio buttons are stylized differently, as shown below
  • -
  • You can use the grid module's column classes to align form elements or make them responsive
  • -
  • Avoid using .input-group in aligned forms
  • -
  • Make .input-groups responsive by adding the .fluid class
  • -
  • Vertically align .input-groups using the .vertical class
  • -
-
-
-
-
-

Checkboxes & radio buttons  View on Codepen

-
<div class="input-group">
-  <input type="checkbox" id="check1" tabindex="0">
-  <label for="check1">Checkbox</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
-  <label for="rad1">Radio</label>
-</div>
-
-
-

Notes

-
    -
  • Pre-styled using the checkbox hack, fully accessible
  • -
  • Create a <div class="input-group"> containing the checkbox or radio button along with its linked label
  • -
  • Add tabindex="0" to the <input> element to make full accessible
  • -
  • Add multiple radio buttons in the same group inside the same .input-group wrapper
  • -
  • Always use .input-group and follow the code structure provided in the examples
  • -
  • Remember to use <label> elements for every single one of your checkbox or radio buttons
  • -
-
-
-
-
-

Switches  View on Codepen

-
<div class="input-group">
-  <input type="checkbox" id="switch1" tabindex="0">
-  <label for="switch1" class="switch">Checkbox switch</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
-  <label for="radswitch1" class="switch">Radio switch</label>
-</div>
-
-
-

Notes

-
    -
  • Use the same structure as checkboxes and radios, add .switch to the <label> element
  • -
  • Add tabindex="0" to the <input> element for accessibility
  • -
  • You can add two <label> elements inside the .input-group, the first one containing the text and the second one the .switch component to reverse the switch's layout
  • -
-
-
-
-
-

Buttons & button groups  View on Codepen

-
<button>Default button</button>
-<input type="button" class="primary" value="Primary button">
-<input type="reset" class="secondary" value="Secondary button">
-<input type="submit" class="tertiary" value="Tertiary button">
-<button class="inverse">Inverse button</button>
-<button class="small">Small button</button>
-<button class="large">Large button</button>
-<button disabled>Disabled button</button>
-<a href="#" class="button">Link button</a>
-<a href="#" role="button">Link button</a>
-<label class="button">Label button</label>
-<label role="button">Label button</label>
-
-<div class="button-group">
-  <button>Button</button>
-  <button>Button</button>
-  <button>Button</button>
-</div>
-
-
-

Notes

-
    -
  • All button types have been stylized
  • -
  • Button styles are available for other elements, using the .button class or the role="button" attribute
  • -
  • .primary, .secondary, .tertiary and .inverse color variants
  • -
  • .small and .large size variants
  • -
  • Create responsive button groups by wrapping multiple button elements inside a .button-group wrapper
  • -
  • Button groups are responsive, but might be displayed incorrectly in older browsers
  • -
  • Mix size and color variants, don't mix two variants of the same type
  • -
  • Avoid using different size variants inside a .button-group
  • -
-
-
-
-
-

File upload buttons  View on Codepen

-
<input type="file" id="file-input">
-<label for="file-input" class="button">Upload file...</label>
-
-
-

Notes

-
    -
  • Link an <input type="file"> element to a <label>
  • -
  • The file button will not change text when uploading a file, Javascript may be required
  • -
  • Compatible with .input-group
  • -
-
-
-
-
-
- -
-
-
-

 Table

-
-
-

Basic syntax & responsiveness  View on Codepen

-
<table>
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Table structure is as follows: -
      -
    1. <table> element is the table's root element
    2. -
    3. <caption> (optional) serves as the table's title and must be the first element inside the table
    4. -
    5. <thead> serves as the table's header row, populated with <th>
    6. -
    7. <tfoot> (optional) serves as the table's footer and must be immediately after <thead>
    8. -
    9. <tbody> is the table's body, populated with <td> elements
    10. -
    -
  • -
  • Tables are responsive and collapse into cards on mobile devices
  • -
  • Always specify a data-label for each <td> element corresponding to the column's header to properly display table on mobile devices
  • -
  • Avoid having multiline <thead> elements, however if you need to, you can use this fix
  • -
  • For horizontal tables or matrices, check the examples below
  • -
-
-
-
-
-

Scrollable tables  View on Codepen

-
<table class="scrollable">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .scrollable class to make a <table> scrollable
  • -
  • Does not support the <tfoot> element
  • -
  • Scrollable tables might not be fully compatible with older browsers
  • -
-
-
-
-
-

Horizontal tables  View on Codepen

-
<table class="horizontal">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .horizontal class to make a <table> horizontal
  • -
  • Does not support the <tfoot> element
  • -
  • Horizontal tables might not be fully compatible with older browsers
  • -
-
-
-
-
-

Table variants & matrices  View on Codepen

-
<table class="preset">
-  <caption>Star Wars Character Alignment Table</caption>
-  <tbody>
-    <tr>
-      <th></th>
-      <th>Lawful</td>
-      <th>Neutral</td>
-      <th>Chaotic</td>
-    </tr>
-    <tr>
-      <th>Good</th>
-      <td>Yoda</td>
-      <td>Luke Skywalker</td>
-      <td>Chewbacca</td>
-    </tr>
-    <tr>
-      <th>Neutral</th>
-      <td>C-3PO</td>
-      <td>Boba Fett</td>
-      <td>Han Solo</td>
-    </tr>
-    <tr>
-      <th>Bad</th>
-      <td>Darth Vader</td>
-      <td>Emperor Palpatine</td>
-      <td>Jabba the Hutt</td>
-    </tr>
-  </tbody>
-</table>
-
-<table class="striped">
-  <caption>People</caption>
-  <thead>
-    <!-- ... -->
-  </thead>
-  <tbody>
-    <!-- ... -->
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .striped class to make a <table> striped
  • -
  • Use the .preset class to make a <table> to create matrices or otherwise preset tables
  • -
  • Preset matrix tables might require some CSS tweaks to deal with border styling errors
  • -
  • You can combine .striped, .preset and .horizontal, respecting the rules of the combined structures
  • -
-
-
-
-
-
-
-
-
-

 Card

-
-
-

Basic syntax  View on Codepen

-
<div class="row">
-  <div class="card">
-    <div class="section">
-      <h3>Card Title</h3>
-      <p>Card content...</p>
-    </div>
-  </div>
-  <div class="card">
-    <div class="section">
-      <h3>Card Title</h3>
-      <p>Card content...</p>
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Requires familiarity with the grid module
  • -
  • Card structure as follows: -
      -
    1. .row element is the outermost wrapper of the cards layout
    2. -
    3. <div class="card"> elements are the cards
    4. -
    5. .section elements inside the .card serve as the card's sections
    6. -
    -
  • -
  • Cards are responsive, might be incompatible with older browsers
  • -
  • A card can have as many sections as needed, sections can be almost any element
  • -
  • Wrap all card content in .section classes
  • -
  • Add multiple .card elements in the same .row
  • -
  • Cards cannot be rows or columns at the same time, sections can be rows
  • -
-
-
-
-
-

Sections & media  View on Codepen

-
<div class="card">
-  <img src="..." class="section media">
-  <div class="section double-padded"><p>Content</p></div>
-  <div class="section dark"><p>Content</p></div>
-  <div class="section darker"><p>Content</p></div>
-</div>
-
-
-

Notes

-
    -
  • Create media sections for images or video, using the .media class
  • -
  • Color variants for sections are available using the .dark and .darker classes
  • -
  • Extra padding section variant available using the .double-padded class
  • -
  • .media sections might not be fully supported in older browsers
  • -
  • .media sections have a preset height of 200px
  • -
-
-
-
-
-

Card sizing & fluidity  View on Codepen

-
<div class="card small">
-  <div class="section">
-    <p>Content</p>
-  </div>
-</div>
-
-<div class="card large">
-  <div class="section">
-    <p>Content</p>
-  </div>
-</div>
-
-<div class="col-sm-12">
-  <div class="card fluid">
-    <div class="section">
-      <p>Content</p>
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Card size variants available using the .large and .small classes
  • -
  • Fluid cards available using the .fluid class, require the use of grid columns
  • -
  • Fluid cards might not display properly in older browsers and will sometimes slightly disrespect margins on certain layouts
  • -
  • Always wrap .fluid cards in columns, don't mix with non-fluid cards
  • -
-
-
-
-
-

Card color variants  View on Codepen

-
<div class="card warning">
-  <div class="section">
-    <p>Warning</p>
-  </div>
-</div>
-
-<div class="card error">
-  <div class="section">
-    <p>Error</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create yellow warning cards, using the .warning class
  • -
  • Create red error cards, using .error class
  • -
  • Avoid combining two or more card color variants
  • -
-
-
-
-
-
-
-
-
-

 Tab

-
-
-

Basic syntax  View on Codepen

-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <div>
-    <h3>Tab 1</h3>
-    <p>This is the first tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
-  <label for="tab2" aria-hidden="true">Tab 2</label>
-  <div>
-    <h3>Tab 2</h3>
-    <p>This is the second tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
-  <label for="tab3" aria-hidden="true">Tab 3</label>
-  <div>
-    <h3>Tab 3</h3>
-    <p>This is the third tab's content.</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Tabs structure as follows: -
      -
    1. .tabs element is the outermost wrapper of the tabbed layout
    2. -
    3. Multiple <input type="radio"> elements followed by their linked <label> elements are the titles of tabs
    4. -
    5. Multiple <div> elements, each one after the <label> of the tab it corresponds to, as the content of each tab
    6. -
    -
  • -
  • Tabs are responsive, might be incompatible with some older browsers
  • -
  • Make a radio button checked to select the tab open by default
  • -
  • Use aria-hidden="true" to input elements to add accessibility
  • -
  • Use the syntax exactly as presented in the examples, do not substitute with checkboxes
  • -
-
-
-
-
-

Stacked tabs  View on Codepen

-
<div class="tabs stacked">
-  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
-  <label for="a1" aria-hidden="true">Accordion section 1</label>
-  <div>
-    <h3>Section 1</h3>
-    <p>This is the first accordion section's content.</p>
-  </div>
-  <input type="radio" name="accordion" id="a2"aria-hidden="true">
-  <label for="a2" aria-hidden="true">Accordion section 2</label>
-  <div>
-    <h3>Section 2</h3>
-    <p>This is the second accordion section's content.</p>
-  </div>
-</div>
-
-<div class="tabs stacked">
-  <input type="checkbox" id="c1" aria-hidden="true">
-  <label for="c1" aria-hidden="true">Collapse section 1</label>
-  <div>
-    <p>This is the first collapse section's content.</p>
-  </div>
-  <input type="checkbox" id="c2" aria-hidden="true">
-  <label for="c2" aria-hidden="true">Collapse section 2</label>
-  <div>
-    <p>This is the second collapse section's content.</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Use the .stacked class to create stacked tabs
  • -
  • Use aria-hidden="true" to input elements in order to add accessibility
  • -
  • Use either checkboxes or radio buttons as the <input> elements of stacked tabs
  • -
  • Use single checkbox in a .stacked tabs container, but not a single radio button
  • -
-
-
-
-
-
-
-
-
-

 Contextual

-
-
-

Text highlighting  View on Codepen

-
<mark>primary</mark>
-<mark class="secondary">secondary</mark>
-<mark class="tertiary">tertiary</mark>
-<mark class="inline-block">long highlight text...</mark>
-<mark class="tag">tag</mark>
-
-
-

Notes

-
    -
  • Use the <mark> element for highlighting text
  • -
  • .secondary and .tertiary classes offer color variants
  • -
  • Highlighted text is inline by default, use the .inline-block class for longer text highlights
  • -
  • Use the .tag class for highlighted tags
  • -
  • Combine color variants with the .inline-block or .tag class, do not combine color variants or .tag and .inline-block with each other
  • -
  • Do not nest <mark> elements, unless the outer element is an .inline-block
  • -
-
-
-
-
-

Toasts  View on Codepen

-
<span class="toast">This is a normal toast message!</span>
-<span class="toast small">This is a large toast message!</span>
-<span class="toast large">This is a small toast message!</span>
-
-
-

Notes

-
    -
  • Use the .toast class on <span> elements to create toast messages
  • -
  • Size variants available using the .small and .large classes
  • -
  • Toasts have no pre-defined behavior, use Javascript
  • -
  • Toasts display at the bottom of the screen on top of everything else
  • -
-
-
-
-
-

Tooltips  View on Codepen

-
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
-<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
-
-
-

Notes

-
    -
  • Create using the .tooltip class
  • -
  • Put tooltip text in the aria-label attribute's value
  • -
  • Use the .bottom class to make a tooltip display at the bottom of its context
  • -
-
-
-
-
-

Modals  View on Codepen

-
<label for="modal-toggle">Show modal</label>
-
-<input id="modal-toggle" type="checkbox"/>
-<div class="modal">
-  <div class="card">
-    <label for="modal-toggle" class="close"></label>
-    <h3 class="section">Modal</h3>
-    <p class="section">This is a modal window!</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class
  • -
  • Use a .card inside the .modal to display contents
  • -
  • Remember to use a <label> or some Javascript to allow users to close the dialog
  • -
  • Modal dialogs can be placed and toggled from anywhere, although the structure must be kept intact
  • -
  • Use role="dialog" to add accessibility to modal dialogs
  • -
-
-
-
-
-
-
-
-
-

 Progress

-
-
-

Basic progress bar  View on Codepen

-
<progress value="0" max="1000"></progress>
-<progress value="450" max="1000"></progress>
-<progress value="1000" max="1000"></progress>
-
-
-

Notes

-
    -
  • Use the <progress> element to create progress bars
  • -
  • Set max="1000" and a value between 0 and 1000
  • -
  • Do not use floating point values for the progress bar
  • -
-
-
-
-
-

Progress bar variants  View on Codepen

-
<progress class="secondary" value="600" max="1000"></progress>
-<progress class="tertiary" value="300" max="1000"></progress>
-<progress class="inline" value="150" max="1000"></progress>
-
-
-

Notes

-
    -
  • Color variants available using the .secondary and .tertiary classes
  • -
  • Inline variant available using the .inline class
  • -
  • Mix color and size variants, but not multiple of the same type
  • -
-
-
-
-
-

Donut spinner  View on Codepen

-
<div class="spinner-donut"></div>
-
-
-

Notes

-
    -
  • Use the .spinner-donut class to create donut spinners
  • -
  • Apply class to a <div> or <span> element
  • -
  • Do not insert text inside the .spinner-donut element
  • -
  • Donut spinners can be displayed inline
  • -
  • Use the role="progressbar" attribute to make donut spinner accessible
  • -
-
-
-
-
-

Donut spinner variants  View on Codepen

-
<div class="spinner-donut secondary"></div>
-<div class="spinner-donut tertiary"></div>
-<div class="spinner-donut large"></div>
-
-
-

Notes

-
    -
  • Color variants available using the .secondary and .tertiary classes
  • -
  • Alternate size available using the .large class
  • -
  • You can mix color variants with the .large class, but not with each other
  • -
-
-
-
-
-
-
-
-
-

 Utility

-
-
-

Visibility helpers  View on Codepen

-
<span class="hidden">Hidden text</span>
-<span class="visually-hidden">Screen-reader-only text</span>
-
-
-

Notes

-
    -
  • Use .hidden to hide elements
  • -
  • Use .visually-hidden to show elements only in screen readers
  • -
  • Both classes use !important declarations
  • -
  • Do not use both classes together
  • -
-
-
-
-
-

Generic borders & shadows  View on Codepen

-
<span class="bordered">Bordered</span>
-<span class="rounded">Rounded</span>
-<span class="circular">Circular</span>
-<span class="shadowed">Casts shadow</span>
-
-
-

Notes

-
    -
  • Create generic borders using .bordered
  • -
  • Rounded and circular border radii available using .rounded and .circular classes
  • -
  • Generic shadows available using the .shadowed class
  • -
  • Combine generic borders, border radii and generic shadows with each other but not with themselves
  • -
  • All classes use !important declarations
  • -
  • Generic borders work well with buttons
  • -
-
-
-
-
-

Responsive sizing & spacing classes  View on Codepen

-
<div class="responsive-padding">Responsive padding</div>
-<div class="responsive-margin">Responsive margin</div>
-
-
-

Notes

-
    -
  • Use the .responsive-padding and .responsive-margin classes to apply responsive padding or margin respectively to any element
  • -
  • The two classes can be combined
  • -
  • Both classes use !important declarations
  • -
-
-
-
-
-

Responsive visibility helpers  View on Codepen

-
<span class="hidden-sm">Hidden in smaller screens</span>
-<span class="hidden-md">Hidden in medium-sized screens</span>
-<span class="hidden-lg">Hidden in larger screens</span>
-
-<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
-<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
-<span class="visually-hidden-lg">Visually hidden in larger screens</span>
-
-
-

Notes

-
    -
  • Use the .hidden-SCR_SZ or .visually-hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names
  • -
  • SCR_SZ values: -
      -
    • sm for screens below 768px wide
    • -
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • -
    • lg for screens wider than 1280px
    • -
    -
  • -
  • Responsive visibility helper classes can be combined for different screen sizes, avoid using both for the same size
  • -
  • Responsive visibility helper classes use !important declarations
  • -
-
-
-
-
-

Breadcrumbs  View on Codepen

-
<ul class="breadcrumbs">
-  <li><a href="#">Root</a></li>
-  <li><a href="#">Folder</a></li>
-  <li>File</li>
-</ul>
-
-
-

Notes

-
    -
  • To create breadcrumbs, create a <ul> element implementing the .breadcrumbs class
  • -
  • Do not use <ol> for breadcrumbs
  • -
  • Do not nest lists inside the .breadcrumbs
  • -
  • Use the role="navigation" attribute to make breadcrumbs accessible
  • -
-
-
-
-
-

Close icon  View on Codepen

-
<span class="close"></span>
-
-
-

Notes

-
    -
  • Use the .close class to create a close icon
  • -
  • Use a <span> or <div> element to create a close icon
  • -
  • Use a button element implementing the .close class to stylize the close icon as a button
  • -
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - mini.css - Quick Reference - - - - - - - - - - - -
- - - - - -  Github -
-
-
- -
-
-
-

Quick Reference

-

If you are familiar with mini.css and want a cheat sheet, you've come to the right place. Below you will find a quick overview of the framework and examples to help you brush up on your website-building skills. For more detailed instructions on modules, check out the modules page.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-

Setup & usage

-
-

You can download mini.css using npm, yarn or Bower:

-
-
npm install mini.css
-
yarn add mini.css
-
bower install mini.css
-

-

You can import the default flavor of mini.css in your webpage by simply adding one of the following references inside your HTML page's <head> tag:

-
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
-
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.4/dist/mini-default.min.css">

-

You can also find mini.css on cdnjs, which you can use to include it in your projects.


-

We strongly suggest you add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">
-
-
-
-
-
-
-
-

 Core

-
-
-

Headings  View on Codepen

-
<h1>Heading 1<small>Subheading</small></h1>
-<h2>Heading 2<small>Subheading</small></h2>
-<h3>Heading 3<small>Subheading</small></h3>
-<h4>Heading 4<small>Subheading</small></h4>
-<h5>Heading 5<small>Subheading</small></h5>
-<h6>Heading 6<small>Subheading</small></h6>
-
-
-

Typography

-
    -
  • Basic reset and fix rules applied, based on Normalize.css v5.0.0
  • -
  • A native font stack is used
  • -
  • The colors are set to background: #f5f5f5; and color: #212121;
  • -
  • The font-size for the root element is 16px
  • -
  • The line-height is 1.5
  • -
  • All HTML headings are pre-styled
  • -
  • Styling provided for <small> elements inside headings
  • -
  • Common HTML elements like paragraphs, horizontal rules, lists and code elements are pre-styled
  • -
  • Images are responsive by default
  • -
-
-
-
-
-

Common textual elements  View on Codepen

-
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
-<a href="#">This is a link.</a>
-<small>This is some small text.</small>
-<sub>Subscript</sub>
-<sup>Superscript</sup>
-<code>Inline code</code>
-<kbd>Keyboard Input</kbd>
-<hr>
-<pre>This is some preformatted text.</pre>
-<blockquote cite="Quotation source">
-  This is some quoted text from another website or person.
-</blockquote>
-
-
-

Lists & images View on Codepen

-
<ul>
-  <li>Apple</li>
-  <li>Orange</li>
-  <li>Strawberry</li>
-</ul>
-<ol>
-  <li>Wake up</li>
-  <li>Eat breakfast</li>
-  <li>Go to work</li>
-</ol>
-
-<figure>
-  <img src="...">
-  <figcaption>Image caption</figcaption>
-</figure>
-
-
-
-
-
-
-
-
-

 Grid

-
-
-

Basic layout  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm-1">
-    </div>
-    <div class="col-sm-11">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-2">
-    </div>
-    <div class="col-sm-10">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-3">
-    </div>
-    <div class="col-sm-9">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-4">
-    </div>
-    <div class="col-sm-8">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-5">
-    </div>
-    <div class="col-sm-7">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-6">
-    </div>
-    <div class="col-sm-6">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12">
-    </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-    <div class="col-sm">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Based on the Flexbox Layout Module
  • -
  • Grid structured as follows: -
      -
    1. .container serves as the grid system's wrapper
    2. -
    3. Multiple .row elements serve as the grid system's rows
    4. -
    5. Multiple .col-SCR_SZ and/or .col-SCR_SZ-COL_WD elements specify serve as the grid system's columns (fluid and preset respectively)
    6. -
    -
  • -
  • SCR_SZ values: -
      -
    • sm for screens below 768px wide
    • -
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • -
    • lg for screens wider than 1280px
    • -
    -
  • -
  • COL_WD can be any integer value between 1 and 12 (both inclusive)
  • -
  • Fluid columns can create irregularly-sized columns in a layout
  • -
  • You can nest rows inside columns, but not columns inside columns or rows inside rows
  • -
  • An element can be a row and column at the same time
  • -
  • You can mix preset and fluid columns
  • -
  • Always wrap content in columns, never leave content unwrapped inside a row
  • -
  • Do not mix rows or columns with unwrapped content on the same level
  • -
-
-
-
-
-

Screen-specific layouts  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm-12 col-md-3 col-lg-2">
-    </div>
-    <div class="col-sm-12 col-md-5 col-lg-7">
-    </div>
-    <div class="col-sm-12 col-md-4 col-lg-3">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Apply multiple column classes to the same element, one for each screen size, to define different layouts
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • Try to make page content vertical for smaller devices, using .col-sm-12 and transition to two or three columns on larger screen sizes
  • -
  • Combine with offsets and reordering as shown below
  • -
  • You can omit the style of a screen size if it is the same one as the one applied in the immediately smaller screen size
  • -
  • Always start with a .col-sm or .col-sm-COL_WD style, otherwise smaller devices will not display your content properly
  • -
-
-
-
-
-

Predefined layouts  View on Codepen

-
<div class="row cols-sm-6">
-  <div>
-    <p>col-sm-6</p>
-  </div>
-  <div>
-    <p>col-sm-6</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Available both as fluid column layouts, using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names and fixed width column layouts, using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns
  • -
  • Can define screen-specific predefined layouts
  • -
  • Can be combined with offsets and reordering, but not normal grid layout classes
  • -
-
-
-
-
-

Column offsets  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm-10 col-sm-offset-1">
-    </div>
-  </div>
-  <div class="row">
-    <div class="col-sm col-sm-offset-2">
-    </div>
-  </div>
-<div class="row">
-    <div class="col-sm-6 col-sm-offset-3">
-    </div>
-</div>
-  <div class="row">
-    <div class="col-sm-8 col-sm-offset-4">
-    </div>
-  <div class="row">
-    <div class="col-sm-5 col-sm-offset-1">
-    </div>
-    <div class="col-sm-5 col-sm-offset-1">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create offsets using the .col-SCR_SZ-offset-COL_WD classes
  • -
  • COL_WD can be any integer from 0 to 11 (both inclusive)
  • -
  • You can mix offset columns and non-offset columns
  • -
  • Specify offsets in combination with existing column styling, not instead
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • You can omit offsets whenever not needed, but you will have to override existing offsets for larger screen sizes, using .col-SCR_SZ-offset-0
  • -
-
-
-
-
-

Column reordering  View on Codepen

-
<div class="container">
-  <div class="row">
-    <div class="col-sm col-md-last col-lg-normal">
-    </div>
-    <div class="col-sm-first col-md-normal">
-    </div>
-    <div class="col-sm col-md-first col-lg-normal">
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create reorders using .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes for first, last and normal ordering respectively
  • -
  • Default ordering is based on order of appearance
  • -
  • Specify reorders in combination with existing column styling, not instead
  • -
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • -
  • You can use multiple .col-SCR_SZ-first and .col-SCR_SZ-last elements to group your elements according to the desired layout
  • -
  • You can omit reorders whenever not needed, but you will have to override existing reorders for larger screen sizes, using .col-SCR_SZ-normal
  • -
-
-
-
-
-

Media object pattern View on Codepen

-
<div class="row">
-  <div class="col-sm-1">
-    <img src="...">
-  </div>
-  <div class="col-sm">
-    <h2>Media object heading</h2>
-    <p>Media object content...</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Not a new component, rather a popular pattern
  • -
  • Use two columns, one for the media (i.e. <img>) and one for the textual content
  • -
  • Compatible with most elements
  • -
  • Can use screen-specific layouts, reordering and offsets
  • -
  • Media objects can easily be nested inside each other
  • -
-
-
-
-
-
-
-
-
-
-

 Input Control

-
-
-
-

Forms & input  View on Codepen

-
<form>
-  <fieldset>
-    <legend>Simple form</legend>
-    <div class="input-group fluid">
-      <label for="username">Username</label>
-      <input type="email" value="" id="username" placeholder="username">
-    </div>
-    <div class="input-group fluid">
-      <label for="pwd">Password</label>
-      <input type="password" value="" id="pwd" placeholder="password">
-    </div>
-    <div class="input-group vertical">
-      <label for="nmbr">Number</label>
-      <input type="number" id="nmbr" value="5">
-    </div>
-  </fieldset>
-</form>
-
-
-

Notes

-
    -
  • Link <label> elements to their respective <input> elements for ease-of-use
  • -
  • Use of the <fieldset> and <legend> elements is highly recommended
  • -
  • Forms are inline by default, use .input-group to align elements inside them
  • -
  • Non-standard input types are not stylized like the rest
  • -
  • Checkboxes and radio buttons are stylized differently, as shown below
  • -
  • You can use the grid module's column classes to align form elements or make them responsive
  • -
  • Avoid using .input-group in aligned forms
  • -
  • Make .input-groups responsive by adding the .fluid class
  • -
  • Vertically align .input-groups using the .vertical class
  • -
-
-
-
-
-

Checkboxes & radio buttons  View on Codepen

-
<div class="input-group">
-  <input type="checkbox" id="check1" tabindex="0">
-  <label for="check1">Checkbox</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
-  <label for="rad1">Radio</label>
-</div>
-
-
-

Notes

-
    -
  • Pre-styled using the checkbox hack, fully accessible
  • -
  • Create a <div class="input-group"> containing the checkbox or radio button along with its linked label
  • -
  • Add tabindex="0" to the <input> element to make full accessible
  • -
  • Add multiple radio buttons in the same group inside the same .input-group wrapper
  • -
  • Always use .input-group and follow the code structure provided in the examples
  • -
  • Remember to use <label> elements for every single one of your checkbox or radio buttons
  • -
-
-
-
-
-

Switches  View on Codepen

-
<div class="input-group">
-  <input type="checkbox" id="switch1" tabindex="0">
-  <label for="switch1" class="switch">Checkbox switch</label>
-</div>
-
-<div class="input-group">
-  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
-  <label for="radswitch1" class="switch">Radio switch</label>
-</div>
-
-
-

Notes

-
    -
  • Use the same structure as checkboxes and radios, add .switch to the <label> element
  • -
  • Add tabindex="0" to the <input> element for accessibility
  • -
  • You can add two <label> elements inside the .input-group, the first one containing the text and the second one the .switch component to reverse the switch's layout
  • -
-
-
-
-
-

Buttons & button groups  View on Codepen

-
<button>Default button</button>
-<input type="button" class="primary" value="Primary button">
-<input type="reset" class="secondary" value="Secondary button">
-<input type="submit" class="tertiary" value="Tertiary button">
-<button class="inverse">Inverse button</button>
-<button class="small">Small button</button>
-<button class="large">Large button</button>
-<button disabled>Disabled button</button>
-<a href="#" class="button">Link button</a>
-<a href="#" role="button">Link button</a>
-<label class="button">Label button</label>
-<label role="button">Label button</label>
-
-<div class="button-group">
-  <button>Button</button>
-  <button>Button</button>
-  <button>Button</button>
-</div>
-
-
-

Notes

-
    -
  • All button types have been stylized
  • -
  • Button styles are available for other elements, using the .button class or the role="button" attribute
  • -
  • .primary, .secondary, .tertiary and .inverse color variants
  • -
  • .small and .large size variants
  • -
  • Create responsive button groups by wrapping multiple button elements inside a .button-group wrapper
  • -
  • Button groups are responsive, but might be displayed incorrectly in older browsers
  • -
  • Mix size and color variants, don't mix two variants of the same type
  • -
  • Avoid using different size variants inside a .button-group
  • -
-
-
-
-
-

File upload buttons  View on Codepen

-
<input type="file" id="file-input">
-<label for="file-input" class="button">Upload file...</label>
-
-
-

Notes

-
    -
  • Link an <input type="file"> element to a <label>
  • -
  • The file button will not change text when uploading a file, Javascript may be required
  • -
  • Compatible with .input-group
  • -
-
-
-
-
-
- -
-
-
-

 Table

-
-
-

Basic syntax & responsiveness  View on Codepen

-
<table>
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Table structure is as follows: -
      -
    1. <table> element is the table's root element
    2. -
    3. <caption> (optional) serves as the table's title and must be the first element inside the table
    4. -
    5. <thead> serves as the table's header row, populated with <th>
    6. -
    7. <tfoot> (optional) serves as the table's footer and must be immediately after <thead>
    8. -
    9. <tbody> is the table's body, populated with <td> elements
    10. -
    -
  • -
  • Tables are responsive and collapse into cards on mobile devices
  • -
  • Always specify a data-label for each <td> element corresponding to the column's header to properly display table on mobile devices
  • -
  • Avoid having multiline <thead> elements, however if you need to, you can use this fix
  • -
  • For horizontal tables or matrices, check the examples below
  • -
-
-
-
-
-

Scrollable tables  View on Codepen

-
<table class="scrollable">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .scrollable class to make a <table> scrollable
  • -
  • Does not support the <tfoot> element
  • -
  • Scrollable tables might not be fully compatible with older browsers
  • -
-
-
-
-
-

Horizontal tables  View on Codepen

-
<table class="horizontal">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .horizontal class to make a <table> horizontal
  • -
  • Does not support the <tfoot> element
  • -
  • Horizontal tables might not be fully compatible with older browsers
  • -
-
-
-
-
-

Table variants & matrices  View on Codepen

-
<table class="preset">
-  <caption>Star Wars Character Alignment Table</caption>
-  <tbody>
-    <tr>
-      <th></th>
-      <th>Lawful</td>
-      <th>Neutral</td>
-      <th>Chaotic</td>
-    </tr>
-    <tr>
-      <th>Good</th>
-      <td>Yoda</td>
-      <td>Luke Skywalker</td>
-      <td>Chewbacca</td>
-    </tr>
-    <tr>
-      <th>Neutral</th>
-      <td>C-3PO</td>
-      <td>Boba Fett</td>
-      <td>Han Solo</td>
-    </tr>
-    <tr>
-      <th>Bad</th>
-      <td>Darth Vader</td>
-      <td>Emperor Palpatine</td>
-      <td>Jabba the Hutt</td>
-    </tr>
-  </tbody>
-</table>
-
-<table class="striped">
-  <caption>People</caption>
-  <thead>
-    <!-- ... -->
-  </thead>
-  <tbody>
-    <!-- ... -->
-  </tbody>
-</table>
-
-
-

Notes

-
    -
  • Use the .striped class to make a <table> striped
  • -
  • Use the .preset class to make a <table> to create matrices or otherwise preset tables
  • -
  • Preset matrix tables might require some CSS tweaks to deal with border styling errors
  • -
  • You can combine .striped, .preset and .horizontal, respecting the rules of the combined structures
  • -
-
-
-
-
-
-
-
-
-

 Card

-
-
-

Basic syntax  View on Codepen

-
<div class="row">
-  <div class="card">
-    <div class="section">
-      <h3>Card Title</h3>
-      <p>Card content...</p>
-    </div>
-  </div>
-  <div class="card">
-    <div class="section">
-      <h3>Card Title</h3>
-      <p>Card content...</p>
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Requires familiarity with the grid module
  • -
  • Card structure as follows: -
      -
    1. .row element is the outermost wrapper of the cards layout
    2. -
    3. <div class="card"> elements are the cards
    4. -
    5. .section elements inside the .card serve as the card's sections
    6. -
    -
  • -
  • Cards are responsive, might be incompatible with older browsers
  • -
  • A card can have as many sections as needed, sections can be almost any element
  • -
  • Wrap all card content in .section classes
  • -
  • Add multiple .card elements in the same .row
  • -
  • Cards cannot be rows or columns at the same time, sections can be rows
  • -
-
-
-
-
-

Sections & media  View on Codepen

-
<div class="card">
-  <img src="..." class="section media">
-  <div class="section double-padded"><p>Content</p></div>
-  <div class="section dark"><p>Content</p></div>
-  <div class="section darker"><p>Content</p></div>
-</div>
-
-
-

Notes

-
    -
  • Create media sections for images or video, using the .media class
  • -
  • Color variants for sections are available using the .dark and .darker classes
  • -
  • Extra padding section variant available using the .double-padded class
  • -
  • .media sections might not be fully supported in older browsers
  • -
  • .media sections have a preset height of 200px
  • -
-
-
-
-
-

Card sizing & fluidity  View on Codepen

-
<div class="card small">
-  <div class="section">
-    <p>Content</p>
-  </div>
-</div>
-
-<div class="card large">
-  <div class="section">
-    <p>Content</p>
-  </div>
-</div>
-
-<div class="col-sm-12">
-  <div class="card fluid">
-    <div class="section">
-      <p>Content</p>
-    </div>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Card size variants available using the .large and .small classes
  • -
  • Fluid cards available using the .fluid class, require the use of grid columns
  • -
  • Fluid cards might not display properly in older browsers and will sometimes slightly disrespect margins on certain layouts
  • -
  • Always wrap .fluid cards in columns, don't mix with non-fluid cards
  • -
-
-
-
-
-

Card color variants  View on Codepen

-
<div class="card warning">
-  <div class="section">
-    <p>Warning</p>
-  </div>
-</div>
-
-<div class="card error">
-  <div class="section">
-    <p>Error</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create yellow warning cards, using the .warning class
  • -
  • Create red error cards, using .error class
  • -
  • Avoid combining two or more card color variants
  • -
-
-
-
-
-
-
-
-
-

 Tab

-
-
-

Basic syntax  View on Codepen

-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <div>
-    <h3>Tab 1</h3>
-    <p>This is the first tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
-  <label for="tab2" aria-hidden="true">Tab 2</label>
-  <div>
-    <h3>Tab 2</h3>
-    <p>This is the second tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
-  <label for="tab3" aria-hidden="true">Tab 3</label>
-  <div>
-    <h3>Tab 3</h3>
-    <p>This is the third tab's content.</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Tabs structure as follows: -
      -
    1. .tabs element is the outermost wrapper of the tabbed layout
    2. -
    3. Multiple <input type="radio"> elements followed by their linked <label> elements are the titles of tabs
    4. -
    5. Multiple <div> elements, each one after the <label> of the tab it corresponds to, as the content of each tab
    6. -
    -
  • -
  • Tabs are responsive, might be incompatible with some older browsers
  • -
  • Make a radio button checked to select the tab open by default
  • -
  • Use aria-hidden="true" to input elements to add accessibility
  • -
  • Use the syntax exactly as presented in the examples, do not substitute with checkboxes
  • -
-
-
-
-
-

Stacked tabs  View on Codepen

-
<div class="tabs stacked">
-  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
-  <label for="a1" aria-hidden="true">Accordion section 1</label>
-  <div>
-    <h3>Section 1</h3>
-    <p>This is the first accordion section's content.</p>
-  </div>
-  <input type="radio" name="accordion" id="a2"aria-hidden="true">
-  <label for="a2" aria-hidden="true">Accordion section 2</label>
-  <div>
-    <h3>Section 2</h3>
-    <p>This is the second accordion section's content.</p>
-  </div>
-</div>
-
-<div class="tabs stacked">
-  <input type="checkbox" id="c1" aria-hidden="true">
-  <label for="c1" aria-hidden="true">Collapse section 1</label>
-  <div>
-    <p>This is the first collapse section's content.</p>
-  </div>
-  <input type="checkbox" id="c2" aria-hidden="true">
-  <label for="c2" aria-hidden="true">Collapse section 2</label>
-  <div>
-    <p>This is the second collapse section's content.</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Use the .stacked class to create stacked tabs
  • -
  • Use aria-hidden="true" to input elements in order to add accessibility
  • -
  • Use either checkboxes or radio buttons as the <input> elements of stacked tabs
  • -
  • Use single checkbox in a .stacked tabs container, but not a single radio button
  • -
-
-
-
-
-
-
-
-
-

 Contextual

-
-
-

Text highlighting  View on Codepen

-
<mark>primary</mark>
-<mark class="secondary">secondary</mark>
-<mark class="tertiary">tertiary</mark>
-<mark class="inline-block">long highlight text...</mark>
-<mark class="tag">tag</mark>
-
-
-

Notes

-
    -
  • Use the <mark> element for highlighting text
  • -
  • .secondary and .tertiary classes offer color variants
  • -
  • Highlighted text is inline by default, use the .inline-block class for longer text highlights
  • -
  • Use the .tag class for highlighted tags
  • -
  • Combine color variants with the .inline-block or .tag class, do not combine color variants or .tag and .inline-block with each other
  • -
  • Do not nest <mark> elements, unless the outer element is an .inline-block
  • -
-
-
-
-
-

Toasts  View on Codepen

-
<span class="toast">This is a normal toast message!</span>
-<span class="toast small">This is a large toast message!</span>
-<span class="toast large">This is a small toast message!</span>
-
-
-

Notes

-
    -
  • Use the .toast class on <span> elements to create toast messages
  • -
  • Size variants available using the .small and .large classes
  • -
  • Toasts have no pre-defined behavior, use Javascript
  • -
  • Toasts display at the bottom of the screen on top of everything else
  • -
-
-
-
-
-

Tooltips  View on Codepen

-
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
-<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
-
-
-

Notes

-
    -
  • Create using the .tooltip class
  • -
  • Put tooltip text in the aria-label attribute's value
  • -
  • Use the .bottom class to make a tooltip display at the bottom of its context
  • -
-
-
-
-
-

Modals  View on Codepen

-
<label for="modal-toggle">Show modal</label>
-
-<input id="modal-toggle" type="checkbox"/>
-<div class="modal">
-  <div class="card">
-    <label for="modal-toggle" class="close"></label>
-    <h3 class="section">Modal</h3>
-    <p class="section">This is a modal window!</p>
-  </div>
-</div>
-
-
-

Notes

-
    -
  • Create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class
  • -
  • Use a .card inside the .modal to display contents
  • -
  • Remember to use a <label> or some Javascript to allow users to close the dialog
  • -
  • Modal dialogs can be placed and toggled from anywhere, although the structure must be kept intact
  • -
  • Use role="dialog" to add accessibility to modal dialogs
  • -
-
-
-
-
-
-
-
-
-

 Progress

-
-
-

Basic progress bar  View on Codepen

-
<progress value="0" max="1000"></progress>
-<progress value="450" max="1000"></progress>
-<progress value="1000" max="1000"></progress>
-
-
-

Notes

-
    -
  • Use the <progress> element to create progress bars
  • -
  • Set max="1000" and a value between 0 and 1000
  • -
  • Do not use floating point values for the progress bar
  • -
-
-
-
-
-

Progress bar variants  View on Codepen

-
<progress class="secondary" value="600" max="1000"></progress>
-<progress class="tertiary" value="300" max="1000"></progress>
-<progress class="inline" value="150" max="1000"></progress>
-
-
-

Notes

-
    -
  • Color variants available using the .secondary and .tertiary classes
  • -
  • Inline variant available using the .inline class
  • -
  • Mix color and size variants, but not multiple of the same type
  • -
-
-
-
-
-

Donut spinner  View on Codepen

-
<div class="spinner-donut"></div>
-
-
-

Notes

-
    -
  • Use the .spinner-donut class to create donut spinners
  • -
  • Apply class to a <div> or <span> element
  • -
  • Do not insert text inside the .spinner-donut element
  • -
  • Donut spinners can be displayed inline
  • -
  • Use the role="progressbar" attribute to make donut spinner accessible
  • -
-
-
-
-
-

Donut spinner variants  View on Codepen

-
<div class="spinner-donut secondary"></div>
-<div class="spinner-donut tertiary"></div>
-<div class="spinner-donut large"></div>
-
-
-

Notes

-
    -
  • Color variants available using the .secondary and .tertiary classes
  • -
  • Alternate size available using the .large class
  • -
  • You can mix color variants with the .large class, but not with each other
  • -
-
-
-
-
-
-
-
-
-

 Utility

-
-
-

Visibility helpers  View on Codepen

-
<span class="hidden">Hidden text</span>
-<span class="visually-hidden">Screen-reader-only text</span>
-
-
-

Notes

-
    -
  • Use .hidden to hide elements
  • -
  • Use .visually-hidden to show elements only in screen readers
  • -
  • Both classes use !important declarations
  • -
  • Do not use both classes together
  • -
-
-
-
-
-

Generic borders & shadows  View on Codepen

-
<span class="bordered">Bordered</span>
-<span class="rounded">Rounded</span>
-<span class="circular">Circular</span>
-<span class="shadowed">Casts shadow</span>
-
-
-

Notes

-
    -
  • Create generic borders using .bordered
  • -
  • Rounded and circular border radii available using .rounded and .circular classes
  • -
  • Generic shadows available using the .shadowed class
  • -
  • Combine generic borders, border radii and generic shadows with each other but not with themselves
  • -
  • All classes use !important declarations
  • -
  • Generic borders work well with buttons
  • -
-
-
-
-
-

Responsive sizing & spacing classes  View on Codepen

-
<div class="responsive-padding">Responsive padding</div>
-<div class="responsive-margin">Responsive margin</div>
-
-
-

Notes

-
    -
  • Use the .responsive-padding and .responsive-margin classes to apply responsive padding or margin respectively to any element
  • -
  • The two classes can be combined
  • -
  • Both classes use !important declarations
  • -
-
-
-
-
-

Responsive visibility helpers  View on Codepen

-
<span class="hidden-sm">Hidden in smaller screens</span>
-<span class="hidden-md">Hidden in medium-sized screens</span>
-<span class="hidden-lg">Hidden in larger screens</span>
-
-<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
-<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
-<span class="visually-hidden-lg">Visually hidden in larger screens</span>
-
-
-

Notes

-
    -
  • Use the .hidden-SCR_SZ or .visually-hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names
  • -
  • SCR_SZ values: -
      -
    • sm for screens below 768px wide
    • -
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • -
    • lg for screens wider than 1280px
    • -
    -
  • -
  • Responsive visibility helper classes can be combined for different screen sizes, avoid using both for the same size
  • -
  • Responsive visibility helper classes use !important declarations
  • -
-
-
-
-
-

Breadcrumbs  View on Codepen

-
<ul class="breadcrumbs">
-  <li><a href="#">Root</a></li>
-  <li><a href="#">Folder</a></li>
-  <li>File</li>
-</ul>
-
-
-

Notes

-
    -
  • To create breadcrumbs, create a <ul> element implementing the .breadcrumbs class
  • -
  • Do not use <ol> for breadcrumbs
  • -
  • Do not nest lists inside the .breadcrumbs
  • -
  • Use the role="navigation" attribute to make breadcrumbs accessible
  • -
-
-
-
-
-

Close icon  View on Codepen

-
<span class="close"></span>
-
-
-

Notes

-
    -
  • Use the .close class to create a close icon
  • -
  • Use a <span> or <div> element to create a close icon
  • -
  • Use a button element implementing the .close class to stylize the close icon as a button
  • -
-
-
-
-
-
-
-
-
-
-
- - - - + + + + + + mini.css - Quick Reference + + + + + + + + + + + +
+ + + + + +  Github +
+
+
+ +
+
+
+

Quick Reference

+

If you are familiar with mini.css and want a cheat sheet, you've come to the right place. Below you will find a quick overview of the framework and examples to help you brush up on your website-building skills. For more detailed instructions on modules, check out the modules page.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+

Setup & usage

+
+

You can download mini.css using npm, yarn or Bower:

+
+
npm install mini.css
+
yarn add mini.css
+
bower install mini.css
+

+

You can import the default flavor of mini.css in your webpage by simply adding one of the following references inside your HTML page's <head> tag:

+
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
+
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.4/dist/mini-default.min.css">

+

You can also find mini.css on cdnjs, which you can use to include it in your projects.


+

We strongly suggest you add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+
+
+
+
+

 Core

+
+
+

Headings  View on Codepen

+
<h1>Heading 1<small>Subheading</small></h1>
+<h2>Heading 2<small>Subheading</small></h2>
+<h3>Heading 3<small>Subheading</small></h3>
+<h4>Heading 4<small>Subheading</small></h4>
+<h5>Heading 5<small>Subheading</small></h5>
+<h6>Heading 6<small>Subheading</small></h6>
+
+
+

Typography

+
    +
  • Basic reset and fix rules applied, based on Normalize.css v5.0.0
  • +
  • A native font stack is used
  • +
  • The colors are set to background: #f5f5f5; and color: #212121;
  • +
  • The font-size for the root element is 16px
  • +
  • The line-height is 1.5
  • +
  • All HTML headings are pre-styled
  • +
  • Styling provided for <small> elements inside headings
  • +
  • Common HTML elements like paragraphs, horizontal rules, lists and code elements are pre-styled
  • +
  • Images are responsive by default
  • +
+
+
+
+
+

Common textual elements  View on Codepen

+
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
+<a href="#">This is a link.</a>
+<small>This is some small text.</small>
+<sub>Subscript</sub>
+<sup>Superscript</sup>
+<code>Inline code</code>
+<kbd>Keyboard Input</kbd>
+<hr>
+<pre>This is some preformatted text.</pre>
+<blockquote cite="Quotation source">
+  This is some quoted text from another website or person.
+</blockquote>
+
+
+

Lists & images View on Codepen

+
<ul>
+  <li>Apple</li>
+  <li>Orange</li>
+  <li>Strawberry</li>
+</ul>
+
+<ol>
+  <li>Wake up</li>
+  <li>Eat breakfast</li>
+  <li>Go to work</li>
+</ol>
+
+<figure>
+  <img src="...">
+  <figcaption>Image caption</figcaption>
+</figure>
+
+
+
+
+
+
+
+
+

 Grid

+
+
+

Basic layout  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm-1">
+    </div>
+    <div class="col-sm-11">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-2">
+    </div>
+    <div class="col-sm-10">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-3">
+    </div>
+    <div class="col-sm-9">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-4">
+    </div>
+    <div class="col-sm-8">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-5">
+    </div>
+    <div class="col-sm-7">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-6">
+    </div>
+    <div class="col-sm-6">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12">
+    </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+    <div class="col-sm">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Based on the Flexbox Layout Module
  • +
  • Grid structured as follows: +
      +
    1. .container serves as the grid system's wrapper
    2. +
    3. Multiple .row elements serve as the grid system's rows
    4. +
    5. Multiple .col-SCR_SZ and/or .col-SCR_SZ-COL_WD elements specify serve as the grid system's columns (fluid and preset respectively)
    6. +
    +
  • +
  • SCR_SZ values: +
      +
    • sm for screens below 768px wide
    • +
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • +
    • lg for screens wider than 1280px
    • +
    +
  • +
  • COL_WD can be any integer value between 1 and 12 (both inclusive)
  • +
  • Fluid columns can create irregularly-sized columns in a layout
  • +
  • You can nest rows inside columns, but not columns inside columns or rows inside rows
  • +
  • An element can be a row and column at the same time
  • +
  • You can mix preset and fluid columns
  • +
  • Always wrap content in columns, never leave content unwrapped inside a row
  • +
  • Do not mix rows or columns with unwrapped content on the same level
  • +
+
+
+
+
+

Screen-specific layouts  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12 col-md-3 col-lg-2">
+    </div>
+    <div class="col-sm-12 col-md-5 col-lg-7">
+    </div>
+    <div class="col-sm-12 col-md-4 col-lg-3">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Apply multiple column classes to the same element, one for each screen size, to define different layouts
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • Try to make page content vertical for smaller devices, using .col-sm-12 and transition to two or three columns on larger screen sizes
  • +
  • Combine with offsets and reordering as shown below
  • +
  • You can omit the style of a screen size if it is the same one as the one applied in the immediately smaller screen size
  • +
  • Always start with a .col-sm or .col-sm-COL_WD style, otherwise smaller devices will not display your content properly
  • +
+
+
+
+
+

Predefined layouts  View on Codepen

+
<div class="row cols-sm-6">
+  <div>
+    <p>col-sm-6</p>
+  </div>
+  <div>
+    <p>col-sm-6</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Available both as fluid column layouts, using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names and fixed width column layouts, using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns
  • +
  • Can define screen-specific predefined layouts
  • +
  • Can be combined with offsets and reordering, but not normal grid layout classes
  • +
+
+
+
+
+

Column offsets  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm-10 col-sm-offset-1">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm col-sm-offset-2">
+    </div>
+  </div>
+<div class="row">
+    <div class="col-sm-6 col-sm-offset-3">
+    </div>
+</div>
+  <div class="row">
+    <div class="col-sm-8 col-sm-offset-4">
+    </div>
+  <div class="row">
+    <div class="col-sm-5 col-sm-offset-1">
+    </div>
+    <div class="col-sm-5 col-sm-offset-1">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create offsets using the .col-SCR_SZ-offset-COL_WD classes
  • +
  • COL_WD can be any integer from 0 to 11 (both inclusive)
  • +
  • You can mix offset columns and non-offset columns
  • +
  • Specify offsets in combination with existing column styling, not instead
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • You can omit offsets whenever not needed, but you will have to override existing offsets for larger screen sizes, using .col-SCR_SZ-offset-0
  • +
+
+
+
+
+

Column reordering  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm col-md-last col-lg-normal">
+    </div>
+    <div class="col-sm-first col-md-normal">
+    </div>
+    <div class="col-sm col-md-first col-lg-normal">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create reorders using .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes for first, last and normal ordering respectively
  • +
  • Default ordering is based on order of appearance
  • +
  • Specify reorders in combination with existing column styling, not instead
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • You can use multiple .col-SCR_SZ-first and .col-SCR_SZ-last elements to group your elements according to the desired layout
  • +
  • You can omit reorders whenever not needed, but you will have to override existing reorders for larger screen sizes, using .col-SCR_SZ-normal
  • +
+
+
+
+
+

Media object pattern View on Codepen

+
<div class="row">
+  <div class="col-sm-1">
+    <img src="...">
+  </div>
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Not a new component, rather a popular pattern
  • +
  • Use two columns, one for the media (i.e. <img>) and one for the textual content
  • +
  • Compatible with most elements
  • +
  • Can use screen-specific layouts, reordering and offsets
  • +
  • Media objects can easily be nested inside each other
  • +
+
+
+
+
+
+
+
+
+
+

 Input Control

+
+
+
+

Forms & input  View on Codepen

+
<form>
+  <fieldset>
+    <legend>Simple form</legend>
+    <div class="input-group fluid">
+      <label for="username">Username</label>
+      <input type="email" value="" id="username" placeholder="username">
+    </div>
+    <div class="input-group fluid">
+      <label for="pwd">Password</label>
+      <input type="password" value="" id="pwd" placeholder="password">
+    </div>
+    <div class="input-group vertical">
+      <label for="nmbr">Number</label>
+      <input type="number" id="nmbr" value="5">
+    </div>
+  </fieldset>
+</form>
+
+
+

Notes

+
    +
  • Link <label> elements to their respective <input> elements for ease-of-use
  • +
  • Use of the <fieldset> and <legend> elements is highly recommended
  • +
  • Forms are inline by default, use .input-group to align elements inside them
  • +
  • Non-standard input types are not stylized like the rest
  • +
  • Checkboxes and radio buttons are stylized differently, as shown below
  • +
  • You can use the grid module's column classes to align form elements or make them responsive
  • +
  • Avoid using .input-group in aligned forms
  • +
  • Make .input-groups responsive by adding the .fluid class
  • +
  • Vertically align .input-groups using the .vertical class
  • +
+
+
+
+
+

Checkboxes & radio buttons  View on Codepen

+
<div class="input-group">
+  <input type="checkbox" id="check1" tabindex="0">
+  <label for="check1">Checkbox</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
+  <label for="rad1">Radio</label>
+</div>
+
+
+

Notes

+
    +
  • Pre-styled using the checkbox hack, fully accessible
  • +
  • Create a <div class="input-group"> containing the checkbox or radio button along with its linked label
  • +
  • Add tabindex="0" to the <input> element to make full accessible
  • +
  • Add multiple radio buttons in the same group inside the same .input-group wrapper
  • +
  • Always use .input-group and follow the code structure provided in the examples
  • +
  • Remember to use <label> elements for every single one of your checkbox or radio buttons
  • +
+
+
+
+
+

Switches  View on Codepen

+
<div class="input-group">
+  <input type="checkbox" id="switch1" tabindex="0">
+  <label for="switch1" class="switch">Checkbox switch</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
+  <label for="radswitch1" class="switch">Radio switch</label>
+</div>
+
+
+

Notes

+
    +
  • Use the same structure as checkboxes and radios, add .switch to the <label> element
  • +
  • Add tabindex="0" to the <input> element for accessibility
  • +
  • You can add two <label> elements inside the .input-group, the first one containing the text and the second one the .switch component to reverse the switch's layout
  • +
+
+
+
+
+

Buttons & button groups  View on Codepen

+
<button>Default button</button>
+<input type="button" class="primary" value="Primary button">
+<input type="reset" class="secondary" value="Secondary button">
+<input type="submit" class="tertiary" value="Tertiary button">
+<button class="inverse">Inverse button</button>
+<button class="small">Small button</button>
+<button class="large">Large button</button>
+<button disabled>Disabled button</button>
+<a href="#" class="button">Link button</a>
+<a href="#" role="button">Link button</a>
+<label class="button">Label button</label>
+<label role="button">Label button</label>
+
+<div class="button-group">
+  <button>Button</button>
+  <button>Button</button>
+  <button>Button</button>
+</div>
+
+
+

Notes

+
    +
  • All button types have been stylized
  • +
  • Button styles are available for other elements, using the .button class or the role="button" attribute
  • +
  • .primary, .secondary, .tertiary and .inverse color variants
  • +
  • .small and .large size variants
  • +
  • Create responsive button groups by wrapping multiple button elements inside a .button-group wrapper
  • +
  • Button groups are responsive, but might be displayed incorrectly in older browsers
  • +
  • Mix size and color variants, don't mix two variants of the same type
  • +
  • Avoid using different size variants inside a .button-group
  • +
+
+
+
+
+

File upload buttons  View on Codepen

+
<input type="file" id="file-input">
+<label for="file-input" class="button">Upload file...</label>
+
+
+

Notes

+
    +
  • Link an <input type="file"> element to a <label>
  • +
  • The file button will not change text when uploading a file, Javascript may be required
  • +
  • Compatible with .input-group
  • +
+
+
+
+
+
+ +
+
+
+

 Table

+
+
+

Basic syntax & responsiveness  View on Codepen

+
<table>
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Table structure is as follows: +
      +
    1. <table> element is the table's root element
    2. +
    3. <caption> (optional) serves as the table's title and must be the first element inside the table
    4. +
    5. <thead> serves as the table's header row, populated with <th>
    6. +
    7. <tfoot> (optional) serves as the table's footer and must be immediately after <thead>
    8. +
    9. <tbody> is the table's body, populated with <td> elements
    10. +
    +
  • +
  • Tables are responsive and collapse into cards on mobile devices
  • +
  • Always specify a data-label for each <td> element corresponding to the column's header to properly display table on mobile devices
  • +
  • Avoid having multiline <thead> elements, however if you need to, you can use this fix
  • +
  • For horizontal tables or matrices, check the examples below
  • +
+
+
+
+
+

Scrollable tables  View on Codepen

+
<table class="scrollable">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .scrollable class to make a <table> scrollable
  • +
  • Does not support the <tfoot> element
  • +
  • Scrollable tables might not be fully compatible with older browsers
  • +
+
+
+
+
+

Horizontal tables  View on Codepen

+
<table class="horizontal">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .horizontal class to make a <table> horizontal
  • +
  • Does not support the <tfoot> element
  • +
  • Horizontal tables might not be fully compatible with older browsers
  • +
+
+
+
+
+

Table variants & matrices  View on Codepen

+
<table class="preset">
+  <caption>Star Wars Character Alignment Table</caption>
+  <tbody>
+    <tr>
+      <th></th>
+      <th>Lawful</td>
+      <th>Neutral</td>
+      <th>Chaotic</td>
+    </tr>
+    <tr>
+      <th>Good</th>
+      <td>Yoda</td>
+      <td>Luke Skywalker</td>
+      <td>Chewbacca</td>
+    </tr>
+    <tr>
+      <th>Neutral</th>
+      <td>C-3PO</td>
+      <td>Boba Fett</td>
+      <td>Han Solo</td>
+    </tr>
+    <tr>
+      <th>Bad</th>
+      <td>Darth Vader</td>
+      <td>Emperor Palpatine</td>
+      <td>Jabba the Hutt</td>
+    </tr>
+  </tbody>
+</table>
+
+<table class="striped">
+  <caption>People</caption>
+  <thead>
+    <!-- ... -->
+  </thead>
+  <tbody>
+    <!-- ... -->
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .striped class to make a <table> striped
  • +
  • Use the .preset class to make a <table> to create matrices or otherwise preset tables
  • +
  • Preset matrix tables might require some CSS tweaks to deal with border styling errors
  • +
  • You can combine .striped, .preset and .horizontal, respecting the rules of the combined structures
  • +
+
+
+
+
+
+
+
+
+

 Card

+
+
+

Basic syntax  View on Codepen

+
<div class="row">
+  <div class="card">
+    <div class="section">
+      <h3>Card Title</h3>
+      <p>Card content...</p>
+    </div>
+  </div>
+  <div class="card">
+    <div class="section">
+      <h3>Card Title</h3>
+      <p>Card content...</p>
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Requires familiarity with the grid module
  • +
  • Card structure as follows: +
      +
    1. .row element is the outermost wrapper of the cards layout
    2. +
    3. <div class="card"> elements are the cards
    4. +
    5. .section elements inside the .card serve as the card's sections
    6. +
    +
  • +
  • Cards are responsive, might be incompatible with older browsers
  • +
  • A card can have as many sections as needed, sections can be almost any element
  • +
  • Wrap all card content in .section classes
  • +
  • Add multiple .card elements in the same .row
  • +
  • Cards cannot be rows or columns at the same time, sections can be rows
  • +
+
+
+
+
+

Sections & media  View on Codepen

+
<div class="card">
+  <img src="..." class="section media">
+  <div class="section double-padded"><p>Content</p></div>
+  <div class="section dark"><p>Content</p></div>
+  <div class="section darker"><p>Content</p></div>
+</div>
+
+
+

Notes

+
    +
  • Create media sections for images or video, using the .media class
  • +
  • Color variants for sections are available using the .dark and .darker classes
  • +
  • Extra padding section variant available using the .double-padded class
  • +
  • .media sections might not be fully supported in older browsers
  • +
  • .media sections have a preset height of 200px
  • +
+
+
+
+
+

Card sizing & fluidity  View on Codepen

+
<div class="card small">
+  <div class="section">
+    <p>Content</p>
+  </div>
+</div>
+
+<div class="card large">
+  <div class="section">
+    <p>Content</p>
+  </div>
+</div>
+
+<div class="col-sm-12">
+  <div class="card fluid">
+    <div class="section">
+      <p>Content</p>
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Card size variants available using the .large and .small classes
  • +
  • Fluid cards available using the .fluid class, require the use of grid columns
  • +
  • Fluid cards might not display properly in older browsers and will sometimes slightly disrespect margins on certain layouts
  • +
  • Always wrap .fluid cards in columns, don't mix with non-fluid cards
  • +
+
+
+
+
+

Card color variants  View on Codepen

+
<div class="card warning">
+  <div class="section">
+    <p>Warning</p>
+  </div>
+</div>
+
+<div class="card error">
+  <div class="section">
+    <p>Error</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create yellow warning cards, using the .warning class
  • +
  • Create red error cards, using .error class
  • +
  • Avoid combining two or more card color variants
  • +
+
+
+
+
+
+
+
+
+

 Tab

+
+
+

Basic syntax  View on Codepen

+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <div>
+    <h3>Tab 1</h3>
+    <p>This is the first tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
+  <label for="tab2" aria-hidden="true">Tab 2</label>
+  <div>
+    <h3>Tab 2</h3>
+    <p>This is the second tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
+  <label for="tab3" aria-hidden="true">Tab 3</label>
+  <div>
+    <h3>Tab 3</h3>
+    <p>This is the third tab's content.</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Tabs structure as follows: +
      +
    1. .tabs element is the outermost wrapper of the tabbed layout
    2. +
    3. Multiple <input type="radio"> elements followed by their linked <label> elements are the titles of tabs
    4. +
    5. Multiple <div> elements, each one after the <label> of the tab it corresponds to, as the content of each tab
    6. +
    +
  • +
  • Tabs are responsive, might be incompatible with some older browsers
  • +
  • Make a radio button checked to select the tab open by default
  • +
  • Use aria-hidden="true" to input elements to add accessibility
  • +
  • Use the syntax exactly as presented in the examples, do not substitute with checkboxes
  • +
+
+
+
+
+

Stacked tabs  View on Codepen

+
<div class="tabs stacked">
+  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
+  <label for="a1" aria-hidden="true">Accordion section 1</label>
+  <div>
+    <h3>Section 1</h3>
+    <p>This is the first accordion section's content.</p>
+  </div>
+  <input type="radio" name="accordion" id="a2"aria-hidden="true">
+  <label for="a2" aria-hidden="true">Accordion section 2</label>
+  <div>
+    <h3>Section 2</h3>
+    <p>This is the second accordion section's content.</p>
+  </div>
+</div>
+
+<div class="tabs stacked">
+  <input type="checkbox" id="c1" aria-hidden="true">
+  <label for="c1" aria-hidden="true">Collapse section 1</label>
+  <div>
+    <p>This is the first collapse section's content.</p>
+  </div>
+  <input type="checkbox" id="c2" aria-hidden="true">
+  <label for="c2" aria-hidden="true">Collapse section 2</label>
+  <div>
+    <p>This is the second collapse section's content.</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Use the .stacked class to create stacked tabs
  • +
  • Use aria-hidden="true" to input elements in order to add accessibility
  • +
  • Use either checkboxes or radio buttons as the <input> elements of stacked tabs
  • +
  • Use single checkbox in a .stacked tabs container, but not a single radio button
  • +
+
+
+
+
+
+
+
+
+

 Contextual

+
+
+

Text highlighting  View on Codepen

+
<mark>primary</mark>
+<mark class="secondary">secondary</mark>
+<mark class="tertiary">tertiary</mark>
+<mark class="inline-block">long highlight text...</mark>
+<mark class="tag">tag</mark>
+
+
+

Notes

+
    +
  • Use the <mark> element for highlighting text
  • +
  • .secondary and .tertiary classes offer color variants
  • +
  • Highlighted text is inline by default, use the .inline-block class for longer text highlights
  • +
  • Use the .tag class for highlighted tags
  • +
  • Combine color variants with the .inline-block or .tag class, do not combine color variants or .tag and .inline-block with each other
  • +
  • Do not nest <mark> elements, unless the outer element is an .inline-block
  • +
+
+
+
+
+

Toasts  View on Codepen

+
<span class="toast">This is a normal toast message!</span>
+<span class="toast small">This is a large toast message!</span>
+<span class="toast large">This is a small toast message!</span>
+
+
+

Notes

+
    +
  • Use the .toast class on <span> elements to create toast messages
  • +
  • Size variants available using the .small and .large classes
  • +
  • Toasts have no pre-defined behavior, use Javascript
  • +
  • Toasts display at the bottom of the screen on top of everything else
  • +
+
+
+
+
+

Tooltips  View on Codepen

+
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
+<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
+
+
+

Notes

+
    +
  • Create using the .tooltip class
  • +
  • Put tooltip text in the aria-label attribute's value
  • +
  • Use the .bottom class to make a tooltip display at the bottom of its context
  • +
+
+
+
+
+

Modals  View on Codepen

+
<label for="modal-toggle">Show modal</label>
+
+<input id="modal-toggle" type="checkbox"/>
+<div class="modal">
+  <div class="card">
+    <label for="modal-toggle" class="close"></label>
+    <h3 class="section">Modal</h3>
+    <p class="section">This is a modal window!</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class
  • +
  • Use a .card inside the .modal to display contents
  • +
  • Remember to use a <label> or some Javascript to allow users to close the dialog
  • +
  • Modal dialogs can be placed and toggled from anywhere, although the structure must be kept intact
  • +
  • Use role="dialog" to add accessibility to modal dialogs
  • +
+
+
+
+
+
+
+
+
+

 Progress

+
+
+

Basic progress bar  View on Codepen

+
<progress value="0" max="1000"></progress>
+<progress value="450" max="1000"></progress>
+<progress value="1000" max="1000"></progress>
+
+
+

Notes

+
    +
  • Use the <progress> element to create progress bars
  • +
  • Set max="1000" and a value between 0 and 1000
  • +
  • Do not use floating point values for the progress bar
  • +
+
+
+
+
+

Progress bar variants  View on Codepen

+
<progress class="secondary" value="600" max="1000"></progress>
+<progress class="tertiary" value="300" max="1000"></progress>
+<progress class="inline" value="150" max="1000"></progress>
+
+
+

Notes

+
    +
  • Color variants available using the .secondary and .tertiary classes
  • +
  • Inline variant available using the .inline class
  • +
  • Mix color and size variants, but not multiple of the same type
  • +
+
+
+
+
+

Donut spinner  View on Codepen

+
<div class="spinner-donut"></div>
+
+
+

Notes

+
    +
  • Use the .spinner-donut class to create donut spinners
  • +
  • Apply class to a <div> or <span> element
  • +
  • Do not insert text inside the .spinner-donut element
  • +
  • Donut spinners can be displayed inline
  • +
  • Use the role="progressbar" attribute to make donut spinner accessible
  • +
+
+
+
+
+

Donut spinner variants  View on Codepen

+
<div class="spinner-donut secondary"></div>
+<div class="spinner-donut tertiary"></div>
+<div class="spinner-donut large"></div>
+
+
+

Notes

+
    +
  • Color variants available using the .secondary and .tertiary classes
  • +
  • Alternate size available using the .large class
  • +
  • You can mix color variants with the .large class, but not with each other
  • +
+
+
+
+
+
+
+
+
+

 Utility

+
+
+

Visibility helpers  View on Codepen

+
<span class="hidden">Hidden text</span>
+<span class="visually-hidden">Screen-reader-only text</span>
+
+
+

Notes

+
    +
  • Use .hidden to hide elements
  • +
  • Use .visually-hidden to show elements only in screen readers
  • +
  • Both classes use !important declarations
  • +
  • Do not use both classes together
  • +
+
+
+
+
+

Generic borders & shadows  View on Codepen

+
<span class="bordered">Bordered</span>
+<span class="rounded">Rounded</span>
+<span class="circular">Circular</span>
+<span class="shadowed">Casts shadow</span>
+
+
+

Notes

+
    +
  • Create generic borders using .bordered
  • +
  • Rounded and circular border radii available using .rounded and .circular classes
  • +
  • Generic shadows available using the .shadowed class
  • +
  • Combine generic borders, border radii and generic shadows with each other but not with themselves
  • +
  • All classes use !important declarations
  • +
  • Generic borders work well with buttons
  • +
+
+
+
+
+

Responsive sizing & spacing classes  View on Codepen

+
<div class="responsive-padding">Responsive padding</div>
+<div class="responsive-margin">Responsive margin</div>
+
+
+

Notes

+
    +
  • Use the .responsive-padding and .responsive-margin classes to apply responsive padding or margin respectively to any element
  • +
  • The two classes can be combined
  • +
  • Both classes use !important declarations
  • +
+
+
+
+
+

Responsive visibility helpers  View on Codepen

+
<span class="hidden-sm">Hidden in smaller screens</span>
+<span class="hidden-md">Hidden in medium-sized screens</span>
+<span class="hidden-lg">Hidden in larger screens</span>
+
+<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
+<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
+<span class="visually-hidden-lg">Visually hidden in larger screens</span>
+
+
+

Notes

+
    +
  • Use the .hidden-SCR_SZ or .visually-hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names
  • +
  • SCR_SZ values: +
      +
    • sm for screens below 768px wide
    • +
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • +
    • lg for screens wider than 1280px
    • +
    +
  • +
  • Responsive visibility helper classes can be combined for different screen sizes, avoid using both for the same size
  • +
  • Responsive visibility helper classes use !important declarations
  • +
+
+
+
+
+

Breadcrumbs  View on Codepen

+
<ul class="breadcrumbs">
+  <li><a href="#">Root</a></li>
+  <li><a href="#">Folder</a></li>
+  <li>File</li>
+</ul>
+
+
+

Notes

+
    +
  • To create breadcrumbs, create a <ul> element implementing the .breadcrumbs class
  • +
  • Do not use <ol> for breadcrumbs
  • +
  • Do not nest lists inside the .breadcrumbs
  • +
  • Use the role="navigation" attribute to make breadcrumbs accessible
  • +
+
+
+
+
+

Close icon  View on Codepen

+
<span class="close"></span>
+
+
+

Notes

+
    +
  • Use the .close class to create a close icon
  • +
  • Use a <span> or <div> element to create a close icon
  • +
  • Use a button element implementing the .close class to stylize the close icon as a button
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + mini.css - Quick Reference + + + + + + + + + + + +
+ + + + + +  Github +
+
+
+ +
+
+
+

Quick Reference

+

If you are familiar with mini.css and want a cheat sheet, you've come to the right place. Below you will find a quick overview of the framework and examples to help you brush up on your website-building skills. For more detailed instructions on modules, check out the modules page.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+

Setup & usage

+
+

You can download mini.css using npm, yarn or Bower:

+
+
npm install mini.css
+
yarn add mini.css
+
bower install mini.css
+

+

You can import the default flavor of mini.css in your webpage by simply adding one of the following references inside your HTML page's <head> tag:

+
<link rel="stylesheet" href="https://gitcdn.link/repo/Chalarangelo/mini.css/master/dist/mini-default.min.css">
+
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.3.4/dist/mini-default.min.css">

+

You can also find mini.css on cdnjs, which you can use to include it in your projects.


+

We strongly suggest you add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+
+
+
+
+

 Core

+
+
+

Headings  View on Codepen

+
<h1>Heading 1<small>Subheading</small></h1>
+<h2>Heading 2<small>Subheading</small></h2>
+<h3>Heading 3<small>Subheading</small></h3>
+<h4>Heading 4<small>Subheading</small></h4>
+<h5>Heading 5<small>Subheading</small></h5>
+<h6>Heading 6<small>Subheading</small></h6>
+
+
+

Typography

+
    +
  • Basic reset and fix rules applied, based on Normalize.css v5.0.0
  • +
  • A native font stack is used
  • +
  • The colors are set to background: #f5f5f5; and color: #212121;
  • +
  • The font-size for the root element is 16px
  • +
  • The line-height is 1.5
  • +
  • All HTML headings are pre-styled
  • +
  • Styling provided for <small> elements inside headings
  • +
  • Common HTML elements like paragraphs, horizontal rules, lists and code elements are pre-styled
  • +
  • Images are responsive by default
  • +
+
+
+
+
+

Common textual elements  View on Codepen

+
<p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
+<a href="#">This is a link.</a>
+<small>This is some small text.</small>
+<sub>Subscript</sub>
+<sup>Superscript</sup>
+<code>Inline code</code>
+<kbd>Keyboard Input</kbd>
+<hr>
+<pre>This is some preformatted text.</pre>
+<blockquote cite="Quotation source">
+  This is some quoted text from another website or person.
+</blockquote>
+
+
+

Lists & images View on Codepen

+
<ul>
+  <li>Apple</li>
+  <li>Orange</li>
+  <li>Strawberry</li>
+</ul>
+<ol>
+  <li>Wake up</li>
+  <li>Eat breakfast</li>
+  <li>Go to work</li>
+</ol>
+
+<figure>
+  <img src="...">
+  <figcaption>Image caption</figcaption>
+</figure>
+
+
+
+
+
+
+
+
+

 Grid

+
+
+

Basic layout  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm-1">
+    </div>
+    <div class="col-sm-11">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-2">
+    </div>
+    <div class="col-sm-10">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-3">
+    </div>
+    <div class="col-sm-9">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-4">
+    </div>
+    <div class="col-sm-8">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-5">
+    </div>
+    <div class="col-sm-7">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-6">
+    </div>
+    <div class="col-sm-6">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12">
+    </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+    <div class="col-sm">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Based on the Flexbox Layout Module
  • +
  • Grid structured as follows: +
      +
    1. .container serves as the grid system's wrapper
    2. +
    3. Multiple .row elements serve as the grid system's rows
    4. +
    5. Multiple .col-SCR_SZ and/or .col-SCR_SZ-COL_WD elements specify serve as the grid system's columns (fluid and preset respectively)
    6. +
    +
  • +
  • SCR_SZ values: +
      +
    • sm for screens below 768px wide
    • +
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • +
    • lg for screens wider than 1280px
    • +
    +
  • +
  • COL_WD can be any integer value between 1 and 12 (both inclusive)
  • +
  • Fluid columns can create irregularly-sized columns in a layout
  • +
  • You can nest rows inside columns, but not columns inside columns or rows inside rows
  • +
  • An element can be a row and column at the same time
  • +
  • You can mix preset and fluid columns
  • +
  • Always wrap content in columns, never leave content unwrapped inside a row
  • +
  • Do not mix rows or columns with unwrapped content on the same level
  • +
+
+
+
+
+

Screen-specific layouts  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm-12 col-md-3 col-lg-2">
+    </div>
+    <div class="col-sm-12 col-md-5 col-lg-7">
+    </div>
+    <div class="col-sm-12 col-md-4 col-lg-3">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Apply multiple column classes to the same element, one for each screen size, to define different layouts
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • Try to make page content vertical for smaller devices, using .col-sm-12 and transition to two or three columns on larger screen sizes
  • +
  • Combine with offsets and reordering as shown below
  • +
  • You can omit the style of a screen size if it is the same one as the one applied in the immediately smaller screen size
  • +
  • Always start with a .col-sm or .col-sm-COL_WD style, otherwise smaller devices will not display your content properly
  • +
+
+
+
+
+

Predefined layouts  View on Codepen

+
<div class="row cols-sm-6">
+  <div>
+    <p>col-sm-6</p>
+  </div>
+  <div>
+    <p>col-sm-6</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Available both as fluid column layouts, using .cols-SCR_SZ, replacing SCR_SZ with one of the available screen size names and fixed width column layouts, using .col-SCR_SZ-COL_WD, replacing SCR_SZ with one of the available screen size names and COL_WD with a number from 1 to 12 specifying the width of the columns
  • +
  • Can define screen-specific predefined layouts
  • +
  • Can be combined with offsets and reordering, but not normal grid layout classes
  • +
+
+
+
+
+

Column offsets  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm-10 col-sm-offset-1">
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-sm col-sm-offset-2">
+    </div>
+  </div>
+<div class="row">
+    <div class="col-sm-6 col-sm-offset-3">
+    </div>
+</div>
+  <div class="row">
+    <div class="col-sm-8 col-sm-offset-4">
+    </div>
+  <div class="row">
+    <div class="col-sm-5 col-sm-offset-1">
+    </div>
+    <div class="col-sm-5 col-sm-offset-1">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create offsets using the .col-SCR_SZ-offset-COL_WD classes
  • +
  • COL_WD can be any integer from 0 to 11 (both inclusive)
  • +
  • You can mix offset columns and non-offset columns
  • +
  • Specify offsets in combination with existing column styling, not instead
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • You can omit offsets whenever not needed, but you will have to override existing offsets for larger screen sizes, using .col-SCR_SZ-offset-0
  • +
+
+
+
+
+

Column reordering  View on Codepen

+
<div class="container">
+  <div class="row">
+    <div class="col-sm col-md-last col-lg-normal">
+    </div>
+    <div class="col-sm-first col-md-normal">
+    </div>
+    <div class="col-sm col-md-first col-lg-normal">
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create reorders using .col-SCR_SZ-first, .col-SCR_SZ-last and .col-SCR_SZ-normal classes for first, last and normal ordering respectively
  • +
  • Default ordering is based on order of appearance
  • +
  • Specify reorders in combination with existing column styling, not instead
  • +
  • Mobile-first approach, styles specified for smaller screen sizes apply to larger screen sizes if no override is specified
  • +
  • You can use multiple .col-SCR_SZ-first and .col-SCR_SZ-last elements to group your elements according to the desired layout
  • +
  • You can omit reorders whenever not needed, but you will have to override existing reorders for larger screen sizes, using .col-SCR_SZ-normal
  • +
+
+
+
+
+

Media object pattern View on Codepen

+
<div class="row">
+  <div class="col-sm-1">
+    <img src="...">
+  </div>
+  <div class="col-sm">
+    <h2>Media object heading</h2>
+    <p>Media object content...</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Not a new component, rather a popular pattern
  • +
  • Use two columns, one for the media (i.e. <img>) and one for the textual content
  • +
  • Compatible with most elements
  • +
  • Can use screen-specific layouts, reordering and offsets
  • +
  • Media objects can easily be nested inside each other
  • +
+
+
+
+
+
+
+
+
+
+

 Input Control

+
+
+
+

Forms & input  View on Codepen

+
<form>
+  <fieldset>
+    <legend>Simple form</legend>
+    <div class="input-group fluid">
+      <label for="username">Username</label>
+      <input type="email" value="" id="username" placeholder="username">
+    </div>
+    <div class="input-group fluid">
+      <label for="pwd">Password</label>
+      <input type="password" value="" id="pwd" placeholder="password">
+    </div>
+    <div class="input-group vertical">
+      <label for="nmbr">Number</label>
+      <input type="number" id="nmbr" value="5">
+    </div>
+  </fieldset>
+</form>
+
+
+

Notes

+
    +
  • Link <label> elements to their respective <input> elements for ease-of-use
  • +
  • Use of the <fieldset> and <legend> elements is highly recommended
  • +
  • Forms are inline by default, use .input-group to align elements inside them
  • +
  • Non-standard input types are not stylized like the rest
  • +
  • Checkboxes and radio buttons are stylized differently, as shown below
  • +
  • You can use the grid module's column classes to align form elements or make them responsive
  • +
  • Avoid using .input-group in aligned forms
  • +
  • Make .input-groups responsive by adding the .fluid class
  • +
  • Vertically align .input-groups using the .vertical class
  • +
+
+
+
+
+

Checkboxes & radio buttons  View on Codepen

+
<div class="input-group">
+  <input type="checkbox" id="check1" tabindex="0">
+  <label for="check1">Checkbox</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="rad1" tabindex="0" name="radio-group-1">
+  <label for="rad1">Radio</label>
+</div>
+
+
+

Notes

+
    +
  • Pre-styled using the checkbox hack, fully accessible
  • +
  • Create a <div class="input-group"> containing the checkbox or radio button along with its linked label
  • +
  • Add tabindex="0" to the <input> element to make full accessible
  • +
  • Add multiple radio buttons in the same group inside the same .input-group wrapper
  • +
  • Always use .input-group and follow the code structure provided in the examples
  • +
  • Remember to use <label> elements for every single one of your checkbox or radio buttons
  • +
+
+
+
+
+

Switches  View on Codepen

+
<div class="input-group">
+  <input type="checkbox" id="switch1" tabindex="0">
+  <label for="switch1" class="switch">Checkbox switch</label>
+</div>
+
+<div class="input-group">
+  <input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
+  <label for="radswitch1" class="switch">Radio switch</label>
+</div>
+
+
+

Notes

+
    +
  • Use the same structure as checkboxes and radios, add .switch to the <label> element
  • +
  • Add tabindex="0" to the <input> element for accessibility
  • +
  • You can add two <label> elements inside the .input-group, the first one containing the text and the second one the .switch component to reverse the switch's layout
  • +
+
+
+
+
+

Buttons & button groups  View on Codepen

+
<button>Default button</button>
+<input type="button" class="primary" value="Primary button">
+<input type="reset" class="secondary" value="Secondary button">
+<input type="submit" class="tertiary" value="Tertiary button">
+<button class="inverse">Inverse button</button>
+<button class="small">Small button</button>
+<button class="large">Large button</button>
+<button disabled>Disabled button</button>
+<a href="#" class="button">Link button</a>
+<a href="#" role="button">Link button</a>
+<label class="button">Label button</label>
+<label role="button">Label button</label>
+
+<div class="button-group">
+  <button>Button</button>
+  <button>Button</button>
+  <button>Button</button>
+</div>
+
+
+

Notes

+
    +
  • All button types have been stylized
  • +
  • Button styles are available for other elements, using the .button class or the role="button" attribute
  • +
  • .primary, .secondary, .tertiary and .inverse color variants
  • +
  • .small and .large size variants
  • +
  • Create responsive button groups by wrapping multiple button elements inside a .button-group wrapper
  • +
  • Button groups are responsive, but might be displayed incorrectly in older browsers
  • +
  • Mix size and color variants, don't mix two variants of the same type
  • +
  • Avoid using different size variants inside a .button-group
  • +
+
+
+
+
+

File upload buttons  View on Codepen

+
<input type="file" id="file-input">
+<label for="file-input" class="button">Upload file...</label>
+
+
+

Notes

+
    +
  • Link an <input type="file"> element to a <label>
  • +
  • The file button will not change text when uploading a file, Javascript may be required
  • +
  • Compatible with .input-group
  • +
+
+
+
+
+
+ +
+
+
+

 Table

+
+
+

Basic syntax & responsiveness  View on Codepen

+
<table>
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Table structure is as follows: +
      +
    1. <table> element is the table's root element
    2. +
    3. <caption> (optional) serves as the table's title and must be the first element inside the table
    4. +
    5. <thead> serves as the table's header row, populated with <th>
    6. +
    7. <tfoot> (optional) serves as the table's footer and must be immediately after <thead>
    8. +
    9. <tbody> is the table's body, populated with <td> elements
    10. +
    +
  • +
  • Tables are responsive and collapse into cards on mobile devices
  • +
  • Always specify a data-label for each <td> element corresponding to the column's header to properly display table on mobile devices
  • +
  • Avoid having multiline <thead> elements, however if you need to, you can use this fix
  • +
  • For horizontal tables or matrices, check the examples below
  • +
+
+
+
+
+

Scrollable tables  View on Codepen

+
<table class="scrollable">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .scrollable class to make a <table> scrollable
  • +
  • Does not support the <tfoot> element
  • +
  • Scrollable tables might not be fully compatible with older browsers
  • +
+
+
+
+
+

Horizontal tables  View on Codepen

+
<table class="horizontal">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .horizontal class to make a <table> horizontal
  • +
  • Does not support the <tfoot> element
  • +
  • Horizontal tables might not be fully compatible with older browsers
  • +
+
+
+
+
+

Table variants & matrices  View on Codepen

+
<table class="preset">
+  <caption>Star Wars Character Alignment Table</caption>
+  <tbody>
+    <tr>
+      <th></th>
+      <th>Lawful</td>
+      <th>Neutral</td>
+      <th>Chaotic</td>
+    </tr>
+    <tr>
+      <th>Good</th>
+      <td>Yoda</td>
+      <td>Luke Skywalker</td>
+      <td>Chewbacca</td>
+    </tr>
+    <tr>
+      <th>Neutral</th>
+      <td>C-3PO</td>
+      <td>Boba Fett</td>
+      <td>Han Solo</td>
+    </tr>
+    <tr>
+      <th>Bad</th>
+      <td>Darth Vader</td>
+      <td>Emperor Palpatine</td>
+      <td>Jabba the Hutt</td>
+    </tr>
+  </tbody>
+</table>
+
+<table class="striped">
+  <caption>People</caption>
+  <thead>
+    <!-- ... -->
+  </thead>
+  <tbody>
+    <!-- ... -->
+  </tbody>
+</table>
+
+
+

Notes

+
    +
  • Use the .striped class to make a <table> striped
  • +
  • Use the .preset class to make a <table> to create matrices or otherwise preset tables
  • +
  • Preset matrix tables might require some CSS tweaks to deal with border styling errors
  • +
  • You can combine .striped, .preset and .horizontal, respecting the rules of the combined structures
  • +
+
+
+
+
+
+
+
+
+

 Card

+
+
+

Basic syntax  View on Codepen

+
<div class="row">
+  <div class="card">
+    <div class="section">
+      <h3>Card Title</h3>
+      <p>Card content...</p>
+    </div>
+  </div>
+  <div class="card">
+    <div class="section">
+      <h3>Card Title</h3>
+      <p>Card content...</p>
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Requires familiarity with the grid module
  • +
  • Card structure as follows: +
      +
    1. .row element is the outermost wrapper of the cards layout
    2. +
    3. <div class="card"> elements are the cards
    4. +
    5. .section elements inside the .card serve as the card's sections
    6. +
    +
  • +
  • Cards are responsive, might be incompatible with older browsers
  • +
  • A card can have as many sections as needed, sections can be almost any element
  • +
  • Wrap all card content in .section classes
  • +
  • Add multiple .card elements in the same .row
  • +
  • Cards cannot be rows or columns at the same time, sections can be rows
  • +
+
+
+
+
+

Sections & media  View on Codepen

+
<div class="card">
+  <img src="..." class="section media">
+  <div class="section double-padded"><p>Content</p></div>
+  <div class="section dark"><p>Content</p></div>
+  <div class="section darker"><p>Content</p></div>
+</div>
+
+
+

Notes

+
    +
  • Create media sections for images or video, using the .media class
  • +
  • Color variants for sections are available using the .dark and .darker classes
  • +
  • Extra padding section variant available using the .double-padded class
  • +
  • .media sections might not be fully supported in older browsers
  • +
  • .media sections have a preset height of 200px
  • +
+
+
+
+
+

Card sizing & fluidity  View on Codepen

+
<div class="card small">
+  <div class="section">
+    <p>Content</p>
+  </div>
+</div>
+
+<div class="card large">
+  <div class="section">
+    <p>Content</p>
+  </div>
+</div>
+
+<div class="col-sm-12">
+  <div class="card fluid">
+    <div class="section">
+      <p>Content</p>
+    </div>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Card size variants available using the .large and .small classes
  • +
  • Fluid cards available using the .fluid class, require the use of grid columns
  • +
  • Fluid cards might not display properly in older browsers and will sometimes slightly disrespect margins on certain layouts
  • +
  • Always wrap .fluid cards in columns, don't mix with non-fluid cards
  • +
+
+
+
+
+

Card color variants  View on Codepen

+
<div class="card warning">
+  <div class="section">
+    <p>Warning</p>
+  </div>
+</div>
+
+<div class="card error">
+  <div class="section">
+    <p>Error</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create yellow warning cards, using the .warning class
  • +
  • Create red error cards, using .error class
  • +
  • Avoid combining two or more card color variants
  • +
+
+
+
+
+
+
+
+
+

 Tab

+
+
+

Basic syntax  View on Codepen

+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <div>
+    <h3>Tab 1</h3>
+    <p>This is the first tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
+  <label for="tab2" aria-hidden="true">Tab 2</label>
+  <div>
+    <h3>Tab 2</h3>
+    <p>This is the second tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
+  <label for="tab3" aria-hidden="true">Tab 3</label>
+  <div>
+    <h3>Tab 3</h3>
+    <p>This is the third tab's content.</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Tabs structure as follows: +
      +
    1. .tabs element is the outermost wrapper of the tabbed layout
    2. +
    3. Multiple <input type="radio"> elements followed by their linked <label> elements are the titles of tabs
    4. +
    5. Multiple <div> elements, each one after the <label> of the tab it corresponds to, as the content of each tab
    6. +
    +
  • +
  • Tabs are responsive, might be incompatible with some older browsers
  • +
  • Make a radio button checked to select the tab open by default
  • +
  • Use aria-hidden="true" to input elements to add accessibility
  • +
  • Use the syntax exactly as presented in the examples, do not substitute with checkboxes
  • +
+
+
+
+
+

Stacked tabs  View on Codepen

+
<div class="tabs stacked">
+  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
+  <label for="a1" aria-hidden="true">Accordion section 1</label>
+  <div>
+    <h3>Section 1</h3>
+    <p>This is the first accordion section's content.</p>
+  </div>
+  <input type="radio" name="accordion" id="a2"aria-hidden="true">
+  <label for="a2" aria-hidden="true">Accordion section 2</label>
+  <div>
+    <h3>Section 2</h3>
+    <p>This is the second accordion section's content.</p>
+  </div>
+</div>
+
+<div class="tabs stacked">
+  <input type="checkbox" id="c1" aria-hidden="true">
+  <label for="c1" aria-hidden="true">Collapse section 1</label>
+  <div>
+    <p>This is the first collapse section's content.</p>
+  </div>
+  <input type="checkbox" id="c2" aria-hidden="true">
+  <label for="c2" aria-hidden="true">Collapse section 2</label>
+  <div>
+    <p>This is the second collapse section's content.</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Use the .stacked class to create stacked tabs
  • +
  • Use aria-hidden="true" to input elements in order to add accessibility
  • +
  • Use either checkboxes or radio buttons as the <input> elements of stacked tabs
  • +
  • Use single checkbox in a .stacked tabs container, but not a single radio button
  • +
+
+
+
+
+
+
+
+
+

 Contextual

+
+
+

Text highlighting  View on Codepen

+
<mark>primary</mark>
+<mark class="secondary">secondary</mark>
+<mark class="tertiary">tertiary</mark>
+<mark class="inline-block">long highlight text...</mark>
+<mark class="tag">tag</mark>
+
+
+

Notes

+
    +
  • Use the <mark> element for highlighting text
  • +
  • .secondary and .tertiary classes offer color variants
  • +
  • Highlighted text is inline by default, use the .inline-block class for longer text highlights
  • +
  • Use the .tag class for highlighted tags
  • +
  • Combine color variants with the .inline-block or .tag class, do not combine color variants or .tag and .inline-block with each other
  • +
  • Do not nest <mark> elements, unless the outer element is an .inline-block
  • +
+
+
+
+
+

Toasts  View on Codepen

+
<span class="toast">This is a normal toast message!</span>
+<span class="toast small">This is a large toast message!</span>
+<span class="toast large">This is a small toast message!</span>
+
+
+

Notes

+
    +
  • Use the .toast class on <span> elements to create toast messages
  • +
  • Size variants available using the .small and .large classes
  • +
  • Toasts have no pre-defined behavior, use Javascript
  • +
  • Toasts display at the bottom of the screen on top of everything else
  • +
+
+
+
+
+

Tooltips  View on Codepen

+
<span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
+<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span>
+
+
+

Notes

+
    +
  • Create using the .tooltip class
  • +
  • Put tooltip text in the aria-label attribute's value
  • +
  • Use the .bottom class to make a tooltip display at the bottom of its context
  • +
+
+
+
+
+

Modals  View on Codepen

+
<label for="modal-toggle">Show modal</label>
+
+<input id="modal-toggle" type="checkbox"/>
+<div class="modal">
+  <div class="card">
+    <label for="modal-toggle" class="close"></label>
+    <h3 class="section">Modal</h3>
+    <p class="section">This is a modal window!</p>
+  </div>
+</div>
+
+
+

Notes

+
    +
  • Create an <input type="checkbox"> element, immediately followed by a <div> element with the .modal class
  • +
  • Use a .card inside the .modal to display contents
  • +
  • Remember to use a <label> or some Javascript to allow users to close the dialog
  • +
  • Modal dialogs can be placed and toggled from anywhere, although the structure must be kept intact
  • +
  • Use role="dialog" to add accessibility to modal dialogs
  • +
+
+
+
+
+
+
+
+
+

 Progress

+
+
+

Basic progress bar  View on Codepen

+
<progress value="0" max="1000"></progress>
+<progress value="450" max="1000"></progress>
+<progress value="1000" max="1000"></progress>
+
+
+

Notes

+
    +
  • Use the <progress> element to create progress bars
  • +
  • Set max="1000" and a value between 0 and 1000
  • +
  • Do not use floating point values for the progress bar
  • +
+
+
+
+
+

Progress bar variants  View on Codepen

+
<progress class="secondary" value="600" max="1000"></progress>
+<progress class="tertiary" value="300" max="1000"></progress>
+<progress class="inline" value="150" max="1000"></progress>
+
+
+

Notes

+
    +
  • Color variants available using the .secondary and .tertiary classes
  • +
  • Inline variant available using the .inline class
  • +
  • Mix color and size variants, but not multiple of the same type
  • +
+
+
+
+
+

Donut spinner  View on Codepen

+
<div class="spinner-donut"></div>
+
+
+

Notes

+
    +
  • Use the .spinner-donut class to create donut spinners
  • +
  • Apply class to a <div> or <span> element
  • +
  • Do not insert text inside the .spinner-donut element
  • +
  • Donut spinners can be displayed inline
  • +
  • Use the role="progressbar" attribute to make donut spinner accessible
  • +
+
+
+
+
+

Donut spinner variants  View on Codepen

+
<div class="spinner-donut secondary"></div>
+<div class="spinner-donut tertiary"></div>
+<div class="spinner-donut large"></div>
+
+
+

Notes

+
    +
  • Color variants available using the .secondary and .tertiary classes
  • +
  • Alternate size available using the .large class
  • +
  • You can mix color variants with the .large class, but not with each other
  • +
+
+
+
+
+
+
+
+
+

 Utility

+
+
+

Visibility helpers  View on Codepen

+
<span class="hidden">Hidden text</span>
+<span class="visually-hidden">Screen-reader-only text</span>
+
+
+

Notes

+
    +
  • Use .hidden to hide elements
  • +
  • Use .visually-hidden to show elements only in screen readers
  • +
  • Both classes use !important declarations
  • +
  • Do not use both classes together
  • +
+
+
+
+
+

Generic borders & shadows  View on Codepen

+
<span class="bordered">Bordered</span>
+<span class="rounded">Rounded</span>
+<span class="circular">Circular</span>
+<span class="shadowed">Casts shadow</span>
+
+
+

Notes

+
    +
  • Create generic borders using .bordered
  • +
  • Rounded and circular border radii available using .rounded and .circular classes
  • +
  • Generic shadows available using the .shadowed class
  • +
  • Combine generic borders, border radii and generic shadows with each other but not with themselves
  • +
  • All classes use !important declarations
  • +
  • Generic borders work well with buttons
  • +
+
+
+
+
+

Responsive sizing & spacing classes  View on Codepen

+
<div class="responsive-padding">Responsive padding</div>
+<div class="responsive-margin">Responsive margin</div>
+
+
+

Notes

+
    +
  • Use the .responsive-padding and .responsive-margin classes to apply responsive padding or margin respectively to any element
  • +
  • The two classes can be combined
  • +
  • Both classes use !important declarations
  • +
+
+
+
+
+

Responsive visibility helpers  View on Codepen

+
<span class="hidden-sm">Hidden in smaller screens</span>
+<span class="hidden-md">Hidden in medium-sized screens</span>
+<span class="hidden-lg">Hidden in larger screens</span>
+
+<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
+<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
+<span class="visually-hidden-lg">Visually hidden in larger screens</span>
+
+
+

Notes

+
    +
  • Use the .hidden-SCR_SZ or .visually-hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names
  • +
  • SCR_SZ values: +
      +
    • sm for screens below 768px wide
    • +
    • md for screens between 768px(inclusive) and 1280px(exclusive)
    • +
    • lg for screens wider than 1280px
    • +
    +
  • +
  • Responsive visibility helper classes can be combined for different screen sizes, avoid using both for the same size
  • +
  • Responsive visibility helper classes use !important declarations
  • +
+
+
+
+
+

Breadcrumbs  View on Codepen

+
<ul class="breadcrumbs">
+  <li><a href="#">Root</a></li>
+  <li><a href="#">Folder</a></li>
+  <li>File</li>
+</ul>
+
+
+

Notes

+
    +
  • To create breadcrumbs, create a <ul> element implementing the .breadcrumbs class
  • +
  • Do not use <ol> for breadcrumbs
  • +
  • Do not nest lists inside the .breadcrumbs
  • +
  • Use the role="navigation" attribute to make breadcrumbs accessible
  • +
+
+
+
+
+

Close icon  View on Codepen

+
<span class="close"></span>
+
+
+

Notes

+
    +
  • Use the .close class to create a close icon
  • +
  • Use a <span> or <div> element to create a close icon
  • +
  • Use a button element implementing the .close class to stylize the close icon as a button
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/docs/v2/react.html b/docs/v2/react.html index 63ddcc2..0ac5998 100644 --- a/docs/v2/react.html +++ b/docs/v2/react.html @@ -1,14 +1,14 @@ - - - - mini.css - React and Preact Libraries - - - - - - - - - - + + + + mini.css - React and Preact Libraries + + + + + + + + + + diff --git a/docs/v2/tab.html b/docs/v2/tab.html index 9bb68a1..0e1feb1 100644 --- a/docs/v2/tab.html +++ b/docs/v2/tab.html @@ -1,314 +1,314 @@ - - - - - - mini.css - Tab - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Tab

-

The tab module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the tab module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.


-
-
-

Quick start

-

To use the tab module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Basic syntax

-
-
-
- - -

Tab 1

This is the first tab's content.

- - -

Tab 2

This is the second tab's content.

- - -

Tab 3

This is the third tab's content.

- - -

Tab 4

This is the fourth tab's content.

-
-
-
-

The tab container's basic syntax is composed of two components, presented below in the order they should be added to the DOM tree:

-
    -
  • At the outermost level of the tab container is a <div> element implementing the .tabs class. This serves as the wrapper of the tab container.
  • -
  • Inside the .tabs container, add a set of the following three elements for each tab: -
      -
    1. First, add an <input type="radio"> element. Give it a name and an id in order to be able to link to it and group it with the rest of the radio buttons in the container.
    2. -
    3. Follow the <input> element with a <label> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.
    4. -
    5. Finally, add a <div> immediately after the <label>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).
    6. -
    -
  • -
-

Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the aria-hidden="true" attribute to all the <input> and <label> elements inside the .tabs container.

-

Sample code

-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <div>
-    <h3>Tab 1</h3>
-    <p>This is the first tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
-  <label for="tab2" aria-hidden="true">Tab 2</label>
-  <div>
-    <h3>Tab 2</h3>
-    <p>This is the second tab's content.</p>
-  </div>
-  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
-  <label for="tab3" aria-hidden="true">Tab 3</label>
-  <div>
-    <h3>Tab 3</h3>
-    <p>This is the third tab's content.</p>
-  </div>
-</div>
-
-
-
-

Notes

-
    -
  • Tabs are compatible with modern browsers, but might not display properly in older browsers.
  • -
  • Remember to add the checked attribute to one of your <input>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.
  • -
  • The height of the tab container's panel area is 400px. If you want to change this default size, please check out the customization page.
  • -
  • Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.
  • -

-
-
-
<div class="tabs">
-  <input type="checkbox" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <div>
-    <h3>Bad Tab</h3>
-  </div>
-</div>
-

Don't: Do not use checkboxes inside the default .tabs container, otherwise you might notice unexpected behavior. If you want to use an <input type="checkbox">, check out the next section.

-
-
-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <div>
-    <h3>Lonely Tab</h3>
-  </div>
-</div>
-

Don't: You can add a single tab in a .tabs container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.

-
-
-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
-  <label for="tab1" aria-hidden="true">Tab 1</label>
-  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
-  <label for="tab2" aria-hidden="true">Tab 2</label>
-  <div>
-    <h3>Bad Tab</h3>
-  </div>
-  <div>
-    <h3>Bad Tab</h3>
-  </div>
-</div>
-

Don't: The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.

-
-
-
<div class="tabs">
-  <input type="radio" name="tab-group" id="tab1" checked>
-  <label for="tab1">Tab</label>
-  <div>
-    <h3>Not fully accessible tab</h3>
-  </div>
-</div>
-

Don't: Remember to use the aria-hidden="true" attribute to make your tabs fully accessible.

-
-
-
-
-
-
-
-
-
-

Stacked tabs

-
-
-
- - -

Section 1

This is the first accordion section's content.

- - -

Section 2

This is the second accordion section's content.

-
-
- - -

This is the first collapse section's content.

- - -

This is the second collapse section's content.

-
-
-
-

Apart from the normal tab layout, you can make your tabs stacked instead, using the .stacked class in your .tabs container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the aria-hidden="true" attribute to make your tabs fully accessible, as before.

-

Sample code

-
<div class="tabs stacked">
-  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
-  <label for="a1" aria-hidden="true">Accordion section 1</label>
-  <div>
-    <h3>Section 1</h3>
-    <p>This is the first accordion section's content.</p>
-  </div>
-  <input type="radio" name="accordion" id="a2"aria-hidden="true">
-  <label for="a2" aria-hidden="true">Accordion section 2</label>
-  <div>
-    <h3>Section 2</h3>
-    <p>This is the second accordion section's content.</p>
-  </div>
-</div>
-
-<div class="tabs stacked">
-  <input type="checkbox" id="c1" aria-hidden="true">
-  <label for="c1" aria-hidden="true">Collapse section 1</label>
-  <div>
-    <p>This is the first collapse section's content.</p>
-  </div>
-  <input type="checkbox" id="c2" aria-hidden="true">
-  <label for="c2" aria-hidden="true">Collapse section 2</label>
-  <div>
-    <p>This is the second collapse section's content.</p>
-  </div>
-</div>
-
-
-
-

Notes

-
    -
  • .stacked tabs can be used with either checkboxes or radio buttons.
  • -
  • You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.
  • -

-
-
-
<div class="tabs stacked">
-  <input type="checkbox" id="c1" aria-hidden="true">
-  <label for="c1" aria-hidden="true">Single collapse</label>
-  <div>
-    <p>This is a singular collapse.</p>
-  </div>
-</div>
-

Do: You can implement single collapses (otherwise known as spoilers), using a .tabs.stacked container with only one checkbox-based tab.

-
-
-
<div class="tabs stacked">
-  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
-  <label for="a1" aria-hidden="true">Single accordion section</label>
-  <div>
-    <p>This accordion section cannot close once opened</p>
-  </div>
-</div>
-

Don't: Avoid having a single radio-based tab in a .tabs.stacked container, as this might result in unexpected behavior.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Tab + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Tab

+

The tab module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the tab module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.


+
+
+

Quick start

+

To use the tab module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Basic syntax

+
+
+
+ + +

Tab 1

This is the first tab's content.

+ + +

Tab 2

This is the second tab's content.

+ + +

Tab 3

This is the third tab's content.

+ + +

Tab 4

This is the fourth tab's content.

+
+
+
+

The tab container's basic syntax is composed of two components, presented below in the order they should be added to the DOM tree:

+
    +
  • At the outermost level of the tab container is a <div> element implementing the .tabs class. This serves as the wrapper of the tab container.
  • +
  • Inside the .tabs container, add a set of the following three elements for each tab: +
      +
    1. First, add an <input type="radio"> element. Give it a name and an id in order to be able to link to it and group it with the rest of the radio buttons in the container.
    2. +
    3. Follow the <input> element with a <label> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.
    4. +
    5. Finally, add a <div> immediately after the <label>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).
    6. +
    +
  • +
+

Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the aria-hidden="true" attribute to all the <input> and <label> elements inside the .tabs container.

+

Sample code

+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <div>
+    <h3>Tab 1</h3>
+    <p>This is the first tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
+  <label for="tab2" aria-hidden="true">Tab 2</label>
+  <div>
+    <h3>Tab 2</h3>
+    <p>This is the second tab's content.</p>
+  </div>
+  <input type="radio" name="tab-group" id="tab3" aria-hidden="true">
+  <label for="tab3" aria-hidden="true">Tab 3</label>
+  <div>
+    <h3>Tab 3</h3>
+    <p>This is the third tab's content.</p>
+  </div>
+</div>
+
+
+
+

Notes

+
    +
  • Tabs are compatible with modern browsers, but might not display properly in older browsers.
  • +
  • Remember to add the checked attribute to one of your <input>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.
  • +
  • The height of the tab container's panel area is 400px. If you want to change this default size, please check out the customization page.
  • +
  • Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.
  • +

+
+
+
<div class="tabs">
+  <input type="checkbox" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <div>
+    <h3>Bad Tab</h3>
+  </div>
+</div>
+

Don't: Do not use checkboxes inside the default .tabs container, otherwise you might notice unexpected behavior. If you want to use an <input type="checkbox">, check out the next section.

+
+
+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <div>
+    <h3>Lonely Tab</h3>
+  </div>
+</div>
+

Don't: You can add a single tab in a .tabs container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.

+
+
+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
+  <label for="tab1" aria-hidden="true">Tab 1</label>
+  <input type="radio" name="tab-group" id="tab2" aria-hidden="true">
+  <label for="tab2" aria-hidden="true">Tab 2</label>
+  <div>
+    <h3>Bad Tab</h3>
+  </div>
+  <div>
+    <h3>Bad Tab</h3>
+  </div>
+</div>
+

Don't: The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.

+
+
+
<div class="tabs">
+  <input type="radio" name="tab-group" id="tab1" checked>
+  <label for="tab1">Tab</label>
+  <div>
+    <h3>Not fully accessible tab</h3>
+  </div>
+</div>
+

Don't: Remember to use the aria-hidden="true" attribute to make your tabs fully accessible.

+
+
+
+
+
+
+
+
+
+

Stacked tabs

+
+
+
+ + +

Section 1

This is the first accordion section's content.

+ + +

Section 2

This is the second accordion section's content.

+
+
+ + +

This is the first collapse section's content.

+ + +

This is the second collapse section's content.

+
+
+
+

Apart from the normal tab layout, you can make your tabs stacked instead, using the .stacked class in your .tabs container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the aria-hidden="true" attribute to make your tabs fully accessible, as before.

+

Sample code

+
<div class="tabs stacked">
+  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
+  <label for="a1" aria-hidden="true">Accordion section 1</label>
+  <div>
+    <h3>Section 1</h3>
+    <p>This is the first accordion section's content.</p>
+  </div>
+  <input type="radio" name="accordion" id="a2"aria-hidden="true">
+  <label for="a2" aria-hidden="true">Accordion section 2</label>
+  <div>
+    <h3>Section 2</h3>
+    <p>This is the second accordion section's content.</p>
+  </div>
+</div>
+
+<div class="tabs stacked">
+  <input type="checkbox" id="c1" aria-hidden="true">
+  <label for="c1" aria-hidden="true">Collapse section 1</label>
+  <div>
+    <p>This is the first collapse section's content.</p>
+  </div>
+  <input type="checkbox" id="c2" aria-hidden="true">
+  <label for="c2" aria-hidden="true">Collapse section 2</label>
+  <div>
+    <p>This is the second collapse section's content.</p>
+  </div>
+</div>
+
+
+
+

Notes

+
    +
  • .stacked tabs can be used with either checkboxes or radio buttons.
  • +
  • You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.
  • +

+
+
+
<div class="tabs stacked">
+  <input type="checkbox" id="c1" aria-hidden="true">
+  <label for="c1" aria-hidden="true">Single collapse</label>
+  <div>
+    <p>This is a singular collapse.</p>
+  </div>
+</div>
+

Do: You can implement single collapses (otherwise known as spoilers), using a .tabs.stacked container with only one checkbox-based tab.

+
+
+
<div class="tabs stacked">
+  <input type="radio" name="accordion" id="a1" checked aria-hidden="true">
+  <label for="a1" aria-hidden="true">Single accordion section</label>
+  <div>
+    <p>This accordion section cannot close once opened</p>
+  </div>
+</div>
+

Don't: Avoid having a single radio-based tab in a .tabs.stacked container, as this might result in unexpected behavior.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/table.html b/docs/v2/table.html index 5aead1a..f890b33 100644 --- a/docs/v2/table.html +++ b/docs/v2/table.html @@ -1,522 +1,522 @@ - - - - - - mini.css - Table - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Table

-

The table module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Presenting information the right way is very important, especially so when dealing with large amounts of data. The table module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.


-
-
-

Quick start

-

To use the table module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Basic syntax & responsiveness

-
-
-
-

Medium/Large screen layout


- - - - - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
-
-

Small screen layout


- - - - - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
-
-
-
-
-

Table layout utilizes the <table> HTML element with the following structure (usual tabular structure):

-
    -
  1. On the outermost level, there is the <table> element.
  2. -
  3. If you want to include a <caption> element, it must by the first element inside the <table> element.
  4. -
  5. Following the above, you need to add a <thead> element. Inside it, you should usually add one <tr> element, which contains one or more <th> elements.
  6. -
  7. Immediately after the <thead> element, you can add a <tfoot> element, if you want to. Inside it, you should usually add one or more <tr> elements, which contain one or more <td> elements.
  8. -
  9. Finally, add your <tbody> element. Inside it, you should usually add one or more <tr> elements, which contain one or more <td> elements. For each <td> element, specify a data-label attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.
  10. -
-

Sample code

-
<table>
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-
-

Notes

-
    -
  • Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.
  • -
  • Specifying the data-label attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.
  • -
  • We strongly suggest you avoid adding multiple rows in your <thead> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check this codepen for an idea on how to deal with irregular border styling.
  • -

-
-
-
<tr>
-  <td>Chad</td>
-  <td>Wilberts</td>
-  <td>MrOne</td>
-</tr>
-

Don't: Remember to always add a data-label attribute to your <td> elements, as the table's card view is very dependent on them to display properly. <th> elements, however, do not require or utilize this attribute.

-
-
-
<table>
-  <caption>People</caption>
-  <thead>
-    <!-- ... -->
-  </thead>
-  <tbody>
-    <!-- ... -->
-  </tbody>
-  <tfoot>
-    <!-- ... -->
-  </tfoot>
-</table>
-

Don't: The <tfoot> element must always be immediately after the <thead> element, if included.

-
-
-
<tbody>
-  <tr>
-    <th>Name</th>
-    <td data-label="Name">Chad</td>
-  </tr>
-</tbody>
-

Don't: Avoid inserting <th> elements inside your <tbody> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.

-
-
-
<thead>
-  <tr>
-    <td data-label="Name">Chad</td>
-  </tr>
-</thead>
-

Don't: Avoid using <td> elements inside your <thead>. You should use a <tbody> element instead.

-
-
-
-
-
-
-
-
-
-
-

Scrollable tables

-
-
-
-
-
- - - - - - - - - - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom
MarkGerkisMarkie
JohnFergussonFergujohn
SylviaPouleauSylver
NormanJonesNormalJones
TrevorHeidelHeidi

-
-
-
-

Scrollable tables can be created by simply adding the .scrollable class to the root element of your table (i.e. the <table> element). Scrollable tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the data-label attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that .horizontal tables do not support the <tfoot> element.

-

Sample code

-
<table class="scrollable">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-
-

Notes

-
    -
  • Due to .scrollable tables utilizing the Flexbox Layout, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.
  • -
  • Mixing the Flexible Layout Module with <table> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with .scrollable tables, feel free to submit a new issue on GitHub.
  • -
  • .scrollable tables have a default maximum height of 400px. If you want to change this, you should check out the customization page.
  • -
-
-
-
-
<table class="scrollable">
-  <!-- ... -->
-  <tfoot>
-    <!-- Do not do this! -->
-  </tfoot>
-  <!-- ... -->
-</table>
-

Don't: We already explicitly stated that, due to the way .scrollable tables are styled, the <tfoot> element is not supported. Please refer to the last section of this page if you need to use this element and you want to have a scrollable table layout.

-
-
-
-
-
-
-
-
-
-
-

Horizontal tables

-
-
-
-
-
- - - - - - - - - - -
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom

-
-
-
-

Scrollable tables are very similar to horizontal ones and can be created by simply adding the .scrollable class to the root element of your table (i.e. the <table> element). Similarly to horizontal ones, they can accommodate as many data rows as you like, making their overflow scrollable, while they do not support the <tfoot> element. As usual, remember to add the data-label attribute, as shown in the previous section, to allow your tables to be responsive without any errors.

-

Sample code

-
<table class="horizontal">
-  <caption>People</caption>
-  <thead>
-    <tr>
-      <th>Name</th>
-      <th>Surname</th>
-      <th>Alias</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td data-label="Name">Chad</td>
-      <td data-label="Surname">Wilberts</td>
-      <td data-label="Alias">MrOne</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Adam</td>
-      <td data-label="Surname">Smith</td>
-      <td data-label="Alias">TheSmith</td>
-    </tr>
-    <tr>
-      <td data-label="Name">Sophia</td>
-      <td data-label="Surname">Canderson</td>
-      <td data-label="Alias">Candee</td>
-    </tr>
-  </tbody>
-</table>
-
-
-
-

Notes

-
    -
  • Due to .horizontal tables utilizing the Flexbox Layout, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.
  • -
  • Mixing the Flexible Layout Module with <table> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with .horizontal tables, feel free to submit a new issue on GitHub.
  • -
-
-
-
-
<table class="horizontal scrollable">
-  <!-- Bad table -->
-  <thead>
-    <!-- ... -->
-  </thead>
-  <tbody>
-    <!-- ... -->
-  </tbody>
-</table>
-

Don't: Avoid comibing the .horizontal and .scrollable classes on the same element, as this can cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Table variants & matrices

-
-
-

- - - - - - - - -
Star Wars Character Alignment Table
LawfulNeutralChaotic
GoodYodaLuke SkywalkerChewbacca
NeutralC-3POBoba FettHan Solo
BadDarth VaderEmperor PalpatineJabba the Hutt

-
-
-
-

Tables are responsive by default, however you can disable this functionality for one or more tables (normal or .horizontal), using the .preset class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <th> elements inside the <tbody> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the .striped class.

-

Sample code

-

The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on Show sample code below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.


-
- - -
-
<table class="preset">
-  <caption>Star Wars Character Alignment Table</caption>
-  <tbody>
-    <tr>
-      <th></th>
-      <th>Lawful</th>
-      <th>Neutral</th>
-      <th>Chaotic</th>
-    </tr>
-    <tr>
-      <th>Good</th>
-      <td>Yoda</td>
-      <td>Luke Skywalker</td>
-      <td>Chewbacca</td>
-    </tr>
-    <tr>
-      <th>Neutral</th>
-      <td>C-3PO</td>
-      <td>Boba Fett</td>
-      <td>Han Solo</td>
-    </tr>
-    <tr>
-      <th>Bad</th>
-      <td>Darth Vader</td>
-      <td>Emperor Palpatine</td>
-      <td>Jabba the Hutt</td>
-    </tr>
-  </tbody>
-</table>
-
-<table class="striped">
-  <caption>People</caption>
-  <thead>
-    <!-- ... -->
-  </thead>
-  <tbody>
-    <!-- ... -->
-  </tbody>
-</table>

-
-
-
-

Notes

-
    -
  • Making a table .striped also affects the color of the cards in their responsive view on mobile devices.
  • -
  • If you create a .preset table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the data-label attributes.
  • -

-
-
-
<style>
-  .border-fix > td, .border-fix > th {
-    border-top: 0;
-  }
-</style>
-
-<table class="preset">
-  <tbody>
-    <tr class="border-fix">
-    <!-- ... -->
-    </tr>
-    <!-- ... -->
-  </tbody>
-</table>
-

Do: The first row in a preset matrix table or any table without a <thead> element will have an extra border at the top. You can use a generic class to set border-top: 0; for the elements inside that row to fix this.

-
-
-
<table class="horizontal preset">
-  <!-- ... ->
-</table>
-<!-- or -->
-<table class="horizontal striped">
-  <!-- ... ->
-</table>
-<!-- or -->
-<table class="preset striped">
-  <!-- ... ->
-</table>
-<!-- or -->
-<table class="preset horizontal striped">
-  <!-- ... ->
-</table>
-

Do: You can combine any two of the following classes without any problems: .horizontal, .preset, .striped. Just make sure you respect each one's specific rules.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Table + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Table

+

The table module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Presenting information the right way is very important, especially so when dealing with large amounts of data. The table module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.


+
+
+

Quick start

+

To use the table module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Basic syntax & responsiveness

+
+
+
+

Medium/Large screen layout


+ + + + + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
+
+

Small screen layout


+ + + + + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
+
+
+
+
+

Table layout utilizes the <table> HTML element with the following structure (usual tabular structure):

+
    +
  1. On the outermost level, there is the <table> element.
  2. +
  3. If you want to include a <caption> element, it must by the first element inside the <table> element.
  4. +
  5. Following the above, you need to add a <thead> element. Inside it, you should usually add one <tr> element, which contains one or more <th> elements.
  6. +
  7. Immediately after the <thead> element, you can add a <tfoot> element, if you want to. Inside it, you should usually add one or more <tr> elements, which contain one or more <td> elements.
  8. +
  9. Finally, add your <tbody> element. Inside it, you should usually add one or more <tr> elements, which contain one or more <td> elements. For each <td> element, specify a data-label attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.
  10. +
+

Sample code

+
<table>
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+
+

Notes

+
    +
  • Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.
  • +
  • Specifying the data-label attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.
  • +
  • We strongly suggest you avoid adding multiple rows in your <thead> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check this codepen for an idea on how to deal with irregular border styling.
  • +

+
+
+
<tr>
+  <td>Chad</td>
+  <td>Wilberts</td>
+  <td>MrOne</td>
+</tr>
+

Don't: Remember to always add a data-label attribute to your <td> elements, as the table's card view is very dependent on them to display properly. <th> elements, however, do not require or utilize this attribute.

+
+
+
<table>
+  <caption>People</caption>
+  <thead>
+    <!-- ... -->
+  </thead>
+  <tbody>
+    <!-- ... -->
+  </tbody>
+  <tfoot>
+    <!-- ... -->
+  </tfoot>
+</table>
+

Don't: The <tfoot> element must always be immediately after the <thead> element, if included.

+
+
+
<tbody>
+  <tr>
+    <th>Name</th>
+    <td data-label="Name">Chad</td>
+  </tr>
+</tbody>
+

Don't: Avoid inserting <th> elements inside your <tbody> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.

+
+
+
<thead>
+  <tr>
+    <td data-label="Name">Chad</td>
+  </tr>
+</thead>
+

Don't: Avoid using <td> elements inside your <thead>. You should use a <tbody> element instead.

+
+
+
+
+
+
+
+
+
+
+

Scrollable tables

+
+
+
+
+
+ + + + + + + + + + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom
MarkGerkisMarkie
JohnFergussonFergujohn
SylviaPouleauSylver
NormanJonesNormalJones
TrevorHeidelHeidi

+
+
+
+

Scrollable tables can be created by simply adding the .scrollable class to the root element of your table (i.e. the <table> element). Scrollable tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the data-label attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that .horizontal tables do not support the <tfoot> element.

+

Sample code

+
<table class="scrollable">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+
+

Notes

+
    +
  • Due to .scrollable tables utilizing the Flexbox Layout, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.
  • +
  • Mixing the Flexible Layout Module with <table> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with .scrollable tables, feel free to submit a new issue on GitHub.
  • +
  • .scrollable tables have a default maximum height of 400px. If you want to change this, you should check out the customization page.
  • +
+
+
+
+
<table class="scrollable">
+  <!-- ... -->
+  <tfoot>
+    <!-- Do not do this! -->
+  </tfoot>
+  <!-- ... -->
+</table>
+

Don't: We already explicitly stated that, due to the way .scrollable tables are styled, the <tfoot> element is not supported. Please refer to the last section of this page if you need to use this element and you want to have a scrollable table layout.

+
+
+
+
+
+
+
+
+
+
+

Horizontal tables

+
+
+
+
+
+ + + + + + + + + + +
People
NameSurnameAlias
ChadWilbertsMrOne
AdamSmithTheSmith
SophiaCandersonCandee
NickThomsonNickThom

+
+
+
+

Scrollable tables are very similar to horizontal ones and can be created by simply adding the .scrollable class to the root element of your table (i.e. the <table> element). Similarly to horizontal ones, they can accommodate as many data rows as you like, making their overflow scrollable, while they do not support the <tfoot> element. As usual, remember to add the data-label attribute, as shown in the previous section, to allow your tables to be responsive without any errors.

+

Sample code

+
<table class="horizontal">
+  <caption>People</caption>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Surname</th>
+      <th>Alias</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td data-label="Name">Chad</td>
+      <td data-label="Surname">Wilberts</td>
+      <td data-label="Alias">MrOne</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Adam</td>
+      <td data-label="Surname">Smith</td>
+      <td data-label="Alias">TheSmith</td>
+    </tr>
+    <tr>
+      <td data-label="Name">Sophia</td>
+      <td data-label="Surname">Canderson</td>
+      <td data-label="Alias">Candee</td>
+    </tr>
+  </tbody>
+</table>
+
+
+
+

Notes

+
    +
  • Due to .horizontal tables utilizing the Flexbox Layout, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.
  • +
  • Mixing the Flexible Layout Module with <table> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with .horizontal tables, feel free to submit a new issue on GitHub.
  • +
+
+
+
+
<table class="horizontal scrollable">
+  <!-- Bad table -->
+  <thead>
+    <!-- ... -->
+  </thead>
+  <tbody>
+    <!-- ... -->
+  </tbody>
+</table>
+

Don't: Avoid comibing the .horizontal and .scrollable classes on the same element, as this can cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Table variants & matrices

+
+
+

+ + + + + + + + +
Star Wars Character Alignment Table
LawfulNeutralChaotic
GoodYodaLuke SkywalkerChewbacca
NeutralC-3POBoba FettHan Solo
BadDarth VaderEmperor PalpatineJabba the Hutt

+
+
+
+

Tables are responsive by default, however you can disable this functionality for one or more tables (normal or .horizontal), using the .preset class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <th> elements inside the <tbody> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the .striped class.

+

Sample code

+

The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on Show sample code below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.


+
+ + +
+
<table class="preset">
+  <caption>Star Wars Character Alignment Table</caption>
+  <tbody>
+    <tr>
+      <th></th>
+      <th>Lawful</th>
+      <th>Neutral</th>
+      <th>Chaotic</th>
+    </tr>
+    <tr>
+      <th>Good</th>
+      <td>Yoda</td>
+      <td>Luke Skywalker</td>
+      <td>Chewbacca</td>
+    </tr>
+    <tr>
+      <th>Neutral</th>
+      <td>C-3PO</td>
+      <td>Boba Fett</td>
+      <td>Han Solo</td>
+    </tr>
+    <tr>
+      <th>Bad</th>
+      <td>Darth Vader</td>
+      <td>Emperor Palpatine</td>
+      <td>Jabba the Hutt</td>
+    </tr>
+  </tbody>
+</table>
+
+<table class="striped">
+  <caption>People</caption>
+  <thead>
+    <!-- ... -->
+  </thead>
+  <tbody>
+    <!-- ... -->
+  </tbody>
+</table>

+
+
+
+

Notes

+
    +
  • Making a table .striped also affects the color of the cards in their responsive view on mobile devices.
  • +
  • If you create a .preset table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the data-label attributes.
  • +

+
+
+
<style>
+  .border-fix > td, .border-fix > th {
+    border-top: 0;
+  }
+</style>
+
+<table class="preset">
+  <tbody>
+    <tr class="border-fix">
+    <!-- ... -->
+    </tr>
+    <!-- ... -->
+  </tbody>
+</table>
+

Do: The first row in a preset matrix table or any table without a <thead> element will have an extra border at the top. You can use a generic class to set border-top: 0; for the elements inside that row to fix this.

+
+
+
<table class="horizontal preset">
+  <!-- ... ->
+</table>
+<!-- or -->
+<table class="horizontal striped">
+  <!-- ... ->
+</table>
+<!-- or -->
+<table class="preset striped">
+  <!-- ... ->
+</table>
+<!-- or -->
+<table class="preset horizontal striped">
+  <!-- ... ->
+</table>
+

Do: You can combine any two of the following classes without any problems: .horizontal, .preset, .striped. Just make sure you respect each one's specific rules.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/v2/utility.html b/docs/v2/utility.html index 3515047..5204830 100644 --- a/docs/v2/utility.html +++ b/docs/v2/utility.html @@ -1,350 +1,350 @@ - - - - - - mini.css - Utility - - - - - - - - - - - -
- - - - - -  GitHub -
-
-
-
-
-
-

Utility

-

The utility module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.

-

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


-
-
-
-
-
-
-

Quick overview

-

Every website or app has different needs and no CSS framework can predict them all. The utility module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.


-
-
-

Quick start

-

To use the utility module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

-
<meta name="viewport" content="width=device-width, initial-scale=1">

-
-
-
-
-
-
-
-

Visibility helpers

-
-
-

You can hide content for all your users, using the default hidden attribute. However, we provide you with the .hidden class for the same purpose, as well as the .visually-hidden class which will make your content hidden, except for screen readers.

-

Sample code

-
<span class="hidden">Hidden text</span>
-<span class="visually-hidden">Screen-reader-only text</span>
-
-
-
-

Notes

-
    -
  • Both classes utilize !important declarations, so be careful when and how to use them.
  • -

-
-
-
<span class="hidden visually-hidden">Not a good idea</span>
-

Don't: Avoid using both classes at the same time. Instead, use .hidden to hide content for all users, .visually-hidden to hide it for non-screen-reader users or aria-hidden="true" to hide it for screen-reader-only users.

-
-
-
-
-
-
-
-
-
-

Generic borders & shadows

-
-
-
-
-

This is a paragraph with a piece of bordered text.

-
-

image  image


-

This is an element that casts a shadow.


-
-
-
-

Use the .bordered class to apply a generic black border with 25% opacity to any element. Apart from that you can use the .rounded and .circular classes to create generic border radiuses. Finally, you can use the .shadowed class to add a generic box-shadow to any element.

-

Sample code

-
<span class="bordered">Bordered</span>
-<span class="rounded">Rounded</span>
-<span class="circular">Circular</span>
-<span class="shadowed">Casts shadow</span>
-
-
-
-

Notes

-
    -
  • All of these classes utilize !important declarations, so be careful when and how to use them.
  • -
  • The .bordered class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.
  • -
  • All of the above classes can be used with most modern HTML elements.
  • -

-
-
-
<span class="bordered rounded shadow-small">Stylized element</span>
-

Do: You can combine a generic border with any border radius or shadow or even both.

-
-
-
<span class="rounded circular">Bad radius</span>
-<!-- or -->
-<span class="shadow-small shadow-large">Bad shadow</span>
-

Don't: Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.

-
-
-
-
-
-
-
-
-
-

Responsive sizing & spacing classes

-
-
-

Helper classes for the padding and margin attributes are provided in the form of .responsive-margin and .responsive-padding classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.

-

Sample code

-
<div class="responsive-padding">Responsive padding</div>
-<div class="responsive-margin">Responsive margin</div>
-
-
-
-

Notes

-
    -
  • If the default values of these classes are not suited to your needs, check out the customization page.
  • -
  • Both classes utilize !important declarations, so be careful when and how to use them.
  • -

-
-
-
<div class="responsive-padding responsive-margin">Responsive padding and margin</div>
-

Do: You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.

-
-
-
-
-
-
-
-
-
-

Responsive visibility helpers

-
-
-

You can hide content (either fully or only visually) for certain screens, using the responsive visibility helpers. To hide elements completely use the .hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens). If you want to hide certains elements for all users, except screen readers, replace .hidden with .visually-hidden, followed by the screen size name.

-

Sample code

-
<span class="hidden-sm">Hidden in smaller screens</span>
-<span class="hidden-md">Hidden in medium-sized screens</span>
-<span class="hidden-lg">Hidden in larger screens</span>
-
-<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
-<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
-<span class="visually-hidden-lg">Visually hidden in larger screens</span>
-
-
-
-

Notes

-
    -
  • Responsive visibility helper classes utilize !important declarations, so be careful when and how to use them.
  • -
  • The specific breakpoints for small, medium and large screen sizes are as follows: -
      -
    • small: less than 768px wide
    • -
    • medium: more than or equal to 768px wide but less than 1280px wide
    • -
    • large: 1280px wide or more
    • -
    -
  • -
  • Responsive visibility helper classes are independent, meaning that hiding an element in one screen size will not affect it visibility in any other screen size.
  • -

-
-
-
<span class="hidden-sm hidden-md">Hidden in smaller and medium-sized screens, visible in larger screens</span>
-<!-- or -->
-<span class="visually-hidden-md visually-hidden-lg">Visually hidden in medium-sized and larger screens, visible in smaller screens</span>
-<!-- or -->
-<span class="hidden-sm visually-hidden-lg">Hidden in smaller screens, visually hidden in larger screens, visible in medium-sized screens</span>
-

Do: You can combine responsive visibility helpers for different sizes, based on your needs.

-
-
-
<span class="hidden-sm visually-hidden-sm">Not a good idea</span>
-

Don't: Avoid combining responsive visibility helpers for the same screen size. Combining both of them might cause unexpected behavior.

-
-
-
-
-
-
- -
-
-
-

Close icon

-
-
-
-
-

    

-
-
-
-
-

To create a close icon, simply add an element implementing the .close class.

-

Sample code

-
<span class="close"></span>
-
-
-
-

Notes

-
    -
  • The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.
  • -

-
-
-
<div class="close"></div>
-

Do: You can use a handful of other HTML elements instead of the <span> element showcased in the example above, most commonly <div> elements.

-
-
-
<button class="close"></button>
-

Do: If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the .close class to a <button> element instead. You can even apply any of the button color variant classes.

-
-
-
-
-
-
-
-
-

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

-
-
-
- - - + + + + + + mini.css - Utility + + + + + + + + + + + +
+ + + + + +  GitHub +
+
+
+
+
+
+

Utility

+

The utility module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.

+

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.


+
+
+
+
+
+
+

Quick overview

+

Every website or app has different needs and no CSS framework can predict them all. The utility module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.


+
+
+

Quick start

+

To use the utility module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:

+
<meta name="viewport" content="width=device-width, initial-scale=1">

+
+
+
+
+
+
+
+

Visibility helpers

+
+
+

You can hide content for all your users, using the default hidden attribute. However, we provide you with the .hidden class for the same purpose, as well as the .visually-hidden class which will make your content hidden, except for screen readers.

+

Sample code

+
<span class="hidden">Hidden text</span>
+<span class="visually-hidden">Screen-reader-only text</span>
+
+
+
+

Notes

+
    +
  • Both classes utilize !important declarations, so be careful when and how to use them.
  • +

+
+
+
<span class="hidden visually-hidden">Not a good idea</span>
+

Don't: Avoid using both classes at the same time. Instead, use .hidden to hide content for all users, .visually-hidden to hide it for non-screen-reader users or aria-hidden="true" to hide it for screen-reader-only users.

+
+
+
+
+
+
+
+
+
+

Generic borders & shadows

+
+
+
+
+

This is a paragraph with a piece of bordered text.

+
+

image  image


+

This is an element that casts a shadow.


+
+
+
+

Use the .bordered class to apply a generic black border with 25% opacity to any element. Apart from that you can use the .rounded and .circular classes to create generic border radiuses. Finally, you can use the .shadowed class to add a generic box-shadow to any element.

+

Sample code

+
<span class="bordered">Bordered</span>
+<span class="rounded">Rounded</span>
+<span class="circular">Circular</span>
+<span class="shadowed">Casts shadow</span>
+
+
+
+

Notes

+
    +
  • All of these classes utilize !important declarations, so be careful when and how to use them.
  • +
  • The .bordered class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.
  • +
  • All of the above classes can be used with most modern HTML elements.
  • +

+
+
+
<span class="bordered rounded shadow-small">Stylized element</span>
+

Do: You can combine a generic border with any border radius or shadow or even both.

+
+
+
<span class="rounded circular">Bad radius</span>
+<!-- or -->
+<span class="shadow-small shadow-large">Bad shadow</span>
+

Don't: Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.

+
+
+
+
+
+
+
+
+
+

Responsive sizing & spacing classes

+
+
+

Helper classes for the padding and margin attributes are provided in the form of .responsive-margin and .responsive-padding classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.

+

Sample code

+
<div class="responsive-padding">Responsive padding</div>
+<div class="responsive-margin">Responsive margin</div>
+
+
+
+

Notes

+
    +
  • If the default values of these classes are not suited to your needs, check out the customization page.
  • +
  • Both classes utilize !important declarations, so be careful when and how to use them.
  • +

+
+
+
<div class="responsive-padding responsive-margin">Responsive padding and margin</div>
+

Do: You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.

+
+
+
+
+
+
+
+
+
+

Responsive visibility helpers

+
+
+

You can hide content (either fully or only visually) for certain screens, using the responsive visibility helpers. To hide elements completely use the .hidden-SCR_SZ syntax, replacing SCR_SZ with one of the available screen size names (sm for smaller screens, md for medium-sized screens or lg for larger screens). If you want to hide certains elements for all users, except screen readers, replace .hidden with .visually-hidden, followed by the screen size name.

+

Sample code

+
<span class="hidden-sm">Hidden in smaller screens</span>
+<span class="hidden-md">Hidden in medium-sized screens</span>
+<span class="hidden-lg">Hidden in larger screens</span>
+
+<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
+<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
+<span class="visually-hidden-lg">Visually hidden in larger screens</span>
+
+
+
+

Notes

+
    +
  • Responsive visibility helper classes utilize !important declarations, so be careful when and how to use them.
  • +
  • The specific breakpoints for small, medium and large screen sizes are as follows: +
      +
    • small: less than 768px wide
    • +
    • medium: more than or equal to 768px wide but less than 1280px wide
    • +
    • large: 1280px wide or more
    • +
    +
  • +
  • Responsive visibility helper classes are independent, meaning that hiding an element in one screen size will not affect it visibility in any other screen size.
  • +

+
+
+
<span class="hidden-sm hidden-md">Hidden in smaller and medium-sized screens, visible in larger screens</span>
+<!-- or -->
+<span class="visually-hidden-md visually-hidden-lg">Visually hidden in medium-sized and larger screens, visible in smaller screens</span>
+<!-- or -->
+<span class="hidden-sm visually-hidden-lg">Hidden in smaller screens, visually hidden in larger screens, visible in medium-sized screens</span>
+

Do: You can combine responsive visibility helpers for different sizes, based on your needs.

+
+
+
<span class="hidden-sm visually-hidden-sm">Not a good idea</span>
+

Don't: Avoid combining responsive visibility helpers for the same screen size. Combining both of them might cause unexpected behavior.

+
+
+
+
+
+
+ +
+
+
+

Close icon

+
+
+
+
+

    

+
+
+
+
+

To create a close icon, simply add an element implementing the .close class.

+

Sample code

+
<span class="close"></span>
+
+
+
+

Notes

+
    +
  • The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.
  • +

+
+
+
<div class="close"></div>
+

Do: You can use a handful of other HTML elements instead of the <span> element showcased in the example above, most commonly <div> elements.

+
+
+
<button class="close"></button>
+

Do: If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the .close class to a <button> element instead. You can even apply any of the button color variant classes.

+
+
+
+
+
+
+
+
+

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.

+
+
+
+ + + diff --git a/docs/vinf.js b/docs/vinf.js index da58039..f0f22ab 100644 --- a/docs/vinf.js +++ b/docs/vinf.js @@ -1,4 +1,4 @@ -// Get the current version of the Gluon branch. -module.exports = { - version: 'v3.0.0-alpha.3' -} +// Get the current version of the Gluon branch. +module.exports = { + version: 'v3.0.0-alpha.3' +} diff --git a/src/_v2/flavors/mini-dark.scss b/src/_v2/flavors/mini-dark.scss index 93237be..db6fd7e 100644 --- a/src/_v2/flavors/mini-dark.scss +++ b/src/_v2/flavors/mini-dark.scss @@ -1,644 +1,644 @@ -// This is a flavor file. Duplicate it and edit it to create your own flavor. Read instructions carefully. -// Single-line comments, starting with '//' will not be included in your final CSS file. Multiline comments, -// structured like the flavor description below, will be included in your final CSS file. -/* - Flavor name: Dark (mini-dark) - Author: Angelos Chalaris (chalarangelo@gmail.com) - Maintainers: Angelos Chalaris - mini.css version: v2.3.7 -*/ -// Basic rules for body and typography -$fore-color: #d0d0d0; // Text and general foreground color -$back-color: #232e33; // Body background color -$base-font-family: // Default font stack for all elements: - '-apple-system, BlinkMacSystemFont,\"Segoe UI\",\"Roboto\", \"Droid Sans\",\"Helvetica Neue\", Helvetica, Arial, sans-serif'; -// OS X and iOS system fonts (San Francisco) -> Windows system fonts -> Android system fonts (newer and older) -> Fallback fonts -$base-root-font-size: 16px; // Root font sizing for all elements [1] -$_1px: (1px/$base-root-font-size) * 1rem; // Calculated rem value of 1px [1] -$base-font-size: 1rem; // Default font sizing for all elements [2] -$base-line-height: 1.5; // Default line height for all elements. -$use-fluid-typography: false; // Should fluid typography be used at the root element? (`true`/`false`) -$body-margin: 0; // Margin for the body -$apply-defaults-to-all: true; // Should default values be applied to all elements? (`true` or `false`) [3] -$h1-font-size: 2rem; // Font size of h1 -$h2-font-size: 1.6875rem; // Font size for h2 -$h3-font-size: 1.4375rem; // Font size for h3 -$h4-font-size: 1.1875rem; // Font size for h4 -$h5-font-size: 1rem; // Font size for h5 -$h6-font-size: 0.8125rem; // Font size for h6 -$heading-line-height: 1.2em; // Line height for all headings -$heading-margin: 0.75rem 0.5rem; // Margin for all headings -$heading-font-weight: 500; // Font weight for all headings -$heading-smalltext-fore-color: #acacac; // color in headings -$make-heading-smalltext-block: true; // Should elements in headings be displayed as blocks (`true`/`false`) [4] -$heading-smalltext-b-font-size: 0.75em; // Font size of block elements in headings -$heading-smalltext-b-top-margin:-0.25rem; // Top margin of block elements in headings -$paragraph-margin: 0.5rem; // Margin for

elements -$list-margin: 0.5rem; // Margin for

    and