bootstrap-styled-utils
v1.0.2
Published
UMD module for helper functions used as utilities in bootstrap-styled
Downloads
442
Maintainers
Readme
bootstrap-styled-utils
bootstrap-styled-utils are utils function used in our bootstrap-styled components.
Master
Dev
Table of Contents
Installation
npm install bootstrap-styled-utils --save
Changelog
- View Changelog
Utilities
- obj
unitUtils
- const
UNIT
:{ EM, REM, PX, PERCENT }
: constants - obj
math
:{ addition, subtract, multiply, divide }
: math operation - fn
detectUnit
: detect the unit of a value - fn
rmUnit
: remove the unit from a value - fn
toPercent
: convert to percentage
- const
- fn
parseTransition
: return a transitionList[{ property, duration, timingFunction, delay }]
from a css transition rule. - fn
toHashCode
: return a hash code. - fn
getTetherAttachment
: return attachment{ attachment, tragetAttachment }
from position. - Array
tetherAttachements
: list of tether position. - fn
getScrollbarWidth
: get the width of the scrollbar. - fn
setScrollbarWidth
: set the width of the scrollbar to the body style. - fn
isBodyOverflowing
: return true if body is overflowing. - fn
getOriginalBodyPadding
: return original body padding. - fn
conditionallyUpdateScrollbar
: fix scrollbar depending on navbar classes.
Quick start
Clone project
git clone ssh://[email protected]:20024/styled-components/bootstrap-styled-utils.git
Install dependencies
npm install
Build project
npm run build
Run unit test
npm test
Watch unit test
npm run test:watch
Watch the /dist
directory
npm run build:dist:watch
Watch the /lib
directory
npm run build:lib:watch
Contribute
master
is used to release the version.
master
only accept merge requests fromdev
dev
is the development branch. It should be used by developers for applying their merge requests.
If you wish to implement new features, you will need to do a merge request including your change on the dev
branch.
git checkout dev
git checkout $(whoami)-dev
git push -u origin $(whoami)-dev
You can now start working on your branch.
License
Licensed under the MIT License, Copyright © 2017-present Yeutech Company Limited.
See LICENSE for more information.