Code Monkey home page Code Monkey logo

01-part-2-smacss's Introduction

Code 301: SMACSSify Exercise

Make sure you have read the intro to SMACSS before working on this assignment. The documentation and guidelines below are open to interpretation, rather than hard and fast guidelines that must be adhered to. Be careful not to spend a lot of time debating the exact correct file for a specific selector; rather, organize your selectors in a way that is meaningful to your project and will make it easier to find and modify those selectors in the future.

You can also find more information in the SMACSS Official Documentation, for reference.

General Guidelines:

  • Styling should progress from broadest to most specific
  • base.css should contain any general styling on top of what is provided by a reset.css or normalize.css file (these files will be discussed in further detail in lecture)
    • Apply to elements such as body and main
    • Examples include styling of overall font and background color
  • layout.css should contain general positioning on the page
    • Apply to elements such as header, footer, nav, aside
    • Classes and IDs can be included here
  • modules.css should contain smaller components on the page
    • Apply to elements such as list items, individual images, specific paragraphs
    • Classes and descendant selectors should primarily be included here
  • state.css should contain any styling that changes upon user interaction or state change
    • Apply to hover state, before or after clicking on a link, focus and blur effects
    • Pseudo-classes and pseudo-elements should be included here
  • theme.css should contain small changes on top of all other normal styling
    • Applying temporary changes, such as a holiday theme

Instructions

Plan to spend about 5 minutes reading through this document before getting started on the code.

After that, follow the instructions below to fork and clone this repository, and then spend about 45 minutes working in the starter code.

  1. Fork and then clone this repository into your ~/codefellows/301 directory, and navigate into that repo.
  2. Work on your fork on a non-master branch. As you work, remember to add, commit, and push regularly.
  3. Start by reading through the HTML and CSS files to see how they are interconnected.
  4. Create the following files: base.css, layout.css, and modules.css, and link them into the HTML file. For this code base, you will not need state.css or theme.css files.
  5. Following SMACSS conventions, move the individual CSS rules from style.css into the appropriate new CSS file. Feel free to refactor and optimize the individual CSS rules and HTML file as needed as you go through this process.
  6. As you work, verify the styling is maintained in the browser.
  7. When everything has been removed from style.css, delete the file, and delete the link from the HTML file.
  8. When finished, push your branch back to your fork on GitHub, and merge it into master. Submit the link to this pull request in the corresponding Canvas assignment. You can submit a link to a pull request even if the pull request is closed.

01-part-2-smacss's People

Contributors

mnfmnfm avatar inkh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.