Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Updated gulp task to require Autoprefixer #46

Merged
merged 2 commits into from
Aug 21, 2018
Merged

Conversation

dainelmawer
Copy link

Fixes a problem where Autoprefixer is not run during the Gulp build task.
This issue was originally discovered after inspecting .min.css files in the dist folder.

@timwright12
Copy link
Contributor

@dainemawer please make sure this is updated in the plugin repo as well. Will merge after that.

@timwright12
Copy link
Contributor

@dainemawer I did a little digging and it looks like autoprefixer is included with the postcss-preset-env package we're using, so we may not need this. I did however run into a problem prefixing grid without calling autoprefixer specifically. Which properties were you noticing didn't prefix properly?

@dainelmawer
Copy link
Author

dainelmawer commented Aug 20, 2018

@timwright12 I tested with display:grid to start off with, which is where I originally discovered the issue. I tried the following now after removing the require('autoprexifer') from gulp-tasks/css.js

body {
  appearance: none;
  display: grid;
}

and the output is:

body{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:grid}

So looks like you are right, it's not working for grid

Copy link
Contributor

@timwright12 timwright12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making a note here that we need to update this to:

const cssOpts = {
		stage: 0,
		autoprefixer: {
			grid: true
		}
};

@dainelmawer
Copy link
Author

@timwright12 @magnificode PR updated with fix

@timwright12
Copy link
Contributor

@dainemawer This looks good, but make sure you sync this change in the plugin repo 10up/plugin-scaffold#48

We'll merge at the same time.

@dainelmawer
Copy link
Author

@timwright12 added PR for the plugin and tagged you

@timwright12 timwright12 merged commit bc81d33 into master Aug 21, 2018
@timwright12 timwright12 deleted the fix/autoprexifer branch August 21, 2018 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants