@dezkareid/css
v1.1.0
Published
Common CSS tools and utilities for dezkareid
Maintainers
Readme
@dezkareid/css
Foundational CSS library for the dezkareid monorepo, providing common tools, resets, and layout primitives using the ITCSS architecture.
Features
- ITCSS Architecture: Organized layers (Tools, Settings, Generic, Elements, Objects, Components, Utilities) for manageable CSS at scale.
- Flat Distribution: Each ITCSS layer is available as a standalone minified CSS file or as part of a single bundle.
- Modern Reset: A global reset (Generic layer) to ensure cross-browser consistency.
- Responsive Tools: SASS mixins for managing breakpoints (
media-up). - Layout Objects: Reusable layout patterns like
.o-containerand.o-stack.
Installation
pnpm add @dezkareid/cssUsage
Using the Full Bundle (CSS)
Import the compiled CSS in your application entry point:
import '@dezkareid/css/dist/main.css';Using Individual Layers
import '@dezkareid/css/dist/generic.css';
import '@dezkareid/css/dist/objects.css';Using SASS Source
Import the folders directly (Sass will automatically use the index.scss within them):
@use "@dezkareid/css/src/tools";
.my-element {
@include tools.media-up('md') {
padding: 2rem;
}
}Layout Objects
.o-container (formerly .max-page-size)
A layout object to constrain the maximum width of a container and center it.
<div class="o-container">
<!-- Content goes here -->
</div>ITCSS Structure
The source files are located in src/, following the Inverted Triangle CSS architecture:
- Tools: SASS mixins and functions (e.g., breakpoints).
- Settings: Global variables and theming.
- Generic: Reset and global styles.
- Elements: Unclassed HTML element styles.
- Objects: Class-based, non-cosmetic layout primitives.
- Components: Specific UI components (mostly handled in
@dezkareid/components). - Utilities: High-specificity, single-purpose helper classes.
