Git Product home page Git Product logo

codyhouse-framework's Introduction

๐Ÿž CodyFrame

A lightweight front-end framework for building accessible, bespoke interfaces.

Explore the documentation on codyhouse.co

The framework is composed of:

  1. _base.scss: essential CSS rules and utility classes.
  2. _custom-style.scss: CSS templates you can use to create your bespoke style (e.g., buttons, forms, and colors).
  3. style.scss: used to import the _base.scss and _custom-style.scss files.
  4. util.js: utility functions used in the CodyHouse Components. Make sure to import this file before the component script file.

Some of the advantages of working with CodyFrame:

  • โšก๏ธ lightweight (9KB minified and gzipped)
  • ๐Ÿ™Œ no need to override existing CSS rules
  • ๐Ÿ“ฑ mobile-first
  • ๐ŸŽจ create unique designs with total control
  • ๐Ÿ“– easy to learn
  • ๐Ÿ’ผ a library of accessible components
codyhouse-framework/
โ””โ”€โ”€ main/
    โ”œโ”€โ”€ assets/
    โ”‚   โ”œโ”€โ”€ css/
    โ”‚   โ”‚   โ”œโ”€โ”€ base/
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _accessibility.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _breakpoints.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _buttons.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _colors.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _forms.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _grid-layout.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _icons.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _mixins.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _reset.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _shared-styles.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _spacing.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _typography.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _util.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _visibility.scss
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ _z-index.scss
    โ”‚   โ”‚   โ”‚โ”€โ”€ custom-style/
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _buttons.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _colors.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _forms.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _shared-styles.scss
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _spacing.scss
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ _typography.scss
    โ”‚   โ”‚   โ”œโ”€โ”€ _base.scss
    โ”‚   โ”‚   โ”œโ”€โ”€ _custom-style.scss
    โ”‚   โ”‚   โ”œโ”€โ”€ style-fallback.css
    โ”‚   โ”‚   โ”œโ”€โ”€ style.css
    โ”‚   โ”‚   โ””โ”€โ”€ style.scss
    โ”‚   โ””โ”€โ”€ js/
    โ”‚       โ””โ”€โ”€ util.js
    โ””โ”€โ”€ index.html

Progressive enhancement

If you're using the Components, make sure to include the following script in the <head> of your document:

<script>document.getElementsByTagName("html")[0].className += " js";</script>

The script is used in CSS to target that JavaScript is enabled and apply additional style accordingly. If you don't include the script, part of the style of the components won't be visible.

Gulp

CodyFrame includes a Gulp configuration file. To start a project that runs on Gulp, once you have downloaded the source files, navigate to the framework folder, and run the following commands in your command line:

npm install
npm run gulp watch

The first command will install the modules the framework requires for compiling SCSS into CSS; the second will launch your project on a development server.

โš ๏ธ Note: if you receive error messages while trying to run the npm install command, you may need to download and install Git first.

The Gulp configuration file is set to compile the SCSS into two separate CSS files: style.css includes the CSS variables; in the style-fallback.css file, the CSS variables are replaced by their fallbacks (generated by the PostCSS plugin). A script in the of the index.html file is used to deliver only one file, according to whether the browser supports CSS variables or not.

<script>
  if('CSS' in window && CSS.supports('color', 'var(--color-var)')) {
    document.write('<link rel="stylesheet" href="assets/css/style.css">');
  } else {
    document.write('<link rel="stylesheet" href="assets/css/style-fallback.css">');
  }
</script>
<noscript>
  <link rel="stylesheet" href="assets/css/style-fallback.css">
</noscript>

๐Ÿ“ How to use the Framework with Webpack

Component Library

CodyHouse's Components are accessible, progressively enhanced, HTML, CSS, JS components that work seamlessly with the framework.

Explore the Components

Global Editors

The Global Editors are web design tools that allow you to set the style of typography elements, color themes, spacing rules, buttons, and forms directly in the browser. They generate SCSS code that is compatible with CodyFrame.

Explore the Editors:

Extensions

Explore our autocomplete extensions for VSCode, Sublime Text and Atom:

codyhouse.co/ds/docs/extensions

codyhouse-framework's People

Contributors

claudia-romano avatar sebastiano-guerriero avatar kyleking avatar peiche avatar saeedvz 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.