Capital Framework is a deprecated and abandoned front-end UI library developed by the Consumer Financial Protection Bureau (CFPB). It provides a collection of reusable HTML, CSS (Less), and JavaScript components designed to help build consistent user interfaces. The project's GitHub repository was archived and marked as read-only on July 10, 2020, with an explicit recommendation to migrate to the CFPB's successor design system. While the package version 11.0.1 is listed, active development ceased prior to or around the archiving date, meaning there is no ongoing maintenance, bug fixes, or new feature releases. The framework relies heavily on Less for its styling, requiring `autoprefixer` to ensure cross-browser compatibility. Its key differentiator was being the official UI framework for CFPB projects, providing a standardized, accessible base for government-related web development.
npm install capital-frameworkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a basic project, compile Capital Framework's Less files to CSS with Autoprefixer, and include the resulting styles in an HTML page. It defines a `package.json` script using `lessc` and showcases importing the main framework Less file, then applying some core styles and components in HTML.
Migrate to a actively maintained UI framework or the CFPB's current design system. If continued use is unavoidable, fork the repository and manage maintenance internally.
Update build scripts to use Less compilers that process `@import` directives. Remove any reliance on Grunt for concatenating Capital Framework Less files.
Review project build configurations and Less import paths. Test thoroughly for any broken references or unexpected styling issues resulting from changes in the internal package structure or build process.
Always integrate `autoprefixer` into your CSS build pipeline. Ensure it runs after Less compilation but before the CSS is used in production. Example: `lessc --autoprefix=\"> 0.5%, not dead\" input.less output.css`.
Ensure your `autoprefixer` and `postcss` (if used) dependencies are up-to-date. Configure `browserslist` correctly in your `package.json` or `.browserslistrc` file to specify your target browsers.
Verify that all necessary Capital Framework Less files, especially `cf-core.less` or `capital-framework.less` which define global variables, are correctly imported at the beginning of your main Less file.
Clear your npm cache (`npm cache clean --force`), ensure you're using a compatible Node.js version, and try installing again. Check npm output for more specific error details related to compilation or peer dependencies.