Coder Social home page Coder Social logo

Comments (4)

davidtheclark avatar davidtheclark commented on June 8, 2024

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.

davidtheclark avatar davidtheclark commented on June 8, 2024

I apologize for forgetting about this issue. I will fix it very soon.

from postcss-bem-linter.

davidtheclark avatar davidtheclark commented on June 8, 2024

@KingScooty:

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.

fauna5 avatar fauna5 commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.