2.0.5 • Published 1 month ago

antd-css-utilities v2.0.5

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

Ant Design CSS Utilities

GitHub license npm version

Basic CSS utilities for ant design. Ant design doesn't have its own CSS utility classes, so we are here to help you. You can easily integrate and start using this library with ant design as well as other frameworks you like.

Installation

$ npm install antd-css-utilities

Add Into Your Project

React.js (index.js)

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
++ import 'antd-css-utilities/utility.min.css'

ReactDOM.render(
    <React.StrictMode>
        <App />
    </React.StrictMode>,
    document.getElementById('root')
);

Setup Intellisense

{
  "html-css-class-completion.includeGlobPattern": "node_modules/antd-css-utilities/utility.min.css"
}

If you already use IntelliSense for CSS class names in HTML

  • Add this line in your [PROJECT]/.vscode/settings.json file
{
  "html-css-class-completion.includeGlobPattern": "{[YOUR_PATTERN],node_modules/antd-css-utilities/utility.min.css}"
}

Margin & Padding

Class NamesMeaning
mamargin(x & y axis)
mxmargin(x axis)
mymargin(y axis)
mtmargin-top
mlmargin-left
mrmargin-right
mbmargin-bottom
papadding(x & y axis)
pxpadding(x axis)
pypadding(y axis)
ptpadding-top
plpadding-left
prpadding-right
pbpadding-bottom

Example:

<div class="ma-10">
  <div class="ma-auto">Hello World!</div>
</div>
<!--value: 1-16 & auto -->

Other utility support. See All

  • Flex
    • Flex
    • Justify
    • Align
    • Direction
    • Wrap
    • Grow
    • Gap
  • Float
  • Overflow
  • Position
    • Position
    • Top
    • Right
    • Bottom
    • Left
  • Display
  • Cursor
  • Height
  • Width
  • Text

Responsiveness (Web First)

We have four responsive breakpoints sm md lg xlg

Device WidthClass Prefix
576pxsm
768pxmd
992pxlg
1200pxxlg

Example:

<div class="sm-absolute">
  <div class="hidden md-visible">My device width is less than 768px</div>
  <div class="visible md-hidden">My device width is more than 768px</div>
</div>

References

https://zahinafsar.github.io/antd-css-utilities/utility.min.css

License

MIT

2.0.5

1 month ago

2.0.3

8 months ago

2.0.2

8 months ago

2.0.4

7 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago