0.0.7 • Published 2 years ago

ngx-style v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

NgxStyle

NgxStyle is an Angular component library that gives you CSS directives for your application

Install

npm install ngx-style --save

Import

...
import { NgxStyleModule } from 'ngx-style';
...

@NgModule({
  ...
  imports: [
    ...
    NgxStyleModule,
  ],
  ...
})
export class AppModule { }

Usage

<div [w]="'20%'">
  <p>content goes here.</p>
</div>
<div w="50rem">
  <p>content goes here.</p>
  <div [w]="'40%'" ml="50px">
    <p>content goes here.</p>
  </div>
</div>
<div m="2rem 20% 32px auto">
  <p>content goes here.</p>
  <div ml="3em">
    <p>content goes here.</p>
  </div>
</div>

CSS Directives

CSS PropertiesDirectives
align-contentac
align-itemsai
align-selfas
backgroundbg
background-attachmentbgatt
background-colorbgc
background-imagebgi
background-positionbgp
background-repeatbgr
background-sizebgs
borderbr
border-bottombrb
border-colorbrc
border-leftbrl
border-radiusbrrad
border-rightbrr
border-stylebrs
border-topbrt
border-widthbrw
bottomb
box-shadowbxs
colorc
cursorcr
displayd
flexfx
flex-basisfxb
flex-directionfxd
flex-flowfxf
flex-growfxg
flex-shrinkfxs
flex-wrapfxw
floatflt
fontfnt
font-familyfntf
font-sizefnts
font-stylefntstl
font-weightfntw
heighth
justify-contentjc
justify-itemsji
justify-selfjs
leftl
marginm
margin-blockmy
margin-block-endmye
margin-block-startmys
margin-bottommb
margin-inlinemx
margin-inline-endmxe
margin-inline-startmxs
margin-leftml
margin-rightmr
margin-topmt
max-heightmaxh
max-widthmaxw
min-heightminh
min-widthminw
overflowof
overflow-xofx
overflow-yofy
paddingp
padding-blockpy
padding-block-endpye
padding-block-startpys
padding-bottompb
padding-inlinepx
padding-inline-endpxe
padding-inline-startpxs
padding-leftpl
padding-rightpr
padding-toppt
positionpos
rightr
text-alignta
text-decorationtd
text-shadowts
topt
vertical-alignva
widthw
writing-modewm
z-indexzi

License

Uses MIT licensed code from Angular

MIT License

Copyright 2022 Mohideen Nizamudeen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.