{"id":10649,"library":"codyhouse-framework","title":"CodyHouse Framework v3","description":"CodyHouse Framework v3 is a lightweight, front-end framework primarily built with SCSS for creating accessible and custom user interfaces. It emphasizes a 'no override' approach using CSS custom properties and provides a foundational set of CSS rules and utility classes. While the current stable version discussed here is v3.0.14, the project actively promotes v4.0.0 as the latest major release, suggesting v3 is now in a maintenance or legacy state with no further feature development or breaking changes expected. Its key differentiators include a focus on accessibility, ease of learning, and seamless integration with CodyHouse's library of HTML, CSS, and JS components and visual Global Editors for design system management.","status":"maintenance","version":"3.0.14","language":"javascript","source_language":"en","source_url":"https://github.com/CodyHouse/codyhouse-framework","tags":["javascript","scss","css","framework","design-system","html","front-end","buttons","colors"],"install":[{"cmd":"npm install codyhouse-framework","lang":"bash","label":"npm"},{"cmd":"yarn add codyhouse-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add codyhouse-framework","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The primary way to use CodyHouse Framework is by linking the compiled CSS file in your HTML. Direct `@import` into other CSS is possible but less common for the main output.","wrong":"@import 'codyhouse-framework/main/assets/css/style.css';","symbol":"CSS Stylesheet","correct":"<link rel=\"stylesheet\" href=\"/path/to/codyhouse-framework/main/assets/css/style.css\">"},{"note":"When extending the framework with your own SCSS, you'll import specific partials from the `custom-style` directory. Ensure your SCSS compilation process correctly resolves paths.","wrong":"@import 'custom-style/your-custom-file';","symbol":"SCSS Custom Styles","correct":"@import 'codyhouse-framework/main/assets/css/custom-style/your-custom-file';"},{"note":"The `util.js` file contains global utility functions for CodyHouse components and should be included as a classic script tag before any component scripts. It is not designed as an ES module.","wrong":"import { util } from 'codyhouse-framework/main/assets/js/util.js';","symbol":"util.js","correct":"<script src=\"/path/to/codyhouse-framework/main/assets/js/util.js\"></script>"},{"note":"This script is critical for progressive enhancement, allowing CSS to apply additional styles when JavaScript is enabled. It should be placed in the `<head>` of your document.","wrong":"if (typeof window !== 'undefined') { document.documentElement.classList.add('js'); }","symbol":"JavaScript Enabled Check","correct":"<script>document.getElementsByTagName(\"html\")[0].className += \" js\";</script>"}],"quickstart":{"code":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>CodyHouse Framework Quickstart</title>\n  <script>document.getElementsByTagName(\"html\")[0].className += \" js\";</script>\n  <!-- Link the compiled CSS from your build process or directly from node_modules -->\n  <link rel=\"stylesheet\" href=\"./node_modules/codyhouse-framework/main/assets/css/style.css\">\n  <style>\n    /* Custom styles using framework variables */\n    :root {\n      --color-primary-dark: hsl(210, 50%, 20%);\n    }\n    .my-custom-heading {\n      color: var(--color-primary-dark);\n      font-size: var(--text-xxl);\n      margin-bottom: var(--space-md);\n    }\n  </style>\n</head>\n<body>\n  <header class=\"container padding-y-md\">\n    <h1 class=\"my-custom-heading\">Welcome to CodyHouse Framework</h1>\n    <p class=\"color-contrast-medium text-sm\">A lightweight, accessible front-end framework.</p>\n  </header>\n\n  <main class=\"container padding-y-lg\">\n    <button class=\"btn btn--primary margin-right-sm\">Primary Button</button>\n    <button class=\"btn btn--secondary\">Secondary Button</button>\n\n    <div class=\"grid gap-md margin-top-lg\">\n      <div class=\"col-6@md text-component\">\n        <p>This is a column using the framework's grid system. CodyFrame provides a flexible grid for responsive layouts.</p>\n        <p>Text components allow for easy styling of paragraph elements without applying individual classes.</p>\n      </div>\n      <div class=\"col-6@md bg-primary-light radius-md padding-md text-component\">\n        <p>Another column with a light primary background and rounded corners. Utility classes like <code>bg-primary-light</code>, <code>radius-md</code>, and <code>padding-md</code> are used here.</p>\n      </div>\n    </div>\n  </main>\n\n  <footer class=\"container padding-y-md text-center border-top-alpha\">\n    <p class=\"text-sm color-contrast-low\">Built with CodyHouse Framework.</p>\n  </footer>\n\n  <!-- Include the utility JS file if using CodyHouse components -->\n  <script src=\"./node_modules/codyhouse-framework/main/assets/js/util.js\"></script>\n</body>\n</html>\n","lang":"html","description":"This quickstart demonstrates a basic HTML page setup using CodyHouse Framework v3, including linking the compiled CSS, adding the JS-enabled check, and using a few common utility classes and components like buttons and grid for layout."},"warnings":[{"fix":"Consider migrating to CodyHouse Framework v4 for access to the latest features, improvements, and ongoing support. Refer to the v4 documentation for migration guides and changes.","message":"CodyHouse Framework v4 has been released and is actively promoted. While v3.x has received no breaking changes, users should be aware that future development and new features will focus on v4, making v3 a legacy version.","severity":"breaking","affected_versions":"<4.0.0"},{"fix":"Set up a build pipeline using Gulp or Webpack to compile your custom SCSS and integrate it with the framework's base styles. Consult the documentation for Gulp configuration details.","message":"The framework primarily uses SCSS and CSS custom properties. While it ships with compiled CSS, direct customization is intended through SCSS variables and partials, requiring a build process (e.g., Gulp, Webpack) for optimal use.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Include `util.js` using a `<script>` tag in your HTML, preferably at the end of the `<body>` or before any component JavaScript. Do not attempt to import it as an ES module unless you explicitly transpile it.","message":"The `util.js` file is a collection of global utility functions, primarily used by CodyHouse's separate component library. It is designed to be included as a standard script, not an ES module, and relies on being present before component-specific scripts.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Update `node-sass` and related dependencies to versions compatible with your Node.js installation. Often, running `npm rebuild node-sass` or `npm update` can resolve this. Alternatively, consider migrating to `sass` (Dart Sass) which is more actively maintained and less prone to Node.js version issues.","cause":"Incompatibility between the `node-sass` version used by Gulp/Webpack and your Node.js version. `node-sass` is often sensitive to Node.js updates.","error":"Error: Node Sass does not yet support your current environment: OS X 64-bit with Node.js X.X.X"},{"fix":"CodyHouse Framework's `util.js` is not an ES module. If you need to include it in an ES module context, you'll need a bundler (like Webpack or Rollup) to handle its CommonJS-like inclusion. For direct browser use, include it via a `<script>` tag.","cause":"Attempting to use CommonJS `require()` syntax in an ES module (`.mjs` or `type: \"module\"` in `package.json`).","error":"ReferenceError: require is not defined in ES module scope"},{"fix":"Ensure that your `_colors.scss` (or equivalent file where custom properties are defined) is correctly imported and compiled into your final `style.css`. Verify the variable name is correct and global custom properties are accessible.","cause":"Trying to use a CSS custom property (variable) that hasn't been defined in your active stylesheet or accessible scope.","error":"CSS custom property `--color-primary` is not defined"}],"ecosystem":"npm"}