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

Autoprefixing Flexbox #25

Closed
arecvlohe opened this issue Sep 10, 2015 · 8 comments
Closed

Autoprefixing Flexbox #25

arecvlohe opened this issue Sep 10, 2015 · 8 comments

Comments

@arecvlohe
Copy link

My error is below. It is telling me to write display: flex as opposed to display: box. I am not writing display: box in my styl but when I output my file into the builds directory in css one of the autoprefixers is display: box. Below is also my gulp task for stylus, my css, and the console error.

CSS (final output)

header {
height: 100vh;
background: url("/images/bigfoot.jpg") center/cover fixed;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: box;
display: flex;

STYL (gulp task)

var prefixer = 'autoprefixer-stylus'

gulp.task 'stylus', ->
gulp.src 'src/styles/main.styl'
.pipe plumber()
.pipe stylus(
import: [
'nib'
]
use: [
nib(),
prefixer(versions, {cascade: true})
]
)
.pipe gulp.dest paths.output + '/css'
.pipe connect.reload()

ERROR

{ type: 'warning',
text: 'You should write display: flex by final spec instead of display: box',
node:
{ type: 'decl',
parent:
{ nodes: [Object],
type: 'rule',
parent: [Object],
source: [Object],
before: '\n',
between: ' ',
selector: 'footer',
semicolon: true,
after: '\n',
lastEach: 9,
indexes: {},
_autoprefixerDisabled: false,
_autoprefixerPrefix: false },
source: { start: [Object], input: [Object], end: [Object] },
before: '\n ',
prop: 'display',
between: ': ',
value: 'box',
_autoprefixerDisabled: false },

@ai
Copy link

ai commented Sep 10, 2015

I think error message is very clear: "You should write display: flex by final spec instead of display: box".

@arecvlohe
Copy link
Author

In my stylus file I am not writing display: box, I am writing display: flex, but the output to my css file is display:box along with other prefixers, which I am pretty sure autoprefixer is adding.

@ai
Copy link

ai commented Sep 10, 2015

@avecvlohe there is no such thing as display: box. Use display: flex.

@arecvlohe
Copy link
Author

in my stylus file i am putting flex:box but in my output css file it puts flex:box along with other prefixes. does that make sense?

@arecvlohe
Copy link
Author

i mean i am putting display:flex, my output in css there is display: box, along with other prefixes

@ai
Copy link

ai commented Sep 10, 2015

@arecvlohe check other libraries, which eecuting before Autoprefixer. Maybe you have some Stylus mixins like nib?

@arecvlohe
Copy link
Author

@ai
Thanks for the advice! The problem was with nib, as seen here: stylus/nib#312

@jescalan
Copy link
Owner

👍 thanks for taking care of this @ai

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

3 participants