Skip to content

Commit

Permalink
style(element-plus): add custom global css to cover tailwindcss
Browse files Browse the repository at this point in the history
  • Loading branch information
YDKD committed Apr 12, 2022
1 parent ee09c66 commit 1795c3b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import 'normalize.css'

import '@purge-icons/generated'

// import global css
import '@/styles/index.less'

import './assets/css/index.less'
import './assets/css/tailwind.css'

// import global css
import '@/styles/index.less'

import router from './router'
import { setupStore } from './store'

Expand Down
3 changes: 3 additions & 0 deletions src/styles/element-plus.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.el-button {
background-color: var(--el-button-bg-color, var(--el-color-white));
}
14 changes: 7 additions & 7 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module.exports = {
extend: {}
},
plugins: [
function ({ addBase }) {
addBase({
'.el-button': {
'background-color': 'var(--el-button-bg-color, var(--el-color-white))'
}
})
}
// function ({ addBase }) {
// addBase({
// '.el-button': {
// 'background-color': 'var(--el-button-bg-color, var(--el-color-white))'
// }
// })
// }
]
}

0 comments on commit 1795c3b

Please sign in to comment.