Milligram is a minimalist CSS framework designed to provide a lightweight and clean starting point for web projects. Weighing in at only 2kb gzipped, it prioritizes performance and developer productivity by offering a basic set of styles with fewer properties to reset compared to larger UI frameworks. It focuses on core HTML elements like typography, forms, tables, buttons, and a simple grid system. The current stable version is 1.4.1, released in 2023, following a cadence of sporadic updates that address compatibility and add minor feature enhancements, such as responsive tables and new form input types. Its primary differentiation lies in its extreme minimalism, providing only essential styling without dictating a specific UI component library.
npm install milligramVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to include Milligram's CSS within a JavaScript application (e.g., using a bundler like Webpack) and how it styles common HTML elements within a React component.
Migrate to a modern browser target or use an older Milligram version for IE6/7 compatibility.
Use the native `disabled` HTML attribute on `<button>` elements, which Milligram now styles by default, or implement your own custom disabled button styling.
Explicitly define your desired font-family in your custom CSS or ensure `normalize.css` is included and provides the expected defaults.
Ensure your root `html` or `body` element has a consistent `box-sizing` definition, typically `box-sizing: border-box;`. This is generally considered a best practice for modern CSS.
Milligram provides styling for the semantic `<blockquote`> HTML element directly; consider using the HTML tag instead of a class, or create your own custom class for blockquote styling.
Ensure `normalize.css` is imported/linked *before* `milligram.css` in your project. Custom styles should typically be included *after* Milligram to allow for proper overrides.
Explicitly define your desired font-family in your custom CSS if you had specific requirements that Milligram previously handled.
Use the native `disabled` HTML attribute on `<button>` elements, which Milligram styles by default, or create a custom class for disabled button styling.
Ensure your `html` and `body` elements have `box-sizing: border-box;` defined (often done via `normalize.css` or a reset) for consistent behavior.
Verify the import statement `import 'milligram/dist/milligram.min.css';` is correct and placed after any `normalize.css` import. Check your bundler configuration for proper CSS loading.
No dependency data recorded yet.