Comments (4)
Huh, I'm surprised this hasn't come up before.
Yeah, a temporary solution to this is to move the keyframes statement outside the defined area. But it would not be difficult to make the linter ignore keyframes. Just a matter of checking whether declaration nodes are a child of a keyframes at-rule.
PRs welcome, or I'll try to get around to it sometime soonish.
from postcss-bem-linter.
I apologize for forgetting about this issue. I will fix it very soon.
from postcss-bem-linter.
Also how do i make nested rules acceptable using the BEM preset? (see below)
Use weak mode: https://github.com/postcss/postcss-bem-linter#conformance-tests
The BEM linter preset doesn't seem to like css animation statements
As of 2.3.1 I've verified that @keyframes
selectors are ignored by this plugin.
Let me know if something still doesn't work as expected.
from postcss-bem-linter.
Hi, Am also seeing this problem. Have tried 2.3.1
and 2.6.0
but no joy.
Config:
/* postcss-bem-linter: define expandable-tree */
Selector
@keyframes expandable-tree__circleFadeDelay {
0%, 39%, 100% { opacity: 0; }
40% { opacity: 1; }
}
File
spinner.css
Using via webpack
postcss-config.js
var bemLinter = require('postcss-bem-linter')
var autoprefixer = require('autoprefixer')
module.exports = {
plugins: [
autoprefixer,
bemLinter('bem')
]
}
webpack config
...
module: {
loaders: [{
test: /\.css$/,
loaders: [
'style-loader',
'css-loader',
'postcss-loader'
],
},
...
package.json
...
"postcss-bem-linter": "^2.6.0",
"postcss-loader": "^1.3.0",
...
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0"
...
output:
WARNING in ./~/css-loader!./~/postcss-loader!./src/spinner.css
postcss-bem-linter: /Users/richardc/dev/react-organisation-nav/src/spinner.css:137:3: Invalid component selector "40%"
@ ./src/spinner.css 4:14-120
@ ./src/nav.jsx
@ ./index.jsx
@ multi (webpack)-dev-server/client?http://localhost:8080 ../index.jsx
from postcss-bem-linter.
Related Issues (20)
- Allow chaining BEM modifiers
- Please print expected selector in error message HOT 2
- Is there an online playground to try this to validate some BEM code? HOT 1
- Cannot get the plugin to log an error HOT 5
- Node#moveTo was deprecated. Use Container#append
- Add support for different types of components
- Issue with prepending selectors (separated by whitespace) HOT 10
- Clarify usage of initial vs combined HOT 2
- Does not work with Sass interpolation HOT 5
- How to configure it inside a postcss.config.js HOT 3
- Components not linted if no immediate rule HOT 2
- Implicit component file name customisation HOT 2
- valid component selectors detected as invalid, and reported line numbers are also incorrect. HOT 2
- Ability to have a themed component HOT 5
- Nested multiple definitions HOT 2
- Concise & verbose comment syntax for "weak" not fully working? HOT 1
- How check bem?
- Namespaces are confused as selectors
- Question: how to ignore not-pseudo class
- [4.0.0] `implicitComponents` in conjunction with a custom `componentName` pattern causes error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-bem-linter.