├── cya-supercomputer.jpg ├── files ├── refactoring-gameplan.pdf └── schedule.md ├── examples ├── architecture-examples │ ├── makersquare │ │ ├── config │ │ │ ├── _webfonts.scss │ │ │ ├── _theme-mks-dark.sass │ │ │ ├── _theme-mks-default.sass │ │ │ ├── _colors.sass │ │ │ ├── _config.sass │ │ │ ├── _typography.sass │ │ │ └── _helpers.sass │ │ ├── application.sass │ │ ├── layout.sass │ │ ├── README.md │ │ ├── modules │ │ │ ├── _course-part-time.sass │ │ │ ├── _mission-statement.sass │ │ │ ├── _forms.sass │ │ │ ├── course-page-modules │ │ │ │ ├── _course-cta.sass │ │ │ │ ├── _course-technologies.sass │ │ │ │ ├── _course-intro.sass │ │ │ │ ├── _course-locations.sass │ │ │ │ ├── _course-outcomes.sass │ │ │ │ └── _course-upcoming.sass │ │ │ ├── _buttons.sass │ │ │ ├── _news-blog.sass │ │ │ ├── _notifications.sass │ │ │ ├── _student-quotes.sass │ │ │ ├── _overview.sass │ │ │ ├── _info-boxes.sass │ │ │ └── _team-grid.sass │ │ ├── layout │ │ │ ├── _sections.sass │ │ │ ├── _page.sass │ │ │ ├── _footer.sass │ │ │ └── _header.sass │ │ ├── config.sass │ │ └── modules.sass │ ├── dale-sande.md │ ├── simple-import.scss │ ├── jina.md │ └── sassy-starter.md ├── state-classes.scss ├── comment-instructions.scss ├── abstracted-var-names.md ├── sample-grunt-config.json ├── simple-theming │ ├── 4-config-import.scss │ ├── 1-vars.scss │ ├── 3-theme.scss │ └── 2-config.scss ├── useful-grunt-plugins.md ├── alpha-font-sizing.scss ├── parent-selector.scss ├── simple-namespacing.scss └── named-media-queries.scss ├── exercise ├── buttons-exercise │ ├── 4-mixins │ │ └── style.css │ ├── 3-change-classes │ │ └── style.css │ ├── 1-original-css-html │ │ ├── style.css │ │ ├── buttons.html │ │ ├── buttons-original.css │ │ └── buttons-original.scss │ ├── 2-shared-scss-nesting │ │ ├── style.css │ │ ├── buttons.scss │ │ └── buttons.html │ └── README.md └── README.md ├── resources ├── naming │ └── resources.md ├── ie-rwd │ └── resources.md ├── architecture │ └── resources.md ├── technical │ └── resources.md ├── testing-perf │ └── resources.md ├── style-guides │ └── resources.md ├── tips-tricks │ └── resources.md ├── installation │ └── resources.md └── theory │ └── resources.md └── README.md /cya-supercomputer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jina/refactoring/HEAD/cya-supercomputer.jpg -------------------------------------------------------------------------------- /files/refactoring-gameplan.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jina/refactoring/HEAD/files/refactoring-gameplan.pdf -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/config/_webfonts.scss: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------- // 2 | // FONT-FACE DECLARATION ---------------------------- // 3 | // -------------------------------------------------- // 4 | 5 | $font-path: "/fonts/"; 6 | 7 | // font-face declarations 8 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/application.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // APPLICATION IMPORT ----------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | @import "config" 6 | @import "layout" 7 | @import "modules" 8 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/layout.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // BASE PAGE & LAYOUT STYLES ---------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | @import "layout/page" 6 | @import "layout/sections" 7 | @import "layout/header" 8 | @import "layout/footer" 9 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/4-mixins/style.css: -------------------------------------------------------------------------------- 1 | /* Body styles */ 2 | body { 3 | font-family: 'Proxima Nova', 'Calibri', 'Helvetica Neue', 'Helvetica,' Arial, sans-serif; 4 | font-size: 100%; 5 | } 6 | 7 | .container { 8 | max-width: 1200px; 9 | width: 80%; 10 | margin: 0 auto; 11 | padding: 40px 0; 12 | } 13 | 14 | a, a:hover, a:active, a:visited {text-decoration: none; font-weight: normal;} 15 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/README.md: -------------------------------------------------------------------------------- 1 | ## MakerSquare Architecture Example 2 | 3 | This is how I am architecting things at MakerSquare for our new website. It's fairly simple, as this is a marketing site, rather than a large product. 4 | 5 | Please note this is _very much_ still a work in progress, so there will probably be wonky code in places and the architecture may change going forward! 6 | 7 | -Elyse 8 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/3-change-classes/style.css: -------------------------------------------------------------------------------- 1 | /* Body styles */ 2 | body { 3 | font-family: 'Proxima Nova', 'Calibri', 'Helvetica Neue', 'Helvetica,' Arial, sans-serif; 4 | font-size: 100%; 5 | } 6 | 7 | .container { 8 | max-width: 1200px; 9 | width: 80%; 10 | margin: 0 auto; 11 | padding: 40px 0; 12 | } 13 | 14 | a, a:hover, a:active, a:visited {text-decoration: none; font-weight: normal;} 15 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/1-original-css-html/style.css: -------------------------------------------------------------------------------- 1 | /* Body styles */ 2 | body { 3 | font-family: 'Proxima Nova', 'Calibri', 'Helvetica Neue', 'Helvetica,' Arial, sans-serif; 4 | font-size: 100%; 5 | } 6 | 7 | .container { 8 | max-width: 1200px; 9 | width: 80%; 10 | margin: 0 auto; 11 | padding: 40px 0; 12 | } 13 | 14 | a, a:hover, a:active, a:visited {text-decoration: none; font-weight: normal;} 15 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/2-shared-scss-nesting/style.css: -------------------------------------------------------------------------------- 1 | /* Body styles */ 2 | body { 3 | font-family: 'Proxima Nova', 'Calibri', 'Helvetica Neue', 'Helvetica,' Arial, sans-serif; 4 | font-size: 100%; 5 | } 6 | 7 | .container { 8 | max-width: 1200px; 9 | width: 80%; 10 | margin: 0 auto; 11 | padding: 40px 0; 12 | } 13 | 14 | a, a:hover, a:active, a:visited {text-decoration: none; font-weight: normal;} 15 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/_course-part-time.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // COURSE PAGE: PARTTIME SETTINGS ---------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | // Page class 6 | .page-pt-frontend 7 | padding: 9em 0 0 0 8 | 9 | .page-pt-frontend header, 10 | .page-pt-frontend .course-page-intro 11 | background: $navy 12 | 13 | -------------------------------------------------------------------------------- /examples/state-classes.scss: -------------------------------------------------------------------------------- 1 | // JS STATE CLASS EXAMPLES ------------------------------------------ // 2 | 3 | // Buttons 4 | .button { 5 | &.is-active { background: red; color: white; } 6 | } 7 | 8 | // Nav Links 9 | .nav-link { 10 | &.is-active { color: green; } 11 | } 12 | 13 | /* OUTPUT */ 14 | .button.is-active { 15 | background: red; 16 | color: white; 17 | } 18 | 19 | .nav-link.is-active { 20 | color: green; 21 | } 22 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/_mission-statement.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // MISSION STATEMENT------------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | 6 | .mission-statement 7 | background: $navy 8 | border-bottom: $border-width-default solid $green 9 | 10 | p.quote 11 | color: $text-color-reverse 12 | 13 | -------------------------------------------------------------------------------- /examples/architecture-examples/dale-sande.md: -------------------------------------------------------------------------------- 1 | ``` 2 | |- sass/ 3 | |--- buttons/ 4 | |--- color/ 5 | |--- forms/ 6 | |--- layouts/ 7 | |--- modules/ 8 | |----- registration/ 9 | |------- _extends.scss 10 | |------- _functions.scss 11 | |------- _mixin.scss 12 | |------- _module_registration.scss 13 | |--- typography/ 14 | |--- ui_patterns/ 15 | |--- _buttons.scss 16 | |--- _config.scss 17 | |--- _forms.scss 18 | |--- _typography.scss 19 | |--- style.scss 20 | ``` 21 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/2-shared-scss-nesting/buttons.scss: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------ // 2 | // BUTTONS MODULE --------------------------------------------- // 3 | // ------------------------------------------------------------ // 4 | 5 | // Copy over new, clean button SCSS into this file. Call it from 6 | // buttons.html to see if it's working—leave the old one commented 7 | // out so you can toggle them and make sure everything looks right. 8 | -------------------------------------------------------------------------------- /examples/comment-instructions.scss: -------------------------------------------------------------------------------- 1 | // Transitions ------------------------------------------ // 2 | // ------------------------------------------------------ // 3 | // to use, apply @include transition() with arguments 4 | // type, time, and function 5 | // ex: @include transition(color,0.5s,ease) 6 | 7 | @mixin transition($type,$time,$function) { 8 | -webkit-transition: $type $time $function; 9 | -moz-transition: $type $time $function; 10 | -o-transition: $type $time $function; 11 | transition: $type $time $function; 12 | } 13 | -------------------------------------------------------------------------------- /examples/abstracted-var-names.md: -------------------------------------------------------------------------------- 1 | // Abstracted Variable Names 2 | 3 | // Primary, Secondary, Tertiary, etc 4 | $header-primary: 5 | $header-secondary: 6 | $header-tertiary: 7 | 8 | 9 | // Color Themed Light-Dark 10 | $background-color-default: 11 | $background-color-highlight: 12 | $background-color-lowlight: 13 | $background-color-dark: 14 | 15 | // Module Related 16 | $button-bg: 17 | $button-border: 18 | $button-shadow: 19 | $button-color: 20 | $button-bg-hover: 21 | $button-border-hover: 22 | $button-shadow-hover: 23 | $button-color-hover: 24 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/layout/_sections.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // PAGE SECTIONS ---------------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | 6 | // Sections General Styles ------------------------------ // 7 | // ------------------------------------------------------ // 8 | 9 | section 10 | @include breakpoint(tiny) 11 | padding: 3em 0 4em 12 | @include breakpoint(medium) 13 | padding: 6em 0 9em 14 | 15 | .section-title 16 | -------------------------------------------------------------------------------- /examples/sample-grunt-config.json: -------------------------------------------------------------------------------- 1 | grunt.initConfig({ 2 | watch: { 3 | css: { 4 | files: ['Gruntfile.js', 'app/**/*.js', './app/scss/**/*.scss'] 5 | }, 6 | livereload: { 7 | options: { livereload: true } 8 | } 9 | }, 10 | 11 | connect: { 12 | server: { 13 | options: { 14 | port: 8000, 15 | base: './app', 16 | livereload: true 17 | } 18 | } 19 | }, 20 | 21 | open: { 22 | dev : { 23 | path: 'http://localhost:8000' 24 | } 25 | } 26 | }); 27 | 28 | // Server Task 29 | grunt.registerTask('server', [ 30 | 'connect', 31 | 'open', 32 | 'watch' 33 | ]); 34 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/_forms.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // FORMS AND INPUTS ------------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | input[type="text"] 6 | display: inline-block 7 | border: 0 8 | border-radius: $border-radius-default 9 | padding: .25em .5em 10 | line-height: $line-large 11 | font-family: $body-font 12 | font-size: $epsilon 13 | -webkit-font-smoothing: antialiased 14 | color: $grey-dark 15 | background: $white 16 | -------------------------------------------------------------------------------- /examples/simple-theming/4-config-import.scss: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // Configuration File Import ---------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | // Import the configuration file that sets default variables 6 | @import "config/config"; 7 | 8 | // Import helpers, vars, and mixins 9 | @import "config/helpers"; 10 | @import "config/colors"; 11 | 12 | // Choose theme 13 | @import "config/theme-default"; 14 | // @import "config/theme-dark"; 15 | // @import "config/theme-light"; 16 | 17 | // Import typography 18 | @import "config/typography"; 19 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/config.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // Configuration File Import ---------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | // Import the configuration file that sets default variables 6 | @import "config/config" 7 | 8 | // Import helpers and mixins 9 | @import "config/helpers" 10 | 11 | // Import colors and theme 12 | @import "config/colors" 13 | @import "config/theme-default" 14 | // @import "config/theme-dark" 15 | 16 | // Import webfonts, typography 17 | @import "config/webfonts" 18 | @import "config/typography" 19 | 20 | -------------------------------------------------------------------------------- /examples/useful-grunt-plugins.md: -------------------------------------------------------------------------------- 1 | // npm install --save-dev ... 2 | grunt-contrib-sass // Compile Sass to CSS with Ruby compiler 3 | grunt-sass // Compile Sass to CSS using node-sass/libsass 4 | grunt-contrib-connect // Start a web server 5 | grunt-open // Open server in your browser automatically 6 | grunt-contrib-watch // Watch for file changes 7 | connect-livereload // Auto-reload browser with files are changed 8 | grunt-contrib-imagemin // Minify PNG and JPG images 9 | grunt-contrib-htmlmin // Minify HTML 10 | grunt-contrib-cssmin // Minify compiled CSS files 11 | grunt-autoprefixer // Adds vendor prefixes automatically 12 | -------------------------------------------------------------------------------- /examples/simple-theming/1-vars.scss: -------------------------------------------------------------------------------- 1 | // COLORS.SCSS ------------------------------------------ // 2 | 3 | // Blues ------------------------------------------------ // 4 | $navy: rgb(1, 46, 81); // MKS Navy 5 | $blue-dark: rgb(23, 75, 133); 6 | $blue-bright: rgb(35, 128, 226); // MKS Primary Blue 7 | $blue-light: rgb(99, 159, 222); 8 | $blue-pale: rgb(206, 226, 247); 9 | 10 | // Secondary colors ------------------------------------- // 11 | // use sparingly, for contrast and highlight only 12 | $orange: rgb(255, 152, 0); 13 | $orange-light: lighten($orange, 50%); 14 | $orange-dark: rgb(194, 105, 1); 15 | 16 | $green: rgb(130, 179, 0); 17 | $green-light: lighten($green, 50%); 18 | $green-dark: rgb(18, 120, 0); 19 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/course-page-modules/_course-cta.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // MODULE: COURSE CALL TO ACTION ------------------------ // 3 | // ------------------------------------------------------ // 4 | 5 | .course-call-to-action 6 | background: $background-color-dark 7 | border-top: $border-width-default solid $blue-bright 8 | border-bottom: $border-width-default solid $off-white 9 | 10 | h2, 11 | p.intro, 12 | p 13 | color: $white 14 | 15 | p.intro 16 | margin-bottom: 0 17 | 18 | .cta-description 19 | width: 65% 20 | 21 | .cta-buttons-wrapper 22 | margin-top: 4em 23 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/course-page-modules/_course-technologies.sass: -------------------------------------------------------------------------------- 1 | // Technologies Widget 2 | 3 | .course-technologies 4 | border-top: $border-width-default solid $off-white 5 | padding-bottom: 0 // too much space above locations 6 | 7 | h2 8 | margin-bottom: 2em 9 | 10 | .technologies-list 11 | 12 | .technology 13 | float: left 14 | width: 20% 15 | margin-right: 6% 16 | min-height: 35em 17 | &:nth-child(4n) 18 | margin-right: 0 19 | 20 | .technology-image 21 | height: 170px 22 | margin-bottom: 1em 23 | 24 | img 25 | max-width: 80% 26 | 27 | .technology-jekyll 28 | .technology-image 29 | img 30 | padding-top: 2.5em 31 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/layout/_page.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // GENERAL PAGE LAYOUT ---------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | body 6 | background: $background-color-default 7 | margin: 0 8 | min-width: 300px 9 | font-size: 100% 10 | 11 | .page 12 | // padding: 9em 0 0 0 13 | 14 | * 15 | box-sizing: border-box 16 | 17 | .container 18 | margin: 0 auto 19 | max-width: 80em // 1280px 20 | width: 85% // default 21 | @extend %clearfix 22 | @include breakpoint(tiny) 23 | width: 90% 24 | @include breakpoint(medium) 25 | width: 85% 26 | @include breakpoint(large) 27 | width: 75% 28 | 29 | img 30 | max-width: 100% 31 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // MODULES IMPORT --------------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | // Components 6 | @import "modules/buttons" 7 | @import "modules/notifications" 8 | @import "modules/forms" 9 | 10 | // Modules - Shared 11 | @import "modules/student-quotes" 12 | @import "modules/mission-statement" 13 | @import "modules/news-blog" 14 | @import "modules/team-grid" 15 | 16 | 17 | // Modules - Course Page 18 | @import "modules/course-page-modules/course-intro" 19 | @import "modules/course-page-modules/course-upcoming" 20 | @import "modules/course-page-modules/course-outcomes" 21 | @import "modules/course-page-modules/course-technologies" 22 | @import "modules/course-page-modules/course-locations" 23 | @import "modules/course-page-modules/course-cta" 24 | -------------------------------------------------------------------------------- /examples/alpha-font-sizing.scss: -------------------------------------------------------------------------------- 1 | // GREEK LETTER NAMING FOR TYPE ------------------------------------------ // 2 | 3 | 4 | // Typography with Variables; Greek Letter Naming 5 | 6 | $giga: 4.5em; 7 | $alpha: 3.662em; 8 | $beta: 2.930em; 9 | $gamma: 1.875em; 10 | $delta: 1.5em; 11 | $epsilon: 1.2em; 12 | $zeta: .875em; 13 | $iota: .75rem; 14 | 15 | h1 { 16 | font-family: $header-primary; 17 | font-size: $beta; 18 | } 19 | 20 | h2 { 21 | font-family: $header-secondary; 22 | font-size: $beta; 23 | } 24 | 25 | h3 { 26 | font-family: $header-tertiary; 27 | font-size: $gamma; 28 | } 29 | 30 | 31 | 32 | 33 | 34 | // Typography with Extends; Greek Letter Naming 35 | 36 | h1, %alpha { 37 | font-size: 32px; 38 | line-height: 1.5; 39 | } 40 | 41 | h2, %beta { 42 | font-size: 24px; 43 | line-height: 1.5; 44 | } 45 | 46 | h3, %gamma { 47 | font-size: 20px; 48 | line-height: 1.75; 49 | } 50 | 51 | .quote { 52 | @extend %beta; 53 | } 54 | -------------------------------------------------------------------------------- /examples/architecture-examples/simple-import.scss: -------------------------------------------------------------------------------- 1 | // General Import Concept 2 | 3 | |- sass/ 4 | |--- application.sass // manifest, imports config, components, modules, frameworks 5 | |--- config.sass // imports actual config file, helpers, colors, typography, themes 6 | |--- config/ 7 | |------ _config.sass 8 | |------ _helpers.sass // includes mixins, testing functions, css3, js is- states 9 | |------ _colors.sass 10 | |------ _typography.sass // webfonts and type declarations 11 | |--- components.sass // imports icons, buttons, UI elements, page components 12 | |--- components/ 13 | |------ page.sass // general page/body 14 | |------ header.sass 15 | |------ footer.sass 16 | |------ buttons.sass 17 | |------ icons.sass 18 | |------ nav.sass 19 | |------ forms.sass 20 | |--- modules.sass // imports page content and semantic HTML 21 | |--- modules/ 22 | |------ [your page content files] 23 | |--- vendor // imports CSS from third party or JS libs 24 | -------------------------------------------------------------------------------- /examples/architecture-examples/makersquare/modules/_buttons.sass: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------ // 2 | // BUTTONS ---------------------------------------------- // 3 | // ------------------------------------------------------ // 4 | 5 | .button 6 | display: inline-block 7 | transition: .5s background-color ease 8 | -webkit-transition: .5s background-color ease 9 | border: 0 10 | border-radius: $border-radius-default 11 | padding: .75em 1.25em 12 | line-height: $line-large 13 | text-transform: uppercase 14 | font-family: $button-font 15 | font-size: $epsilon 16 | text-rendering: geometricPrecision 17 | color: $button-color 18 | background: $button-bg 19 | 20 | a 21 | color: $button-color 22 | 23 | &:hover, 24 | &:focus, 25 | &:active 26 | font-family: $button-font 27 | color: $button-color-hover 28 | background: $button-bg-hover 29 | 30 | // varying button styles here 31 | -------------------------------------------------------------------------------- /exercise/buttons-exercise/1-original-css-html/buttons.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |