Closed aimuzov closed 9 years ago
@Immuzov Can you try running postcss-bem-linter before postcss-import, and see what happens? Same thing?
Before postcss-import – not work (no errors). Compiled css:
html {
height: 100%;
}
body {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
margin: 0;
width: 100%;
}
body {
background-color: white;
font-family: 'Roboto';
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Roboto Condensed';
}
/** @define Pagetest */
.Page {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
width: 100%;
}
.Page--withPlugger {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.Page-plugger {
text-align: center;
}
/* @end */
After postcss-import (same errors, any order):
1:1 >> Invalid component selector "html" [postcss-bem-linter]
5:1 >> Invalid component selector "body" [postcss-bem-linter]
1:1 >> Invalid component selector "body" [postcss-bem-linter]
6:1 >> Invalid component selector ":--heading" [postcss-bem-linter]
2:1 >> Invalid component selector ".Page" [postcss-bem-linter]
7:2 >> Invalid component selector "&--withPlugger" [postcss-bem-linter]
12:2 >> Invalid component selector "&-plugger" [postcss-bem-linter]
When I tried the following CSS, the test passed:
html {
height: 100%;
}
body {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
margin: 0;
width: 100%;
}
body {
background-color: white;
font-family: 'Roboto';
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Roboto Condensed';
}
/** @define Page */
.Page {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
width: 100%;
}
.Page--withPlugger {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.Page-plugger {
text-align: center;
}
/* @end */
That suggests to me that you have something else going on. Have you tried systematically eliminating plugins to see if the removal of any of them fixes the problem?
Otherwise, since the tests pass here, all I can think of is that you could post your exact files in a gist, and I could try the whole build process locally.
Any input on this @Immuzov? If not, I may close this, since I can't reproduce your problem.
My gulp task:
My page.css (this file imported to main.css):
My main.css:
Other css file not contain @define directive.
Error:
compiled css:
Sorry for my bad english.