@nitro-ui/utility-spacing
v1.0.13
Published
Spacing component for Nitro UI.
Downloads
138
Readme
Nitro UI: Utility Spacing
Utility Spacing component for Nitro UI.
Getting Started
Get latest version by installing via NPM @nitro-ui/utility-spacing:
npm install @nitro-ui/utility-spacing
Property classes
Available property class
sides
: to add padding / margin on left & right
ends
: to add padding / margin on top & bottom
top
: to add padding / margin on top
bottom
: to add padding / margin on bottom
left
: to add padding / margin on left
right
: to add padding / margin on right
Spacing size
The spacing consist of 7 spacing sizes:
xxl - 64px
xl - 48px
lg - 24px
md - 16px
sm - 12px
xs - 8px
xxs - 4px
Usage for padding
<div class="u-padding-lg"></div>
<div class="u-padding-sides-sm"></div>
<div class="u-padding-bottom-xl"></div>
Use none
to reset padding
<div class="u-padding-none"></div>
<div class="u-padding-sides-none"></div>
<div class="u-padding-bottom-none@mobile"></div>
Usage for margin
<div class="u-margin-lg"></div>
<div class="u-margin-sides-sm"></div>
<div class="u-margin-bottom-xl"></div>
Use none
to reset margin
<div class="u-margin-none"></div>
<div class="u-margin-sides-none"></div>
<div class="u-margin-bottom-none@mobile"></div>
Margin support auto
property
Spacing
<div class="u-margin-auto"></div>
<div class="u-margin-sides-auto"></div>
<div class="u-margin-sides-auto@mobile"></div>
Usage for Responsiveness
Spacing also supports the responsive abilities for non-desktop devices. Just add the classname with breakpoint property u-[spacing-type]-[spacing-size]@[responsive-breakpoint]
.
<div class="u-margin-lg u-margin-bottom-xs@mobile"></div>
<div class="u-padding-sides-sm u-padding-sides-lg@mobile-tablet"></div>
<div class="u-margin-bottom-xl u-margin-bottom-xs@mobile"></div>
<div class="u-margin-bottom-xs@mobile-small"></div>
List of responsive breakpoint available
@portable
: starts at 1080px and below
@mobile-tablet
: starts at 1080px and below
@tablet
: starts at 768px to 1080px
@mobile
: starts at 767px and below
@mobile-small
: starts at 321px and below
Development
To extends, develop or contribute to this component, you're required to fork our main repository and made a pull request.
Development Requirements
Development tools required for this component are:
Ruby and SASS are optional if you're fully using node-sass from npm for development.
Development Setup
Run:
npm install
Compile
Run:
grunt
TODO
Nothing todo for now.
CHANGELOG
All notable changes to this project will be documented in this file. For now, let's keep TODO and CHANGELOG in README file. Keeping things simple.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.0.0-beta] - 2019-08-23
Added
- Initial setup for spacing