Skip to content

Commit

Permalink
Merge pull request #1 from vinkashq/container
Browse files Browse the repository at this point in the history
DEV: add custom container config map
  • Loading branch information
vinothkannans authored Nov 28, 2024
2 parents bb0fdc6 + db62083 commit 25d3dec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vinkas/tailwindcss",
"version": "0.0.5",
"version": "0.0.6",
"description": "Tailwind CSS plugin for Vinkas",
"main": "src/index.js",
"publishConfig": {
Expand Down
11 changes: 11 additions & 0 deletions src/config/container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
center: true,
padding: {
DEFAULT: '1rem',
sm: '2rem',
md: '3rem',
lg: '4rem',
xl: '5rem',
'2xl': '6rem',
},
};
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const colorUtilities = require('./utilities/colors')
module.exports = plugin(
function ({ addUtilities, matchUtilities, theme }) {
addUtilities({
'.container': {
'@apply mx-auto': {},
},
...require('./utilities/buttons'),
...colorUtilities(theme('colors')),
})
Expand Down Expand Up @@ -42,3 +39,4 @@ module.exports = plugin(

module.exports.vinkasColors = require('./colors/vinkas');
module.exports.singfuseColors = require('./colors/singfuse');
module.exports.containerConfig = require('./config/container');
17 changes: 0 additions & 17 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ const config = {
plugins: [plugin],
};

let containerExpected = `
.container {
margin-left: auto;
margin-right: auto
}
`

it('container', () => {
config.content[0].raw = "container"
let utilitiesCSS = postcss([require("tailwindcss")(config)]).process(
"@tailwind utilities",
{ from: undefined }
).then(({ css }) => {
expect(css).toBe(containerExpected.trim())
})
})

let rowExpected = `
.row-0 {
padding-top: 0px;
Expand Down

0 comments on commit 25d3dec

Please sign in to comment.