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

Stop property-sort-order and no-value-vendor-prefix from throwing with css variables #1225

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

justinanastos
Copy link

What do the changes you have made achieve?

Prevent the property-sort-order from throwing errors when css variables are present

Are there any new warning messages?

No

Have you written tests?

I haven't added a new test, but I've added css variable declarations to the test file to show it throwing before the fix and not throwing after.

Have you included relevant documentation

N/A

Which issues does this resolve?

Fixes #1224

DCO 1.1 Signed-off-by: Justin Anastos <justin.anastos@gmail.com>

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 97.533% when pulling abbbbe1 on justinanastos:fix/1224/property-sort-order-throwing-css-variables into be43c0b on sasstools:develop.

@coveralls
Copy link

coveralls commented Oct 11, 2018

Coverage Status

Coverage increased (+0.005%) to 97.535% when pulling 13ed733 on justinanastos:fix/1224/property-sort-order-throwing-css-variables into be43c0b on sasstools:develop.

@justinanastos justinanastos changed the title Stop property-sort-order from throwing with css variables Stop property-sort-order and no-value-vendor-prefix from throwing with css variables Oct 11, 2018
@wesleycoder
Copy link

Please merge this ASAP. This is blocking me from integrating sass-lint on our workflow...

@Alonski
Copy link

Alonski commented Jun 9, 2019

I would also like this merged :)

@TheJaredWilcurt
Copy link

@justinanastos there is a merge conflict.

@DanPurdy is there additional effort or comments to be made on this PR beyond the merge conflict?

@@ -1,4 +1,5 @@
.foo
--css-variable: 100vh;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--css-variable: 100vh;
--css-variable: 100vh

@CodeByAlex
Copy link

Is there anything holding this up from being merged other than the conflict?

@@ -99,8 +99,14 @@ module.exports = {

if (block) {
block.forEach('declaration', function (dec) {
var prop = dec.first('property'),
name = prop.first('ident');
var prop = dec.first('property');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var prop = dec.first('property');
var prop = dec.first('property') || dec.first('customProperty');

from #1207

return;
}

var name = prop.first('ident');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var name = prop.first('ident');
var name;
if (typeof(prop.first) === 'function') {
name = prop.first('ident');
}

abrom added a commit to Studiosity/sass-lint that referenced this pull request Aug 3, 2023
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 this pull request may close these issues.

property-sort-order and no-value-vendor-prefix throw when css variables are in use
6 participants