Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is newest middleman-autoprefixer compatible with css grid?? #32

Closed
riiino opened this issue May 22, 2018 · 4 comments
Closed

Is newest middleman-autoprefixer compatible with css grid?? #32

riiino opened this issue May 22, 2018 · 4 comments

Comments

@riiino
Copy link

riiino commented May 22, 2018

I use autoprefixer with middleman. and I heard that now autoprefixer is compatible with css grid property and it need to be activated by adding "grid: true" or something.
but I'm not sure how. How should I write??

Here is my setting for autoprefixer in config.rb,

-------------------------------------------
activate :autoprefixer do |config|
  config.browsers = ['last 2 versions']
end
--------------------------------------------
@Calvett
Copy link

Calvett commented Jul 13, 2018

No, that i know but you can add it yourself.
ruby-2.4.1/gems/middleman-autoprefixer-2.9.0/lib/middleman-autoprefixer/extension.rb
Add this behind line "option :browsers, nil, 'Supported browsers'"
option :grid, true, 'Supported grid'
And then in:
@processor = ::AutoprefixerRails::Processor.new({
browsers: options[:browsers] && Array(options[:browsers]),
grid: options[:grid],
add: options[:add],
remove: options[:remove],
cascade: options[:cascade]
})
And in your config.rb file:

activate :autoprefixer do |prefix|
prefix.browsers = ['last 2 versions', 'Explorer >= 9']
prefix.grid = true
end

And there you have grid support ;)

@riiinoj
Copy link

riiinoj commented Oct 11, 2018

Thank you so much!
It worked.
I really hope that middleman-autoprefixer will compatible with css grid soon.

@tdreyno
Copy link
Member

tdreyno commented Oct 15, 2018

@Calvett Seems like a pretty straightforward PR that could be made to this repo. Are there other new Autoprefixer options that we're not forwarding?

tedw added a commit to tedw/middleman-autoprefixer that referenced this issue Nov 29, 2018
@bunnymatic
Copy link

Not sure how much of this is related but ai/autoprefixer-rails#194 just fixed an issue that was causing issues around grid-template-columns: 1fr 1fr 1fr 1fr;, so if #39 get's merged, you may find the support for grids will be restored.

@tdreyno tdreyno closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants