@thenewcss/helpers
v1.0.0
Published
Utility helpers for the-new-css
Maintainers
Readme
@thenewcss/helpers
Utility helpers for the-new-css utility-first CSS library.
What's included
.clearfixfor float clearing.ratio-*aspect ratio containers (1x1, 4x3, 16x9, 21x9).vstackand.hstackfor vertical/horizontal stacks.stretched-linkto make a link's clickable area cover its container.vrvertical rule divider.focus-ringcustom focus indicator.object-*object-fit utilities (contain, cover, fill, none, scale-down).float-*float utilities (start, end, none).align-*vertical alignment utilities
Install
npm install @thenewcss/helpersUsage
Include the CSS after the-new-css base library:
<link rel="stylesheet" href="path/to/the-new-css.min.css" />
<link rel="stylesheet" href="path/to/@thenewcss/helpers/dist/index.min.css" />Aspect Ratios
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/..." allowfullscreen></iframe>
</div>Stacks
<div class="vstack">
<div>First</div>
<div>Second</div>
<div>Third</div>
</div>
<div class="hstack">
<div>Left</div>
<div class="vr"></div>
<div>Right</div>
</div>Object Fit
<img src="photo.jpg" class="object-cover" style="width: 200px; height: 200px;">License
MIT
