Code Monkey home page Code Monkey logo

my-codyhouse's Introduction

๐Ÿž CodyHouse Framework

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: a CSS template 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. It compiles into two separate CSS files: style.css and style-fallback.css. The first one includes the CSS custom properties; in the second one the CSS custom properties are replaced by their fallbacks (generated using a PostCSS plugin). A script in the of the index.html file checks CSS variables support and delivers only one CSS file.
  4. util.js: the 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 this framework:

  • lightweight (8KB 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

The Framework and the Components are built following the principle of progressive enhancement. Please 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.

Besides checking JavaScript support, we check the support of CSS custom properties. If the browser supports them, the style.css file is downloaded. Otherwise, the browser downloads the style-fallback.css file, where the CSS variables are replaced by their fallbacks (generated using a PostCSS plugin).

<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>

Gulp

The framework includes a Gulp file with some basic configurations needed to run a web project based on the framework.

To use this Gulp configuration file, once you have downloaded the framework, make sure to 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.

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 the Framework.

Explore the Editors:

Extensions

CodyHouse Snippets

A set of CodyHouse Framework snippets for Visual Studio Code.

Download

CodyHouse Docs

Navigate the CodyHouse documentation directly from within Visual Studio Code.

Download

my-codyhouse's People

Contributors

daaef avatar

Watchers

 avatar  avatar  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.