add plugins for tailwindcss
This commit is contained in:
parent
cae4f74f6c
commit
6f6d64b065
15
packages/tailwind/package.json
Normal file
15
packages/tailwind/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@kevisual/tailwind",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"files": [
|
||||
"plugins"
|
||||
],
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
26
packages/tailwind/plugins/flex.js
Normal file
26
packages/tailwind/plugins/flex.js
Normal file
@ -0,0 +1,26 @@
|
||||
const plugin = require('tailwindcss/plugin');
|
||||
|
||||
const flexCenterBaseStyles = {
|
||||
display: 'flex',
|
||||
'justify-content': 'center',
|
||||
'align-items': 'center',
|
||||
};
|
||||
|
||||
/** flex 居中 */
|
||||
const flexCenter = plugin(function ({ addUtilities }) {
|
||||
addUtilities({
|
||||
/** flex 居中 */
|
||||
'.flex-row-center': flexCenterBaseStyles,
|
||||
'.flex-col-center': { ...flexCenterBaseStyles, 'flex-direction': 'column' },
|
||||
'.layout-menu': {},
|
||||
'.scrollbar': {},
|
||||
'.card': {},
|
||||
'.card-title': {},
|
||||
'.card-subtitle': {},
|
||||
'.card-body': {},
|
||||
'.card-footer': {},
|
||||
'.card-key': {},
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = flexCenter;
|
Loading…
x
Reference in New Issue
Block a user