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

Term 'element' in 'content' value gets parsed #1387

Closed
patric-eberle opened this issue Jan 20, 2021 · 4 comments · Fixed by #1414
Closed

Term 'element' in 'content' value gets parsed #1387

patric-eberle opened this issue Jan 20, 2021 · 4 comments · Fixed by #1414

Comments

@patric-eberle
Copy link

Version: 10.2.3

If I use the word 'element' in a string value for 'content', the word will be prefixed.

    content: "Element 'div' not allowed as child of element 'span' in this context.";
  content: "Attribute width not allowed on -moz-element picture at this point.";
  content: "Attribute width not allowed on element picture at this point.";

The same output as input would be expected in this case.

  "browserslist": [
    "> 2%",
    "last 2 years",
    "ie 11",
    "not ie_mob > 0",
    "not dead"
  ]
├── autoprefixer@10.2.3 
└─┬ stylelint@13.9.0
  └── autoprefixer@9.8.6 
@ai
Copy link
Member

ai commented Jan 20, 2021

Show me minimum CSS input, current output, and expected output

@patric-eberle
Copy link
Author

Actually the ones I've posted above:

Input

.foo {
  content: "Element 'div' not allowed as child of element 'span' in this context.";
}

Current output

.foo {
  content: "Attribute width not allowed on -moz-element picture at this point.";
  content: "Attribute width not allowed on element picture at this point.";
}

Expected output

.foo {
  content: "Element 'div' not allowed as child of element 'span' in this context.";
}

@ai
Copy link
Member

ai commented Jan 20, 2021

Got it. It is rare to see text in CSS so it was not obvious to me that it was CSS.

Do you want to send PR with a fix (I am busy on another open-source project)? You need to add tests and add the code to processors.js to ignore any value processors for the content property.

@ai
Copy link
Member

ai commented Jul 12, 2021

The fix was released in 10.3.1.

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

Successfully merging a pull request may close this issue.

2 participants