-
Notifications
You must be signed in to change notification settings - Fork 28
Add out-of-the-box support for PostCSS #46
Comments
By the way you can already add Autoprefixer support with an hook we made at @smclab. |
Thanks for the reference, @yuchi! Added this to the list on top! 👏 |
#83 is preventing PostCSS from generating Sourcemaps. |
@sbaechler That’s a very nice suggestion. I created an issue to track it down. PS: If you could use those hooks we would be very happy to have some feedback. PPS: You gained a follower given your last weeks of issue contributing here :) Will you be at DEVCON this year? |
@yuchi I created my own hooks before I saw yours. Those are mine:
I am using another temporary build folder since I had problems using the same folder as source and dest. I think it would be quite easy to add PostCSS to the liferay-theme-tasks. This would also allow the developers to customise Of course PPS: Sorry, currently I cannot attend any conferences. |
@jbalsas How do we pass options to autoprefixer? It doesn't seem like the code allows for this because the postcss option is expecting an array of strings. autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}) |
@protoEvangelion |
@sbaechler will it do that automatically now? |
Hey @protoEvangelion, as @sbaechler mentions, the recommended way to configure browsers is through the I just created a new theme using the {
"browserslist": ["last 4 version"],
...
"liferayTheme": {
"baseTheme": "styled",
"postcss": [
"autoprefixer"
],
"screenshot": "",
"rubySass": false,
"templateLanguage": "ftl",
"version": "7.1"
},
...
} I can assert that this successfully gets processed by /* _custom.scss */
.example {
display: grid;
transition: all .5s;
user-select: none;
background: linear-gradient(to bottom, white, black);
}
/* main.css */
.example {
display: grid;
-webkit-transition: all .5s;
-o-transition: all .5s;
transition: all .5s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));
background: -webkit-linear-gradient(top, white, black);
background: -o-linear-gradient(top, white, black);
background: linear-gradient(to bottom, white, black); } As for other options, the current logic only accepts a list of plugin names. I've created #126 to make this possible. Would you mind chiming in there to see if that would address your issue? Thanks! |
@jbalsas Could you also check if |
I can confirm |
From use autoprefixer for css and sass by @marcelmokos and Apply postcss during build of a Liferay 7 theme by @caneta
References on current approach:
The text was updated successfully, but these errors were encountered: