GithubHelp home page GithubHelp logo

jayyajgh / sass-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 44 KB

This is a sample project containing the basic boilerplate Sass styling code to get a project up and running.

License: MIT License

CSS 100.00%
sass-boilerplate css sass boilerplate

sass-boilerplate's Introduction

Sass boilerplate library

This is a boilerplate project containing the basic Sass styling code to get a project up and running.

Its structure is based on the SMACSS and 7-1 architecture patterns and it contains the basic code to get up and running with breakpoints, typography, colours and other core elements.

Many of the ideas are combinations of various other ideas with some enhancements. I have tried to list all sources in the acknowledgements section. It follows as many of the latest best practices as possible including atomic CSS, BEM, low selector specificity, good vertical rhythm, single direction margins etc.

This is not a library of awesome design ideas. The colours etc. are for demonstration purposes only. The breakpoints, font-sizing and margins etc. are valid and could be used although you will probably want to swap them out for something to fit with your own design.

If vertical rhythm and modular type scales are new to you then these are some good articles to read:

This project is work in progress and will forever stay that way as new concepts appear and best practice changes.

Getting Started

These instructions will get you a copy of the project up and running on your local machine. All documentation is contained within the files themselves. It can be read directly but a nicer way is to run it through SassDoc

Component based architecture

If you are using a component based architecture then this layout will fit in well to the structure. e.g. Vue or React. The main app should include the general CSS build as main.css and each component can include only the required CSS for that component and if required, also scope it to that component. The default included here has all components included in the main CSS file. To support a component structure then remove the components from being included in the main CSS and include the individual component Sass files in each component. They will then also need to import the combined abstracts file.

Prerequisites

This project is written in Sass and so you will need a way of building Sass. All the tools I have used are run using Node and Gulp although you can use anything that can compile Sass (.scss style). I am using gulp-sass. How to install and use gulp-sass

Authors

  • Jason Harris - Initial work - JayyajGH

See also the list of contributors who participated in this project.

Contributing

Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgements

The structure of the boilerplate is based on two main patterns:

The colour palette ideas were formed from these articles:

The initial idea for using Sass maps for breakpoints came from here:

Should we use pixels, rems or ems? The general rules are:

Using utility classes:

Breakpoints and tweakpoints:

Using single direction margins:

Should we use extends or mixins: (Hint: Use mixins...)

Some static code analysis tools I've used are:

sass-boilerplate's People

Contributors

jasonharriseis avatar jayyajgh avatar

Stargazers

 avatar

Watchers

 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.