Skip to content

Commit

Permalink
[#2] Add postcss-pxtorem
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuapease committed May 15, 2024
1 parent 1493ab1 commit 1f5529f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"devDependencies": {
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"postcss-pxtorem": "^6.1.0",
"tailwindcss": "^3.4.3",
"vite": "^5.2.0"
}
Expand Down
30 changes: 30 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,35 @@ export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
'postcss-pxtorem': {
rootValue: 16,
unitPrecision: 5,
propList: [
'font',
'font-size',
'line-height',
'letter-spacing',
'border*',
'background*',
'grid*',
'top',
'left',
'bottom',
'right',
'inset',
'width',
'height',
'margin*',
'padding*',
'max-*',
'min-*',
'gap*',
],
selectorBlackList: [],
replace: true,
mediaQuery: true,
minPixelValue: 0,
exclude: /node_modules/i,
}
}
}
2 changes: 1 addition & 1 deletion templates/index.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends '_layouts/base' %}

{% block content %}
<h1 class="text-xl text-red-300 m-10">Hello Viget Craft CMS Starter</h1>
<h1 class="text-xl text-red-300 m-[20px]">Hello Viget Craft CMS Starter</h1>
{% endblock %}

0 comments on commit 1f5529f

Please sign in to comment.