diff --git a/CNAME b/CNAME deleted file mode 100644 index 21bcedb..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -mvcss.io diff --git a/about/index.html b/about/index.html deleted file mode 100644 index b81488c..0000000 --- a/about/index.html +++ /dev/null @@ -1,23 +0,0 @@ - About / MVCSS
Toggle

About

In the beginning, MVCSS was created by Nick Walsh and Drew Barontini as a means of formalizing their individual CSS methods. With version one of MVCSS, the ideas of contextual changes throughout a site were tied closely to the MVC, or Model View Controller, pattern, where higher-level body classes were applied for the Controller/View of the given page. This worked at first, but quickly grew unwiedly, and began to feel like an anti-pattern for how we should be writing our CSS. The change was made in version two, and, through the preceding versions, iteratively evolved MVCSS into a more mature framework.

The Team

Now, the front-end teams using and contributing to MVCSS are split across two companies, Envy and Code School. Their shared experiences working across a vast array of large-scale client and product-based applications have helped to shape MVCSS into what it is today.

Envy

Code School

\ No newline at end of file diff --git a/application/index.html b/application/index.html new file mode 100644 index 0000000..ed59cc1 --- /dev/null +++ b/application/index.html @@ -0,0 +1,118 @@ + + + + + + + Application / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Application

+ +

The application consists of one file, application.sass, and it acts as the loader file for MVCSS. The file consists of imports and the inbox.

+ +

Imports

+ + + +

Note: Compass provides utilities and niceties to make your life easier. We use it, and we recommend that you give it a try.

+ +

Inbox

+ +

The inbox allows developers, and those not actively working on the CSS, to quickly add styles that are easily seen by the maintainer of the file. This section of the Application has worked wonders for us.

+
+ + + + + diff --git a/assets/images/logo-envy.svg b/assets/images/logo-envy.svg deleted file mode 100644 index 9372e69..0000000 --- a/assets/images/logo-envy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js deleted file mode 100644 index eb41573..0000000 --- a/assets/javascripts/application.js +++ /dev/null @@ -1 +0,0 @@ -(function(){this.Leo={},this.Leo.Pager={},Leo.headingLinks=function(e){return e.els.each(function(){var e,n;return e=$(this),n=Leo.slugify(e.text()),e.attr("id",n),e.prepend("#")})},Leo.readTime=function(e){var n;return n=Math.ceil(e.text.split(" ").length/e.wordsPerMinute),e.element.append(""+n+" minute read")},Leo.Pager=function(){var e,n,t,s,o,i,u,r;return o=0,i=[],r={next:39,prev:37},s=function(e){return o=e,n(),u(),console.log(o)},n=function(){return i.push("/"),i.push("/styleguide/"),i.push("/styleguide/basics/"),i.push("/styleguide/numbers-game/"),i.push("/styleguide/comments/"),i.push("/styleguide/naming/"),i.push("/manifest/"),i.push("/foundation/"),i.push("/foundation/reset/"),i.push("/foundation/helpers/"),i.push("/foundation/config/"),i.push("/foundation/base/"),i.push("/foundation/tools/"),i.push("/components/"),i.push("/structures/"),i.push("/vendor/"),i.push("/about/"),i.push("/resources/")},u=function(){return $(document).on("keydown",function(n){switch(e(n)){case r.next:return t("next");case r.prev:return t("prev")}})},e=function(e){var n;return e=e||window.event,n=e.keyCode||e.which},t=function(e){switch(e){case"next":if(o!==i.length-1)return window.location=i[o+1];break;case"prev":if(0!==o)return window.location=i[o-1]}},{init:s}}(),Leo.slugify=function(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},jQuery(function(e){return Leo.headingLinks({els:e("h2, h3, h4, h5, h6")}),Leo.Pager.init(e("body").data("id")),e(".toggle").on("click",function(n){return n.preventDefault(),e(this).toggleClass("is-active"),e("body").toggleClass("is-sidebar-open"),e(".sidebar").toggleClass("is-open")}),e(document).on("keyup",function(n){switch(n.which){case 83:return e(".toggle").toggleClass("is-active"),e("body").toggleClass("is-sidebar-open"),e(".sidebar").toggleClass("is-open")}})})}).call(this); \ No newline at end of file diff --git a/assets/stylesheets/application.css b/assets/stylesheets/application.css index 86351ab..5851f94 100644 --- a/assets/stylesheets/application.css +++ b/assets/stylesheets/application.css @@ -1 +1 @@ -/*! normalize.css v3.0.0 | MIT License | git.io/normalize */@import url("http://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700");@import url("http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700");html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{background:#ecf0f1;color:#444;font-family:"Roboto Slab", serif;font-size:16px;line-height:1.6}body{font-size:100%}body.is-sidebar-open{overflow-y:hidden;position:fixed}@media screen and (min-width: 50em){body.is-sidebar-open{position:static}}.content{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform 0.3s ease-in-out;transition:-webkit-transform 0.3s ease-in-out;transition:-moz-transform 0.3s ease-in-out;transition:-ms-transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;margin-bottom:5em;padding-top:0.3125em}.is-sidebar-open .content{-webkit-transform:translateX(17.1875em);-ms-transform:translateX(17.1875em);transform:translateX(17.1875em)}@media screen and (min-width: 50em){.is-sidebar-open .content{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}@media screen and (min-width: 50em){.content{margin-left:17.1875em}}ul,ol,p{margin-bottom:1.25em;margin-top:0}ul,ol{padding-left:2.5em}li{margin-bottom:0.625em;margin-top:0}li>ul,li>ol{margin-top:0.625em}blockquote{color:#b5b5c0;font-style:italic;margin-bottom:1.25em;margin-left:1.25em;margin-top:0}pre,code{font-family:Courier, monospace}pre{margin-bottom:1.25em}h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{font-family:"Roboto Slab", serif;font-weight:bold;line-height:1.2;margin-bottom:0.625em;margin-top:1.25em}@media screen and (min-width: 50em){h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{margin-top:0}}@media screen and (min-width: 68.75em){h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{margin-top:1.25em}}h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{position:relative}@media screen and (min-width: 68.75em){h2:hover>a,.h2:hover>a,h3:hover>a,.h3:hover>a,h4:hover>a,.h4:hover>a,h5:hover>a,.h5:hover>a,h6:hover>a,.h6:hover>a{display:block}}h1,.h1{font-size:200%}h1>b,.h1>b{color:#b5b5c0;display:block;font-size:50%;font-weight:normal;margin-top:0.3125em}h2,.h2{border-bottom:2px solid #ccd4d5;font-size:150%;margin-bottom:1.25em;margin-top:2.5em;padding-bottom:0.3125em}h3,.h3{font-size:125%}h4,.h4{font-size:110%}h5,.h5{font-size:115%}h6,.h6{font-size:105%}a{border-bottom:2px solid #ccd4d5;color:#4e4e5b;text-decoration:none;transition:all 0.3s ease-in-out}a:hover,a:focus{border-bottom-color:#4e4e5b;color:#4e4e5b}img{height:auto;max-width:100%}.bucket--flag{display:table}.bucket--flag .bucket-content{vertical-align:middle}.bucket-content{display:table-cell;width:10000px}.bucket-media{float:left;margin-right:1.25em}.bucket-media>img{display:block;max-width:none}.card,pre,code,img{background:#fff;border-radius:3px;box-shadow:0 2px 0 rgba(51,51,51,0.25);padding:1.25em;position:relative}.card--thin,code{box-shadow:none;padding:0.25em 0.5em}.cell{margin-left:auto;margin-right:auto;max-width:46.875em;position:relative;max-width:64.0625em}.row{overflow:hidden;padding:0 1.25em}.row--a{background:#fff}@media screen and (min-width: 50em){.well{margin-bottom:1.25em;margin-top:1.25em}}.well--l{margin-bottom:2.5em;margin-top:2.5em}.anchor{border:0;display:none;bottom:0;left:-1.25em;padding-left:1.25em;padding-right:1.25em;margin-left:-1.25em;position:absolute;top:0}.header{background:#363640;height:auto;padding:1.25em;position:relative;text-align:center}.header-logo{background:none;border-radius:0;box-shadow:none;display:block;padding:0;position:static}.header-title{margin:0;text-transform:uppercase}.header-title>a{border:0;color:#fff}.header-title>a:hover,.header-title>a:focus{color:#b5b5c0}.header-version{color:#b5b5c0;font-weight:300;margin-bottom:0}.pager{border-top:2px solid #ccd4d5;margin:0;padding:0;margin-top:5em;padding-top:1.25em;text-align:center}.pager-item{display:inline;list-style-type:none;margin-right:1.25em}.pager-item:last-child{margin-right:0}.sidebar{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform 0.3s ease-in-out;transition:-webkit-transform 0.3s ease-in-out;transition:-moz-transform 0.3s ease-in-out;transition:-ms-transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;background:#4e4e5b;bottom:0;left:0;overflow:scroll;position:fixed;top:0;width:17.1875em;z-index:10}@media screen and (min-width: 50em){.sidebar{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.sidebar.is-open{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.sidebar-btn{background:#666676;border-color:#363640;border-radius:3px;color:#fff;display:block;line-height:2.5;margin:0.625em;padding:0 1.25em;text-align:center}.sidebar-btn:hover,.sidebar-btn:focus{background:#717184;border-color:#363640;color:#fff}.sidebar-label{border-bottom:2px solid #363640;color:#ecf0f1;font-size:85%;font-weight:normal;letter-spacing:0.1em;margin:0;padding:0 1.25em 0.625em;text-transform:uppercase}.sidebar-link{border:0;color:#b5b5c0;display:block;font-family:"Roboto Slab", serif;font-size:85%;padding:0.625em 1.25em}.sidebar-link:hover,.sidebar-link:focus{background:#363640;color:#fff}.sidebar-link--sub{padding-left:2.5em}.sidebar-link.is-active{background:#ecf0f1;color:#444}.sidebar-nav-sub{background:#42424d;display:none}.sidebar-nav-sub.is-active{display:block}.toggle{border:0;height:15px;left:1.25em;position:absolute;top:1.25em;-webkit-backface-visibility:hidden;width:24px;z-index:20}@media screen and (min-width: 50em){.toggle{display:none}}@media screen and (min-width: 50em){.toggle{position:fixed}}.toggle.is-active{left:18.4375em}.toggle.is-active .toggle-icn-stack{background:none}.toggle.is-active .toggle-icn-stack::before,.toggle.is-active .toggle-icn-stack::after{-webkit-transition:all 0.3s 0.2s ease-in-out;transition:all 0.3s 0.2s ease-in-out;top:0}.toggle.is-active .toggle-icn-stack::before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.toggle.is-active .toggle-icn-stack::after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.toggle-icn{border:0;display:block;height:15px;position:absolute;right:0;-webkit-backface-visibility:hidden;width:24px}.toggle-icn-stack{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;background:#b5b5c0;display:block;height:3px;margin-top:3px;width:24px}.toggle-icn-stack::before,.toggle-icn-stack::after{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;background:#b5b5c0;content:"";display:block;height:3px;position:absolute;width:24px;z-index:0}.toggle-icn-stack::before{top:-3px}.toggle-icn-stack::after{top:9px}.hll{background-color:#ffffcc}.c{color:#999988;font-style:italic}.err{color:#a61717;background-color:#e3d2d2}.k{color:#000000;font-weight:bold}.o{color:#000000;font-weight:bold}.cm{color:#999988;font-style:italic}.cp{color:#999999;font-weight:bold;font-style:italic}.c1{color:#999988;font-style:italic}.cs{color:#999999;font-weight:bold;font-style:italic}.gd{color:#000000;background-color:#ffdddd}.ge{color:#000000;font-style:italic}.gr{color:#aa0000}.gh{color:#999999}.gi{color:#000000;background-color:#ddffdd}.go{color:#888888}.gp{color:#555555}.gs{font-weight:bold}.gu{color:#aaaaaa}.gt{color:#aa0000}.kc{color:#000000;font-weight:bold}.kd{color:#000000;font-weight:bold}.kn{color:#000000;font-weight:bold}.kp{color:#000000;font-weight:bold}.kr{color:#000000;font-weight:bold}.kt{color:#445588;font-weight:bold}.m{color:#009999}.s{color:#d01040}.na{color:#008080}.nb{color:#0086B3}.nc{color:#445588;font-weight:bold}.no{color:#008080}.nd{color:#3c5d5d;font-weight:bold}.ni{color:#800080}.ne{color:#990000;font-weight:bold}.nf{color:#990000;font-weight:bold}.nl{color:#990000;font-weight:bold}.nn{color:#555555}.nt{color:#000080}.nv{color:#008080}.ow{color:#000000;font-weight:bold}.w{color:#bbbbbb}.mf{color:#009999}.mh{color:#009999}.mi{color:#009999}.mo{color:#009999}.sb{color:#d01040}.sc{color:#d01040}.sd{color:#d01040}.s2{color:#d01040}.se{color:#d01040}.sh{color:#d01040}.si{color:#d01040}.sx{color:#d01040}.sr{color:#009926}.s1{color:#d01040}.ss{color:#990073}.bp{color:#999999}.vc{color:#008080}.vg{color:#008080}.vi{color:#008080}.il{color:#009999}.boxSizing,.card,pre,code,img,.header,.sidebar{-moz-box-sizing:border-box;box-sizing:border-box}.group::after,.bucket::after{clear:both;content:"";display:table}.debug{background-color:pink !important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:"";display:block;width:0;height:150%}.srt{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.bch{background:#4e4e5b}.bci{background:#fff}.bcs{background:#b5b5c0}.db{display:block}.di{display:inline}.dib{display:inline-block}.dn{display:none}.maxs{margin:0.3125em}.mas{margin:0.625em}.mam{margin:1.25em}.mal{margin:2.5em}.maxl{margin:5em}.mbf{margin-bottom:0}.mbxs{margin-bottom:0.3125em}.mbs{margin-bottom:0.625em}.mbm{margin-bottom:1.25em}.mbl{margin-bottom:2.5em}.mbxl{margin-bottom:5em}.mhc{margin-left:auto;margin-right:auto}.mlf{margin-left:0}.mlxs{margin-left:0.3125em}.mls{margin-left:0.625em}.mlm{margin-left:1.25em}.mll{margin-left:2.5em}.mrf{margin-right:0}.mrxs{margin-right:0.3125em}.mrs{margin-right:0.625em}.mrm{margin-right:1.25em}.mrl{margin-right:2.5em}.mtf{margin-top:0}.mtxs{margin-top:0.3125em}.mts{margin-top:0.625em}.mtm{margin-top:1.25em}.mtl{margin-top:2.5em}.mtxl{margin-top:5em}.paxs{padding:0.3125em}.pas{padding:0.625em}.pam{padding:1.25em}.pal{padding:2.5em}.paxl{padding:5em}.pbf{padding-bottom:0}.pbxs{padding-bottom:0.3125em}.pbs{padding-bottom:0.625em}.pbm{padding-bottom:1.25em}.pbl{padding-bottom:2.5em}.pbxl{padding-bottom:5em}.plf{padding-left:0}.plxs{padding-left:0.3125em}.pls{padding-left:0.625em}.plm{padding-left:1.25em}.pll{padding-left:2.5em}.prf{padding-right:0}.prxs{padding-right:0.3125em}.prs{padding-right:0.625em}.prm{padding-right:1.25em}.prl{padding-right:2.5em}.ptf{padding-top:0}.ptxs{padding-top:0.3125em}.pts{padding-top:0.625em}.ptm{padding-top:1.25em}.ptl{padding-top:2.5em}.ptxl{padding-top:5em}.fl{float:left}.fr{float:right}.poa{position:absolute}.pof{position:fixed}.por{position:relative}.pos{position:static}.ra{border-radius:50%}.ram{border-radius:3px}.ran{border-radius:0}.tac{text-align:center}.tch{color:#4e4e5b}.tci{color:#fff}.tcs{color:#b5b5c0}.tct{color:#444}.tfb{font-family:"Roboto Slab", serif}.tfh{font-family:"Roboto Slab", serif}.tsxs{font-size:60%}.tss{font-size:75%}.tsm{font-size:90%}.tsl{font-size:115%}.tsxl{font-size:150%}.tsi{font-style:italic}.ttu{text-transform:uppercase}.twn{font-weight:normal}.twb{font-weight:bold} \ No newline at end of file +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}.c-logo:after{clear:both;content:"";display:table}html{font-size:16px}body{background:#ecf0f1;color:#444444;font-family:"Roboto Slab",serif;font-size:100%;line-height:1.6}@media screen and (min-width:768px){body{padding-left:18.75rem}}p{font-size:1rem;margin:0 0 1.25rem}pre,code,blockquote{font-size:90%}pre{margin:0 0 1.25rem;padding:.625rem}pre code{border:0;box-shadow:none;font-size:1rem}blockquote{font-size:100%;font-style:italic;color:#848484;margin:0 0 1.25rem;padding:.625rem .9375rem}blockquote p{margin:0}ul,ol{margin:0 0 1.25rem}ul ul,ul ol,ol ul,ol ol{margin-bottom:0}ul li,ol li{padding-bottom:.625rem}ul li:last-child,ol li:last-child{padding-bottom:0}ul li{list-style-type:square}a{-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-bottom:2px solid #9a9aa8;color:#4e4e5b;text-decoration:none}a:hover,a:focus{background:#dddddd;border-color:#4e4e5b}code{padding:.125rem .3125rem}img{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-radius:3px;height:auto;max-width:100%}h1,h2,h3,h4,h5,h6{font-weight:700;line-height:1.3;margin:2.5rem 0 .625rem}h1,.c-h1{font-size:2.5rem;margin:0 0 1.25rem}h2,.c-h2{font-size:1.875rem}h3,.c-h3{font-size:1.5625rem}h4,.c-h4{font-size:1.25rem}h5,.c-h5{font-size:1.125rem}.c-center{text-align:center}.c-condensed{font-size:85%}.c-lead{font-size:125%}.c-shout{text-transform:uppercase}.c-logo{font-size:1.875rem;padding:0 .625rem 1.25rem}@media screen and (min-height:875px){.c-logo{margin-bottom:1.25rem;padding-bottom:0}}.c-logo img{float:left}.c-logo b{float:left;font-size:2.5rem;line-height:1.875rem;margin-left:1.25rem;margin-top:2.5rem}.c-logo b span{color:#b5b5c0;display:block;font-size:40%;font-weight:300}.c-tagline{display:none;font-weight:300}@media screen and (min-height:875px){.c-tagline{display:block}}.l-cell{margin:1.25rem auto 2.5rem;max-width:46.875rem;padding:0 1.25rem}@media screen and (min-width:920px){.l-cell{margin:3.75rem auto;padding:0 3.75rem}}pre,code,blockquote,.l-card{background:white;box-shadow:0 2px 0 rgba(0,0,0,0.1);border-radius:3px}.l-block{display:block}.l-pullLeft{float:left}.l-pullRight{float:right}.l-controls{padding:1.25rem}.l-controls p{font-size:85%;margin:.9375rem 0 0;text-align:center}.l-controls p a{color:#666676}@media screen and (min-width:920px){.l-controls{position:absolute;right:0;top:0}}.l-sidebar{display:none;background:#4e4e5b}.is-sidebar-toggled .l-sidebar{display:block}@media screen and (min-width:768px){.l-sidebar{position:absolute;top:0;bottom:0;left:0;right:auto;box-shadow:0 0 0 4px #e0e7e8;display:block;position:fixed;width:18.75rem}}.l-sidebar-toggle{background:#cfd9db;border:0;display:block;margin-top:.625rem;padding:.625rem;text-align:center}@media screen and (min-width:768px){.l-sidebar-toggle{display:none}}.l-header{background:#363640;color:#ecf0f1;display:none;padding-top:1.25rem;text-align:center}.l-header p{background:#2f2f37;margin-bottom:0;padding:.625rem 0}@media screen and (min-width:768px){.l-header{display:block}}.l-nav ul,.l-nav li{list-style-type:none;padding:0}.l-nav a{-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border:0;color:white;display:block;font-size:90%;padding:.625rem 1.25rem}.l-nav a:hover,.l-nav a:focus{background:#363640}.l-nav a.is-active{background:#ecf0f1;box-shadow:-2px 2px 1px rgba(31,31,36,0.35);color:#444444;margin-right:-0.25rem}@media screen and (min-height:875px){.l-nav a{font-size:110%;padding:.625rem 1.25rem}}.l-nav ul li ul a{background:#42424d;font-size:90%;padding:.625rem;padding-left:2.5rem}.l-nav ul li ul{display:none}.l-nav ul li ul.is-section-active{display:block}.l-about{position:absolute;top:auto;bottom:0;left:0;right:0;background:#42424d;color:#b5b5c0;display:none;margin:0;padding:1.25rem 0;text-align:center}@media screen and (min-width:768px){.l-about{display:block}}@media screen and (min-height:875px){.l-about{padding:2.5rem 0}}.l-about b{font-weight:300;display:block}.l-about a{color:#d1d1d7}.l-about a:hover{background:none;color:white}.hll{background-color:#ffffcc}.c{color:#999988;font-style:italic}.err{color:#a61717;background-color:#e3d2d2}.k{color:#000000;font-weight:700}.o{color:#000000;font-weight:700}.cm{color:#999988;font-style:italic}.cp{color:#999999;font-weight:700;font-style:italic}.c1{color:#999988;font-style:italic}.cs{color:#999999;font-weight:700;font-style:italic}.gd{color:#000000;background-color:#ffdddd}.ge{color:#000000;font-style:italic}.gr{color:#aa0000}.gh{color:#999999}.gi{color:#000000;background-color:#ddffdd}.go{color:#888888}.gp{color:#555555}.gs{font-weight:700}.gu{color:#aaaaaa}.gt{color:#aa0000}.kc{color:#000000;font-weight:700}.kd{color:#000000;font-weight:700}.kn{color:#000000;font-weight:700}.kp{color:#000000;font-weight:700}.kr{color:#000000;font-weight:700}.kt{color:#445588;font-weight:700}.m{color:#009999}.s{color:#d01040}.na{color:teal}.nb{color:#0086b3}.nc{color:#445588;font-weight:700}.no{color:teal}.nd{color:#3c5d5d;font-weight:700}.ni{color:purple}.ne{color:#990000;font-weight:700}.nf{color:#990000;font-weight:700}.nl{color:#990000;font-weight:700}.nn{color:#555555}.nt{color:navy}.nv{color:teal}.ow{color:#000000;font-weight:700}.w{color:#bbbbbb}.mf{color:#009999}.mh{color:#009999}.mi{color:#009999}.mo{color:#009999}.sb{color:#d01040}.sc{color:#d01040}.sd{color:#d01040}.s2{color:#d01040}.se{color:#d01040}.sh{color:#d01040}.si{color:#d01040}.sx{color:#d01040}.sr{color:#009926}.s1{color:#d01040}.ss{color:#990073}.bp{color:#999999}.vc{color:teal}.vg{color:teal}.vi{color:teal}.il{color:#009999}.btn--a,.btn--b,.btn{-webkit-transition:background .2s ease-in-out,box-shadow .2s ease-in-out;-moz-transition:background .2s ease-in-out,box-shadow .2s ease-in-out;-o-transition:background .2s ease-in-out,box-shadow .2s ease-in-out;transition:background .2s ease-in-out,box-shadow .2s ease-in-out;border-radius:3px;border:0;color:white;display:block;padding:.3125rem .625rem;text-align:center}.btn--a:active,.btn--b:active,.btn:active{-webkit-transform:translateY(2px);-moz-transform:translateY(2px);-ms-transform:translateY(2px);-o-transform:translateY(2px);transform:translateY(2px)}@media screen and (min-width:920px){.btn--a,.btn--b,.btn{width:12.5rem}}.btn--a{background:#4e4e5b;box-shadow:0 6px 0 #363640}.btn--a:hover,.btn--a:focus{background:#42424d;box-shadow:0 6px 0 #2b2b32}.btn--b{background:#77939a;box-shadow:0 6px 0 #5e7980;margin-top:2.5rem}.btn--b:hover,.btn--b:focus{background:#69878e;box-shadow:0 6px 0 #536b71} \ No newline at end of file diff --git a/assets/stylesheets/vendor/github.css b/assets/stylesheets/vendor/github.css new file mode 100644 index 0000000..dacb8dd --- /dev/null +++ b/assets/stylesheets/vendor/github.css @@ -0,0 +1 @@ +.hll{background-color:#ffffcc}.c{color:#999988;font-style:italic}.err{color:#a61717;background-color:#e3d2d2}.k{color:#000000;font-weight:700}.o{color:#000000;font-weight:700}.cm{color:#999988;font-style:italic}.cp{color:#999999;font-weight:700;font-style:italic}.c1{color:#999988;font-style:italic}.cs{color:#999999;font-weight:700;font-style:italic}.gd{color:#000000;background-color:#ffdddd}.ge{color:#000000;font-style:italic}.gr{color:#aa0000}.gh{color:#999999}.gi{color:#000000;background-color:#ddffdd}.go{color:#888888}.gp{color:#555555}.gs{font-weight:700}.gu{color:#aaaaaa}.gt{color:#aa0000}.kc{color:#000000;font-weight:700}.kd{color:#000000;font-weight:700}.kn{color:#000000;font-weight:700}.kp{color:#000000;font-weight:700}.kr{color:#000000;font-weight:700}.kt{color:#445588;font-weight:700}.m{color:#009999}.s{color:#d01040}.na{color:teal}.nb{color:#0086b3}.nc{color:#445588;font-weight:700}.no{color:teal}.nd{color:#3c5d5d;font-weight:700}.ni{color:purple}.ne{color:#990000;font-weight:700}.nf{color:#990000;font-weight:700}.nl{color:#990000;font-weight:700}.nn{color:#555555}.nt{color:navy}.nv{color:teal}.ow{color:#000000;font-weight:700}.w{color:#bbbbbb}.mf{color:#009999}.mh{color:#009999}.mi{color:#009999}.mo{color:#009999}.sb{color:#d01040}.sc{color:#d01040}.sd{color:#d01040}.s2{color:#d01040}.se{color:#d01040}.sh{color:#d01040}.si{color:#d01040}.sx{color:#d01040}.sr{color:#009926}.s1{color:#d01040}.ss{color:#990073}.bp{color:#999999}.vc{color:teal}.vg{color:teal}.vi{color:teal}.il{color:#009999} \ No newline at end of file diff --git a/changelog/index.html b/changelog/index.html new file mode 100644 index 0000000..8bb28f4 --- /dev/null +++ b/changelog/index.html @@ -0,0 +1,154 @@ + + + + + + + MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Changelog

+ +

v3.0.1

+ +

June 27, 2013

+ + + +

v3.0.0

+ +

May 15, 2013

+ + + +

v2.1.0

+ +

March 6, 2013

+ + + +

v2.0.1

+ +

March 5, 2013

+ + + +

v2.0.0

+ +

February 22, 2013

+ + +
+ + + + + diff --git a/components/index.html b/components/index.html deleted file mode 100644 index f80ef64..0000000 --- a/components/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Components / MVCSS
Toggle

Components

The beginnings of a recognizable user interface live in the Components directory. These are abstract, reasonably portable modules that can be swapped in and out of different projects with relative ease.

Some Components, like g (grid) and card, are used for layout and containers, and can encompass many other modules.

<div class="g">
  <div class="g-box g-b--1of2">
    <div class="card">
      <!-- Content -->
    </div>
  </div>
  <div class="g-b g-b--1of2">
    <div class="card">
      <!-- Content -->
    </div>
  </div>
</div>

Note: We shorten grid classes to g and grid-box classes to g-b. Since we write these grid classes so frequently, we want them to be as concise as possible. However, feel free to use the full words, if that’s more comfortable for you.

Other Components, like thumb, affect only a single element, and can resemble Tools at first glance. In these situations, both the Component and Tool have a single responsibility. The Component, however, may be declared alongside its modifier classes, while the Tool applies more definitive styles.

<div class="bucket">
  <div class="bucket-media">
    <img class="thumb thumb--m" src="avatar-nick.jpg" alt="Nick Walsh">
  </div>
  <div class="bucket-content">
    <p>Nick Walsh</p>
  </div>
</div>

Characteristics

When determing whether a module is a Component or Structure, we find it helpful to ask ourselves the following questions:

  • Does this module limit its scope as much as possible?
  • Is this module independent of pre-existing Components?
  • Is this module abstract enough to use in other projects without making significant changes?

If you answer “no” to any of these questions, the module in question is more than likely a Structure.

\ No newline at end of file diff --git a/core/base/index.html b/core/base/index.html new file mode 100644 index 0000000..0bf5840 --- /dev/null +++ b/core/base/index.html @@ -0,0 +1,106 @@ + + + + + + + Core - Base / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Base

+ +

Core - Base sets any base-level styles for tags, such as p or blockquote, beyond what's included in the reset or normalize. Text styles set here reflect the most common appearance of that tag in the design.

+ +

Next →

+
+ + + + + diff --git a/core/content/index.html b/core/content/index.html new file mode 100644 index 0000000..06e2c31 --- /dev/null +++ b/core/content/index.html @@ -0,0 +1,132 @@ + + + + + + + Core - Content / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Content

+ +

Core - Content and Core - Layout are the bridge between base-level tags and modules. They give you the ability to set up abstractions that make contextual tweaks easier.

+ +

The difference between Core - Content and Core - Layout is that Core - Content applies mainly to typography (fonts, colors), while Core - Layout applies to just that, layout (margin, padding, sizing, positioning).

+ +

Note: The c- prefix is an implicit module. There is no c base module; it's only used as a prefix for the content modules.

+ +

Headings

+ +

We set the headings in the Core - Content rather than Core - Base, because we want the ability to share heading styles.

+
h1, .c-h1, %c-h1
  font-size: 40px
  margin-bottom: 20px
+

Borrowed from OOCSS, sometimes we want an h2 on a page to look like an h3. This gives us the ability to do that:

+
%h2.c-h3 Heading
+

Or, using the placeholder selector:

+
.tagline
  @extend %c-h3

%h2.tagline This is a tagline for my site.
+

Utilities

+ +

We set default Core - Content utilities. Let's look at an example to show how this works. Here are a couple of the default utilities available to you:

+
%c-center, .c-center
  text-align: center

%c-condense, .c-condense
  font-size: 85%
+

And in your markup:

+
%form.form-field
  %input(type="text")
  %p.c-condense This is a note.
+

Or, if you prefer to use Sass placeholder selectors as silent classes:

+
%form.form-field
  %input(type="text")
  %p.form-field-desc This is a note.
.form-field-desc
  @extend %c-condense
+

Note: You can set your own custom content utility modules for your project.

+ +

Custom Submodules

+ +

You can extend multiple content utilities, or even form another content submodule:

+
.c-tagline
  @extend %c-center
  @extend %c-condense
+

Next →

+
+ + + + + diff --git a/core/helpers/index.html b/core/helpers/index.html new file mode 100644 index 0000000..4613625 --- /dev/null +++ b/core/helpers/index.html @@ -0,0 +1,125 @@ + + + + + + + Core - Helpers / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Helpers

+ +

Core - Helpers consists of:

+ +
    +
  1. Extends
  2. +
  3. Functions
  4. +
  5. Mixins
  6. +
  7. Keyframe Animations
  8. +
+ +

A Note About Sizing

+ +

By default, MVCSS sizes all elements (font-size, margin, padding) with rems. We do this through the rem() function, that simply divides the target pixel value by the $base-fontSize. Here's an example:

+
h4
  font-size: rem(20px)
+

Note: Be sure to look at your site's browser support to determine if rems are the right option. Take a look at the current browser support for rem.

+ +

If you'd like to use ems, there is an em() function available as well:

+
h4
  font-size: em(20px)
+

However, with ems, if you were to alter the context from the default $base-fontSize, you would need to pass the new context in as the second argument:

+
h4
  font-size: em(20px)
  padding-bottom: em(10px, 20px)
+

To make adjustments easier, create a local $context variable for the size:

+
h4
  $context: 20px
  font-size: em($context)
  padding-bottom: em(10px, $context)
+

Next →

+
+ + + + + diff --git a/core/index.html b/core/index.html new file mode 100644 index 0000000..a53e9e5 --- /dev/null +++ b/core/index.html @@ -0,0 +1,128 @@ + + + + + + + Core / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Core

+ +

The core consists of six components:

+ +

1. Reset

+ +

Standard Normalize.css reset.

+ +

2. Settings

+ +

@font-face and global variables.

+ +

3. Helpers

+ +

Extends, functions, mixins, keyframe animations.

+ +

4. Base

+ +

Base-level tags.

+ +

5. Content

+ +

Base-level typography (colors, fonts).

+ +

6. Layout

+ +

Base-level layout (margin, padding, sizing).

+
+ + + + + diff --git a/core/layout/index.html b/core/layout/index.html new file mode 100644 index 0000000..a766a38 --- /dev/null +++ b/core/layout/index.html @@ -0,0 +1,112 @@ + + + + + + + Core - Layout / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Layout

+ +

Just like Core - Content, the Core - Layout gives you a higher level of abstraction for your modules.

+ +

Note: The l- prefix is an implicit module. There is no l base module; it's only used as a prefix for the layout modules. This is borrowed from SMACSS, which uses the l- convention in its layout section.

+ +

A good example of a Core - Layout submodule is what we call the cell module (l-cell), which gives your site a max-width, centers it, and applies horizontal padding. Let's take a look:

+
%l-cell, .l-cell
  margin: 0 auto
  max-width: 900px
  padding: 0 60px
+

Utilities & Custom Submodules

+ +

Just like Core - Content, there are default utilities provided to you, and you can create your own custom submodules as well. Be sure to read through the MVCSS project files to get familiarized.

+
+ + + + + diff --git a/core/reset/index.html b/core/reset/index.html new file mode 100644 index 0000000..62b994e --- /dev/null +++ b/core/reset/index.html @@ -0,0 +1,108 @@ + + + + + + + Core - Reset / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Reset / Normalize

+ +

As long as the project size warrants it, we always get things started with a style reset. Normalize.css is what we use, but alternatives like the infamous Eric Meyer Reset CSS are easily interchangeable.

+ +

With Normalize.css, we recommend that you alter it on a per-project basis, and make the proper overrides in Core - Base.

+ +

Next →

+
+ + + + + diff --git a/core/settings/index.html b/core/settings/index.html new file mode 100644 index 0000000..2d554ea --- /dev/null +++ b/core/settings/index.html @@ -0,0 +1,113 @@ + + + + + + + Core - Settings / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Settings

+ +

Core - Settings centers on two things:

+ +
    +
  1. @font-face declarations
  2. +
  3. Variables
  4. +
+ +

Grouping all the app-wide settings into one file allows newcomers to the project the means to find out what's available to them quickly.

+ +

Next →

+
+ + + + + diff --git a/assets/images/favicon.ico b/favicon.ico similarity index 100% rename from assets/images/favicon.ico rename to favicon.ico diff --git a/foundation/base/index.html b/foundation/base/index.html deleted file mode 100644 index 7c0b53e..0000000 --- a/foundation/base/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation - Base / MVCSS
Toggle

Foundation - Base

Base contains all of the tag-level settings for default HTML elements. These are things like anchors, headings, paragraphs, lists, and everything else that doesn’t have a class name attached. Because there are so many possible HTML elements to cover, we typically only style the ones relevant to a project as we need them.

We define html and body styles at the top, and then divide the remaining content into Block and Inline sections.

// *************************************
//
//   Base
//   -> Tag-level settings
//
// *************************************

html
  background: $c-background
  color: $c-base
  font-family: $b-fontFamily
  font-size: $b-fontSize
  line-height: $b-lineHeight

body
  font-size: 100%

Block Content

Block content is made up of all the block-level elements needed in an MVCSS project. Typically, this section includes the aforementioned headings, paragraphs, lists, as well as figures, blockquotes, and more.

Collapsing margins, while an intentional feature of CSS, only add complexity when authoring style sheets, so we limit vertical margins on block-level elements to a single-direction.

// -------------------------------------
//   Block Content
// -------------------------------------

ul, p
  margin-bottom: $b-space
  margin-top: 0

li
  margin-bottom: $b-space-s
  margin-top: 0

// ----- Headers ----- //

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4
  font-family: $b-fontFamily-heading
  font-weight: bold
  line-height: 1.2
  margin-bottom: $b-space-xs
  margin-top: 0

Inline Content

Inline content is made up of—you guessed it—inline elements. These include tags like a, strong, em, code, and any others that don’t force a line break before and after themselves by default.

// -------------------------------------
//   Inline Content
// -------------------------------------

a
  border-bottom: $b-border
  color: $c-highlight
  text-decoration: none

  &:hover,
  &:focus
    border-bottom-color: $c-highlight
    color: $c-subdue
\ No newline at end of file diff --git a/foundation/config/index.html b/foundation/config/index.html deleted file mode 100644 index e3ecc61..0000000 --- a/foundation/config/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation - Config / MVCSS
Toggle

Foundation - Config

Config holds your @font-face font setup (if applicable), and all of your application-wide variables. We include a set by default, which is broken down into Base, Colors, and Fonts.

@Font-face

If serving font files from a known path (e.g. your server), we include Bourbon’s +font-face mixin to simplify the daunting syntax, and also list fallback files needed for browser compatibility.

// -------------------------------------
//   @font-face
// -------------------------------------

// ----- Open Sans ----- //

+font-face('OpenSans', 'OpenSans')
+font-face('OpenSans', 'OpenSansBold', bold)
+font-face('OpenSans', 'OpenSansItalic', normal, italic)

Note: if you use a web font provider that offers fonts exclusively via a JavaScript snippet, you can expect to leave the @font-face section empty.

Variables

All variables in MVCSS are defined in Config and are prefixed by their role or respective Component/Structure.

  • $b-* for base variables
  • $c-* for colors
  • $g-* for breakpoints
  • $componentName-* for Components
  • $structureName-* for Structures

Colors are a somewhat complicated issue, but we’ve had the most success defining an initial palette (without color prefixes), and then referencing those colors within other varibles. In projects with a limited set of colors, you may not need a palette section, so we encourage you to choose the approach you prefer.

// -------------------------------------
//   Colors
// -------------------------------------

// ----- Palette ----- //

$cerulean: #017ba7
$forest: #7ba05b
$gainsboro: #ecf0f1
$gold: #ffd700
$jet: #343434
$scarlet: #ff3f00
$white: #fff

// ----- Base ----- //

$c-background-invert: $white
$c-background: $gainsboro
$c-border: lighten($jet, 30%)
$c-error: $scarlet
$c-highlight: $cerulean
$c-text-invert: $white
$c-text: $jet
$c-subdue: lighten($cerulean, 40%)
$c-success: $forest
$c-warning: $gold

// ----- Components ----- //

// Example: $row--a-background: $c-highlight

// ----- Structures ----- //

// Example: $dropdown-link-color: $c-subdue

// -------------------------------------
//   Base
// -------------------------------------

// ----- Borders & Box Shadow ----- //

$b-borderRadius: 3px
$b-borderStyle: solid
$b-borderWidth: 2px
$b-border: $b-borderWidth $b-borderStyle $c-border
$b-boxShadow: 0 2px 0 rgba($jet, 0.25)

// ----- Typography ----- //

$b-fontFamily-heading: 'OpenSans', sans-serif
$b-fontFamily: 'OpenSans', sans-serif
$b-fontSize: 16px
$b-fontSize-s: 75%
$b-fontSize-m: 90%
$b-fontSize-l: 115%
$b-lineHeight: 1.5

// ----- Sizing ----- //

$b-space: em(20px)
$b-space-s: 0.5 * $b-space
$b-space-l: 2 * $b-space
$b-space-xl: 4 * $b-space

// -------------------------------------
//   Components
// -------------------------------------

// ----- Grid ----- //

$g-s: em(480px)
$g-m: em(800px)
$g-l: em(1024px)

// -------------------------------------
//   Structures
// -------------------------------------

// ----- Dropdown ----- //

// Example: $dropdown-width: em(200px)
\ No newline at end of file diff --git a/foundation/helpers/index.html b/foundation/helpers/index.html deleted file mode 100644 index c217caf..0000000 --- a/foundation/helpers/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation - Helpers / MVCSS
Toggle

Foundation - Helpers

Helpers are the functions, mixins, extends, and animations used throughout an MVCSS application.

Functions

Because of the many useful functions Sass gives us for free, we rarely need to define any of our own. Still, there may be occasions where you need to define some others (e.g., em, rem, strip-units). For these cases, we’ve dedicated the Functions section within Helpers to housing any necessary additions.

Mixins

We use mixins to reduce the amount of repeated code when authoring style sheets. Usually, this involves simplifying lengthy syntaxes, as well as providing fallbacks and vendor prefixes for unsupported CSS properties.

Take media queries for example: the most commonly used arguments are screen and min-width, so we made a mixin that includes those values as defaults, unless stated otherwise.

// ----- Respond-to ----- //
// -> Generates a media query
//
// $val - the breakpoint size
// $query - the type of query ('min-width', 'max-width')
// $media - the media type ('screen', 'print', etc.)
// @content - the generated content within the mixin
//

=respond-to($val, $query: min-width, $media: screen)
  @media #{$media} and ($query: $val)
    @content

By now using the respond-to mixin throughout a project, you can write less code to achieve the same result.

// Standard CSS
@media screen and (min-width: $g-m)

// Sass mixin
+respond-to($g-m)

Entries in the Mixin section should always take arguments and have the ability to differ when utilized. If you’re looking to add an unchanging group of properties to reuse, they belong in Extends.

Extends

Extends are collections of rules to use either directly in the markup, or to extend within modules. These are generally more verbose than Tools, but still adhere to the single responsibility principle.

Even though we frequently extend these classes within modules, we avoid the percent sign syntax (%className) to create placeholder selectors in Sass. It’s a good reminder to ourselves that these classes shouldn’t be nested in the context of anything else, avoiding potential selector bloat associated with extends.

Inside Markup

The group class applies multiple rules to a single element, and in the following example, we’re using it directly in the markup.

// ----- Clearfix ----- //

.group::after
  clear: both
  content: ''
  display: table
<footer class="group">
  <p class="fl">Made with Envy</p>
  <img class="fr" src="logo-envy.svg" alt="Envy Logo">
</footer>

Inside Modules

In the following g (grid) Component, we extend the group class within the module itself.

.g
  @extend .group
  display: block
  margin-left: -$g-gutter / 2
  margin-right: -$g-gutter / 2

Animations

Within Helpers, Animations are the general-use @keyframes definitions that can be called across various modules.

If you catch yourself defining a similar animation in two separate places, we try to abstract it into a single, less contextual animation that can be reused throughout a project.

For example, in the case of fadeIn, we’re likely to use this animation across many different modules, making it a perfect animation to define inside Helpers.

// ----- Fade In ----- //

@keyframes fadeIn
  0%
    opacity: 0
  100%
    opacity: 1

Note: animations unique to specific modules are defined at the bottom of their respective style sheets.

\ No newline at end of file diff --git a/foundation/index.html b/foundation/index.html deleted file mode 100644 index 57500f9..0000000 --- a/foundation/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation / MVCSS
Toggle

Foundation

Foundation represents the tools and materials required at the ground level of an MVCSS project. In other words, it provides the initial setup for your application.

Foundation is made up of:

\ No newline at end of file diff --git a/foundation/reset/index.html b/foundation/reset/index.html deleted file mode 100644 index 9f6828a..0000000 --- a/foundation/reset/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation - Reset / MVCSS
Toggle

Foundation - Reset

As long as the project size warrants it, kick things off with a reset style sheet. We use Normalize.css (and include it with MVCSS by default), but alternatives like Eric Meyer’s Reset CSS are easily interchangeable.

\ No newline at end of file diff --git a/foundation/tools/index.html b/foundation/tools/index.html deleted file mode 100644 index 78af92c..0000000 --- a/foundation/tools/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Foundation - Tools / MVCSS
Toggle

Foundation - Tools

Tools are presentational utility classes for usage directly in the markup itself. They’re helpful when you need a specific style in a unique context, but can’t justify creating (and naming) a new module or modifier to achieve the desired effect.

For example, the paragraph element inside of the following card Component needs its margin-bottom made flush, so we can easily apply a Tool class of mbf.

<div class="card">
  <p class="mbf">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam non dolor eligendi placeat.</p>
</div>

Using a Tool in this situation helps us avoid declaring a card or card modifier that assumes too much about its use case, while also helping to keep CSS specificity flat and managable.

Single Responsibility

Tools are as limited in responsibility as possible, allowing you to mix and match various classes to quickly produce many different styles. Every Tool does one thing and one thing well, ensuring that the elements they affect stay both predictable and extensible.

Going Too Far

If you find yourself using multiple Tools to achieve a reusable group of styles, it may be a sign that you should define those properties in their own module or modifier.

<a class="btn pbm pll prl ptm tsl" href="v3.zip" >Download v3.0.0</a>
<a class="btn pbm pll prl ptm tsl" href="v2.zip" >Download v2.4.1</a>

In the example above, we’re trying to create a large button by using only Tools. While our approach achieves the intended effect, we’re much better off defining those common styles in a .btn--l class, and then applying it in the markup.

.btn--l
  font-size: $b-fontSize-l
  padding: $b-space $b-space-l
<a class="btn btn--l" href="v3.zip" >Download v3.0.0</a>
<a class="btn btn--l" href="v2.zip" >Download v2.4.1</a>

This second approach also gives us a styling hook for any future changes to btn--l. Tools provide a powerful set of classes for fine-tuning unique contextual styles, but they aren’t a replacement for modular CSS practices.

\ No newline at end of file diff --git a/index.html b/index.html index 6cc25c9..13262da 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,14 @@ - Overview / MVCSS
Toggle

Overview

MVCSS [Modular View CSS] is a Sass-based CSS architecture for creating predictable and maintainable application style.

CSS, for all its simplicity, is a difficult language to manage in large-scale implementations. Naming, paths to abstraction, structure, and methodologies are all free-form; MVCSS seeks to provide order for these sorts of projects.

Keeping with an architecture motif, applications are split into three major categories: Foundation, Components, and Structures. If Foundation represents tools, materials, and the ground level, Components are akin to creating a window, while Structures mirror a number of windows and doors creating a wall.

For a very early taste, here’s what a simple Component might consist of:

// *************************************
//
//   Card
//   -> Individual style containers
//
// *************************************

.card
  background: $c-invert
  border-radius: $b-borderRadius
  box-shadow: $b-boxShadow
  padding: $b-space

// -------------------------------------
//   Modifiers
// -------------------------------------

// ----- Sizes ----- //

.card--s
  padding: $b-space-s

// ----- Theme ----- //

// Hierarchy

.card--b
  background: $c-highlight

// Error

.card--error
  border: 2px $b-borderStyle $c-error
  box-shadow: none

// -------------------------------------
//   Scaffolding
// -------------------------------------

// ----- Label ----- //

.card-label
  font-size: $b-fontSize-s
  font-weight: bold
  text-transform: uppercase

There’s no shortage of wonderful frameworks, ideas, and methods for tackling CSS across the web, and MVCSS wouldn’t exist without ideas set forth in few of these. Take a look at the Resources section to find out more about our architectural roots.

+ + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

About

+ +

MVCSS is a Sass-based CSS architecture for creating predictable and maintainable application style.

+ +

As front-end devs at Envy Labs, we work primarily in medium-to-large-sized Rails applications. Each of these projects has a sizable amount of CSS undergoing normal maintenance and iteration. Depending on complexity and setup, changes to existing style can be difficult or done poorly if the right way is too convoluted.

+ +

What? Another Way to Write CSS?

+ +

We're big fans (and often employ tenets of) well-documented methods like OOCSS, BEM, and SMACSS. This bit of architecture and accompanying Styleguide/Library meshes all of our preferred practices into one place.

+ +

All This for CSS?

+ +

CSS in and of itself is simple to pick up, but difficult to apply maintainably to large applications - hence the popularity of the methods listed above. MVCSS is one such manner to organize styles, and the one that we've had the most success in employing.

+ +

Do I Have to Use Sass?

+ +

Sass is not required to employ this paradigm, but all the project files are written in it, so it's definitely recommended.

+ +

Organizational Overview

+ +

MVCSS is broken down into three primary sections:

+ +
    +
  1. Application
  2. +
  3. Core
  4. +
  5. Modules
  6. +
+
+ \ No newline at end of file + + + + + diff --git a/library/index.html b/library/index.html new file mode 100644 index 0000000..8821238 --- /dev/null +++ b/library/index.html @@ -0,0 +1,104 @@ + + + + + + + Library / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Library

+ +

The Library is a collection of Sass modules/helpers and JavaScript (CoffeeScript) components we commonly use. If you're seeking a framework moreso than a methodology, this is your jumping off point for items like grids, tabs, buttons, and forms. You can just plug the modules/components into your base MVCSS project.

+
+ + + + + diff --git a/manifest/index.html b/manifest/index.html deleted file mode 100644 index 45d4ba9..0000000 --- a/manifest/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Manifest / MVCSS
Toggle

Manifest

Now that we’ve touched on naming and piecemeal ideas, lets put it all together. MVCSS expects the following setup wherever your styles are found:

application.sass
foundation/
  _reset.sass
  _helpers.sass
  _config.sass
  _base.sass
  _tools.sass
components/
structures/
vendor/

application.sass is used as the manifest and inbox (more on that later). Application as a name is derived from the Rails asset pipeline, and all other files are Sass partials imported in.

Post compile, application.css is included on each site page and various settings can be employed for compression.

Imports

Files found in Foundation are imported into the manifest in a particular order, while Components and Structures are typically included alphabetically:

// *************************************
//
//   Project Name
//   -> Manifest
//
// *************************************

// -------------------------------------
//   Foundation
// -------------------------------------

@import 'foundation/reset'
@import 'foundation/helpers'
@import 'foundation/config'
@import 'foundation/base'

// -------------------------------------
//   Components
// -------------------------------------

// Component imports

// -------------------------------------
//   Structures
// -------------------------------------

// Structure imports

// -------------------------------------
//   Vendor
// -------------------------------------

// Third-party style imports, if needed

// -------------------------------------
//   Foundation - Tools
// -------------------------------------

@import 'foundation/tools'

// -------------------------------------
//   Inbox
// -------------------------------------

Splitting up large files

If any of the Foundation files become larger than desired, split the file into smaller, individual files. For example, if the Foundation - Config file grows too large:

  1. Create a foundation/config directory.
  2. Create partials for the foundation/_config.sass sections.
  3. Import the partial files in foundation/_config.sass.
// *************************************
//
//   Config
//   -> Fonts, Variables
//
// *************************************

@import 'foundation/config/fonts'
@import 'foundation/config/colors'
@import 'foundation/config/base'
@import 'foundation/config/components'
@import 'foundation/config/structures'
// ...

Inbox

Collaboration with developers can sometimes be difficult, but we’ve found a way to help mitigate that (at least as it relates to CSS). At the bottom of the application.sass file, there’s a comment block that looks like this:

// -------------------------------------
//   Inbox
// -------------------------------------

You can add any temporary styles to this section, which will allow the maintainer of the CSS to rewrite or sort the styles appropriately. We’ve found that developers respect (and even enjoy) this system, since they’re free from stressing over the proper placement or structure of a style rule.

\ No newline at end of file diff --git a/modules/index.html b/modules/index.html new file mode 100644 index 0000000..9d7c8dd --- /dev/null +++ b/modules/index.html @@ -0,0 +1,116 @@ + + + + + + + Modules / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Modules

+ +

Modules in this context refer to any unit of style that can be found across multiple pages. Most of your styles should be found here. This draws from the OOCSS idea of separating everything into reusable chunks, making it second-nature if you're familiar with that method.

+ +

Examples of Modules

+ +

Here are some commonly occurring examples of modules:

+ + +
+ + + + + diff --git a/resources/index.html b/resources/index.html deleted file mode 100644 index 00f2325..0000000 --- a/resources/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Resources / MVCSS
Toggle

Resources

MVCSS Library

We maintain a Library of additional Helpers, Components, and documents that you may find useful in building your applications. These modules aren’t needed as commonly as the ones included with MVCSS by default, but our team has found plenty of use for them between projects.

Influences

We’re always on the lookout for new approaches and better means of abstraction. Here are some great resources and examples for writing better CSS that we’ve worked to incorporate into our thinking.

Methodologies

Libraries

Articles

Videos

\ No newline at end of file diff --git a/structures/index.html b/structures/index.html deleted file mode 100644 index 936bbd8..0000000 --- a/structures/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Structures / MVCSS
Toggle

Structures

Structures are a project’s modules and user interface elements that are too specialized for use across multiple sites. In some cases, they might assume a certain context or content type, and in other cases, they might include thematic styles or responsive layout.

When explaining what characterizes a Component versus a Structure, we outlined a few considerations that help us determine between the two:

  • Size of scope
  • Dependencies on other modules
  • Portability between projects, or lack thereof

Size of Scope

When a module affects different aspects of an element or arrangement of elements simultaneously (i.e., it has a wide scope), that’s a very strong indicator that you’re dealing with a Structure.

Let’s say, for example, you’re designing a fairly common site header: logo on the left, plus some horizontal navigation on the right. You could realistically build this pattern using a combination of Helpers, Components, and Tools.

<header class="group">
    <img class="fl" src="logo.svg" alt="Website">
    <nav class="fr">
        <ul class="list list--inline">
            <li class="list-item"><a href="/">Home</a></li>
            <li class="list-item"><a href="/blog">Blog</a></li>
            <li class="list-item"><a href="/contact">Contact</a></li>
        </ul>
    </nav>
</header>

But what happens when we try to make our site responsive? On small-screen devices, we want our navigation to also:

  • Fill the viewport width
  • Stack links atop one another
  • Apply an alternating background color to each list item

See the problem? Our module definitely isn’t list--inline anymore. It now needs its own aesthetics and responsive behavior—both of which are tailored to their surrounding design. Although we might use this pattern in multiple places on the site, its broad scope makes copying it across different designs unlikely. In this case, our best bet is to create a new Structure, and define our new themed, responsive list module inside.

Dependencies

Unlike Components, Structures can depend on, or even extend, pre-existing Components. This is useful when you want to add theme or behavior to a Component, but keep any unique changes contained within their own module.

In MVCSS, we use our g (grid) Component primarily for page layout. We try to keep it simple and assume as little as possible, but there are cases where we want to include similar functionality inside of a more specific module. Float-based grids don’t always behave predictably when their items have variable a height, so we’ve defined a collection Structure to add contextual clearfixing.

.collection

// -------------------------------------
//   Modifiers
// -------------------------------------

.collection--1of3

  .collection-item:nth-child(3n + 1)
    clear: left

// -------------------------------------
//   Scaffolding
// -------------------------------------

// ----- Item ----- //

.collection-item
  margin-bottom: $b-space-l

Using both the g (grid) Component and the collection Structure, we can apply both modules’ classes directly in the markup.

Note: applying multiple modifiers to grid and grid-box can make markup difficult to read quickly, so we’ve shortened the classes to g and g-b.

<div class="g collection collection--1of3">
  <div class="g-b g-b--1of3 collection-item">
    <!-- Content -->
  </div>
  <div class="g-b g-b--1of3 collection-item">
    <!-- Content -->
  </div>
  <div class="g-b g-b--1of3 collection-item">
    <!-- Content -->
  </div>
  <div class="g-b g-b--1of3 collection-item">
    <!-- Content -->
  </div>
</div>

But that’s a lot of classes to keep track of! Luckily, Sass can help us simplify our markup thanks to its @extend directive.

.collection
  @extend .g

// -------------------------------------
//   Modifiers
// -------------------------------------

.collection--1of3
  @extend .g-b--1of3

  .collection-item:nth-child(3n + 1)
    clear: left

// -------------------------------------
//   Scaffolding
// -------------------------------------

// ----- Item ----- //

.collection-item
  @extend .g-b
  margin-bottom: $b-space-l

And now we apply only a single set of classes in the markup.

<div class="collection collection--1of3">
  <div class="collection-item">
    <!-- Content -->
  </div>
  <div class="collection-item">
    <!-- Content -->
  </div>
  <div class="collection-item">
    <!-- Content -->
  </div>
  <div class="collection-item">
    <!-- Content -->
  </div>
</div>

Portability

In the end, limiting scope and minimizing dependencies both affect portability, which is usually our biggest concern when classifying modules. If you can easily tweak a few lines of CSS inside a module and use it between projects, that means it’s reasonably portable, and you have solid grounds for classifying it as a Component. On the other hand, if try to port a module and find yourself rewriting a significant amount of code, then the module is likely better classified as a Structure.

\ No newline at end of file diff --git a/styleguide/basics/index.html b/styleguide/basics/index.html index 76e76c1..4e9fab4 100644 --- a/styleguide/basics/index.html +++ b/styleguide/basics/index.html @@ -1,4 +1,14 @@ - Styleguide - Basics / MVCSS
Toggle

Styleguide - Basics

Style Sheets

  • Alphabetize properties (vendor-prefixed properties sorted by their non-prefixed equivalent)
  • Extends and Mixins should be placed before standard properties
  • Use soft tabs with a two space indention
  • Add a space after :
  • Add a space after // comments
  • Add a space after commas in values (e.g. rgba(#000, 0.5))
  • Write numbers at the end of mathematic operations (e.g. $b-space * 0.5)
  • Stick with classes instead of IDs for styling
  • Limit nesting as much as possible
// Example

.component
  @extend .group
  +transition(opacity 0.2s ease-in-out)
  border-radius: 5px
  box-shadow: 0 2px 5px rgba(#000, 0.5)
  -webkit-flex: 1 1 50%
  -ms-flex: 1 1 50%
  flex: 1 1 50%
  font-style: italic
  padding-bottom: $b-space * 3

Markup

  • Alphabetize classes, ordered by Component, Structure, Tool, state, and context
  • Apply modifier classes after each individual module
<div class="g collection collection--1of3 bch mtl tci is-active has-dropdown"></div>
+ + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Basics

+ + +
// This is an example!

.module
  background: #fff
  color: #000
  font-size: 1.6em

.module-submodule
  font-size: 2em
  margin-bottom: 1em
+

Next →

+
+ \ No newline at end of file + + + + + diff --git a/styleguide/comments/index.html b/styleguide/comments/index.html deleted file mode 100644 index 24c7f27..0000000 --- a/styleguide/comments/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Styleguide - Comments / MVCSS
Toggle

Styleguide - Comments

There are four levels of comments, in order of decreasing importance:

// *************************************
//
//   First Level
//   -> Description
//
// *************************************

// -------------------------------------
//   Second Level
// -------------------------------------

// ----- Third Level ----- //

// Fourth Level
\ No newline at end of file diff --git a/styleguide/index.html b/styleguide/index.html index 692b1d5..2b73282 100644 --- a/styleguide/index.html +++ b/styleguide/index.html @@ -1,4 +1,14 @@ - Styleguide / MVCSS
Toggle

Styleguide

Before diving in, we’ll start with a bit of housekeeping. This section outlines our internal standards for writing CSS (and more specifically, Sass). While you’re certainly welcome to switch it up, these guidelines will help in moving through our examples and base files.

We’re big proponents of the Sass indented syntax (.sass), so things may look slightly different if you’re a Sassy CSS (.scss) fan.

Word of warning: some of the sections herein will be a bit confusing, like Naming Conventions, until seen in context later—an unfortunate chicken/egg situation.

+ + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Styleguide

+ +

Everyone has a favorite way to write CSS and determine how to name modules. Realizing that everyone includes us, here are our compiled standards for stylesheet authoring and module naming.

+ +

The styleguide is broken down into:

+ + +
+ \ No newline at end of file + + + + + diff --git a/styleguide/naming/index.html b/styleguide/naming/index.html index fd39775..368e354 100644 --- a/styleguide/naming/index.html +++ b/styleguide/naming/index.html @@ -1,4 +1,14 @@ - Styleguide - Naming Conventions / MVCSS
Toggle

Styleguide - Naming Conventions

Following ideas pioneered in BEM and SUIT, MVCSS has a strict series of naming conventions that provide context at a glance.

Tools

As you may notice in _tools.sass, many of the Tool classes look pretty acronym-y. We’ll get into the gains inherent with defining Tools shortly, but for now just assume two- or three-letter classes fall under this notion.

A class such as .mbm is a shorthand way to define a basic unit of bottom margin: margin bottom medium. Similarly, .mbl would be the large variety of bottom margin.

Components/Structures

Structures and Components exist as Sass partials in their respective directories, and are always singular. Examples include icon, button, g (grid), form, and modal.

If the name comprises two words, utilize camelCase—for instance, taskList.

Modifiers

After defining the base properties of a Component or Structure, modifiers exist to allow stylistic tweaks that build on the initial definition. These tweaks are denoted with two hyphens --. A button, for instance, might have a number of different colors and sizes:

// *************************************
//
//   Button
//   -> Action points
//
// *************************************

.btn
  border: 0
  display: inline-block
  line-height: 2.5
  padding: 0 $b-space
  font-weight: bold

// -------------------------------------
//   Modifiers
// -------------------------------------

// ----- Sizes ----- //

.btn--s
  font-size: 75%

.btn--l
  font-size: 150%

// ----- Theme ----- //

// Hierarchy

.btn--a
  background: $c-base

.btn--b
  background: $c-highlight

After creation, elements that need a modifier will use the root class (.btn) and any number of modifiers deemed necessary:

<button class="btn btn--a btn--l">A Button</button>

Note: modifiers typically work best when defined in hierarchical sequence (a, b) or via function (cancel, submit) as opposed to look (red, blue).

Shorthand Notation

As you can see above, we’ll use shorthand notation for sizing and hierarchy modifiers. For example, rather than writing btn--large, we’ll write btn--l. We do this for the sake of terseness, but feel free to write out the words, if that’s more comfortable for you and your authors.

Here are the shorthand notation modifier conventions that we use for sizing and hierarchy:

// Sizing
--f  (flush)
--xs (extra small)
--s  (small)
--m  (medium)
--l  (large)
--xl (extra large)

// Hierarchy
--a (primary)
--b (secondary)
--c (tertiary)

Note: If you go past tertiary on the hierarchy scale, you probably need a different modifier, as you have too many levels of hierarchy.

States

Generally added via JavaScript, states are similar to modifiers but carry conditional context. is- denotes a state, such as is-active, and they’re utilized as such:

// *************************************
//
//   Button
//   -> Action points
//
// *************************************

.btn
  // Styles

// Modifiers

// -------------------------------------
//   States
// -------------------------------------

.btn.is-active
  background: $c-highlight

We use is-active as a convention throughout MVCSS, but any state can affect any module in a unique way. For example, applying is-active on an btn may have a completely different effect from applying is-active on a nav-item. By using only compound selectors (.module.is-state) to define state, we’re able to increase specificity when needed, while also containing any changes within a single module’s namespace.

Context

We also borrow the idea of context from SUIT. Modularizing styles into self-contained units works well most of the time, but you’ll occasionally need a parent element to fall in line.

The most common case tends to be positioning context. If you have a dropdown structure that’s being positioned absolutely, the parent element should be (at least) positioned relatively:

// *************************************
//
//   Dropdown
//   -> Revealed information
//
// *************************************

.dropdown
  // Styles

// Modifiers, States

// -------------------------------------
//   Context
// -------------------------------------

.has-dropdown
  position: relative

Similar to is- with states, classes beginning with has- denote a context selector.

Scaffolding

Elements nested within a Component or Structure that need styling based on being there can be added to the scaffolding. Keeping with the dropdown Structure, the scaffold section falls last:

// *************************************
//
//   Dropdown
//   -> Revealed information
//
// *************************************

.dropdown
  // Styles

// Modifiers, States, Context

// -------------------------------------
//   Scaffolding
// -------------------------------------

.dropdown-media
  border: 4px solid $c-invert

For items in scaffolding, the Component/Structure name comes first, followed by a single hyphen and the subcomponent/substructure name (also in camelCase, if necessary). Where applicable, they can have their own modifiers, states, and subcomponents/substructures—more than two levels, though, typically means it’s time to refactor.

// *************************************
//
//   Card
//   -> Individual style containers
//
// *************************************

.card
  background: $c-invert
  border-radius: $b-borderRadius
  box-shadow: $b-boxShadow
  padding: $b-space
  position: relative

// Modifiers, States, Context

// -------------------------------------
//   Scaffolding
// -------------------------------------

// ----- Header ----- //

.card-header
  border-bottom: $b-border
  margin-bottom: $b-space-s
  margin-left: -$b-space
  margin-right: -$b-space
  padding-left: $b-space
  padding-right: $b-space

// Modifiers

.card-header--push
  margin-bottom: $b-space-l

In the card example above, we’ve defined a modifier class that affects the card-header scaffolding item. Applying the class directly to the element descendent of card helps us insert additional space when needed, while also keeping CSS specificity low.

Variables

Variables are a big enough consideration that we dedicate an entire file to keeping them organized. You can find all the information regarding variables in Config.

Images

A section about naming images? I know. Let’s just get through it.

  • bg-* for background images
  • logo-* for logos
  • img-* for content images
  • Sub-folders for larger groups
+ + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Naming Conventions

+ +

Modules

+ +

Note: Module files should be named in the singular, unless your module's name is plural. For example:

+ + + +

Modules are broken down into the base module, submodules, modifiers, and states. If your module or submodule name is two words, use camelCase. For example, .moduleName.

+ +

Submodules

+ +

Submodules use the hyphen - separator to denote that it is a submodule to another module. For example, module-submodule.

+ +

Note: If you have a plural module (e.g. .tabs), you can name your submodule .tab as an exception to this rule. The assumption is made that .tab is a submodule of .tabs.

+ +

Modifiers

+ +

Use -- for a modifier on a module or submodule. For example:

+ + + +

Note: Module and submodule modifier variables contain the same convention. For example:

+
$module--modifier-background: #000
+

States

+ +

Use the is-state, is-module-state, is-module-submodule-state pattern for your states. For example:

+ + + +

Context

+ +

Use has- for adding a context with specific styles on a module or submodule. For example:

+
<div class="nav has-dropdown">
  <!-- ... -->
</div>
.has-dropdown
  position: relative
+

Note: This idea is borrowed from suitcss.

+ +

Note: This is different than a Modifier, which sets custom, alternate styles on the base module.

+ +

Sass Variables

+ +

Variables, as documented in Core - Settings, should follow the same naming conventions as your modules, referenced above. The most global variables (used in multiple places, multiple contexts) are prefixed with $base-. Let's look at some examples:

+
$base-background: #eee
$base-color: #444
$base-borderRadius: 3px
$base-fontSize: 16px
$base-lineHeight: 1.6
$base-whitespace: 20px
+

Content and layout variables are prefixed with $c- and $l-, respectively.

+
$c-header-color: #999
$c-header-fontFamily: sans-serif
$l-maxWidth: 960px
$l-sidebar-width: 200px
+

You may also create module-specific variables, like so:

+
$grid-breakpoint-lap: 480px
$grid-breakpoint-desk: 800px
$grid-gutter: 20px
$form-fontSize: 12px
$form-input-background: #ddd
+

Hierarchy

+ + + +

Images

+ +

A section about naming images? I know. Let's just get through it.

+ + +
+ \ No newline at end of file + + + + + diff --git a/styleguide/numbers-game/index.html b/styleguide/numbers-game/index.html deleted file mode 100644 index d5db12f..0000000 --- a/styleguide/numbers-game/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Styleguide - The Numbers Game / MVCSS
Toggle

Styleguide - The Numbers Game

As much as possible, we prefer sticking to relative units in a predictable scale. Base values are typically stored in Config (which we’ll cover in Foundation) and derived from that point on. For purposes of efficiency and standardization, you’ll define number values less often than usual in MVCSS.

Approach

  • A pixel value for a base font size (stored in Config) is set on the root html element, thereby preparing both text sizing and the relative value of an em unit
  • Line heights are unitless, e.g. 1.5
  • Spacing (padding, margin, etc.) is a multiple of a stored base space value, set in ems
  • Font sizes (aside from the html element) are defined with percentage values, scaling the other relative properties on the element simultaneously

This setup should be a easier to grasp once we reach the Config, Tools, and Base segments of Foundation.

Note: pixel values will occasionally be required to meet design requirements, especially with things like offsets. Most often, these are considered magic numbers, and you should avoid using them as much as possible.

\ No newline at end of file diff --git a/styleguide/sass-specific/index.html b/styleguide/sass-specific/index.html new file mode 100644 index 0000000..136dc7f --- /dev/null +++ b/styleguide/sass-specific/index.html @@ -0,0 +1,114 @@ + + + + + + + Styleguide - Sass-specific / MVCSS + + + + + + +
+ View Code → +

Changelog (v3.0.1)

+
+ Navigation + +
+

Sass-specific (.sass)

+ + + +

Comments

+ +

There are four levels of comments:

+
// *************************************
//
//   First Level
//   -> Description
//
// *************************************

// -------------------------------------
//   Second Level
// -------------------------------------

// ----- Third Level ----- //

// Fourth Level
+

Next →

+
+ + + + + diff --git a/vendor/index.html b/vendor/index.html deleted file mode 100644 index 05d8d14..0000000 --- a/vendor/index.html +++ /dev/null @@ -1,23 +0,0 @@ - Vendor / MVCSS
Toggle

Vendor

Vendor is where we include all third-party style sheets and is intentionally empty by default.

Vendor may contain unaltered third-party code, as well as refactored modules from other libraries, frameworks, and UI toolkits. To include any .css files, you can change their file extentions to .scss and use @import as you would normally.

If a snippet of code is portable and no larger than a single class, we usually paste these alongside others modules in the Helpers section.

Note: although _reset.sass contains third-party code, we include it inside Foundation. This helps us organize low-level styles and prevent some potential source order dependency issues when authoring CSS.

\ No newline at end of file