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

Add SVG opacity properties as exceptions to alpha-value-notation #257

Closed
Mouvedia opened this issue Aug 11, 2022 · 6 comments · Fixed by #258
Closed

Add SVG opacity properties as exceptions to alpha-value-notation #257

Mouvedia opened this issue Aug 11, 2022 · 6 comments · Fixed by #258
Labels
status: blocked is blocked by another issue or pr

Comments

@Mouvedia
Copy link
Member

Mouvedia commented Aug 11, 2022

What steps are needed to reproduce the bug?

use one of these SVG properties:

ref w3c/csswg-drafts#3342

What did you expect to happen?

to be exceptions as well

What actually happened?

ref #210
see also https://test.csswg.org/harness/details/css-color-3_dev/opacity-computed/

@jeddy3 jeddy3 changed the title The default of alpha-value-notation should be number or we should add all the exceptions necessary Add SVG opacity properties as exceptions to alpha-value-notation Aug 15, 2022
@jeddy3 jeddy3 added status: blocked is blocked by another issue or pr type: enhancement labels Aug 15, 2022
@jeddy3
Copy link
Member

jeddy3 commented Aug 15, 2022

@Mouvedia Thanks for the issue and for providing all the references.

The rule currently only checks the opacity and shape-image-threshold. We can add the properties above to the rule and then as exceptions here in the config.

Do you want to open a false negatives issue for the properties above in Stylelint?

@Mouvedia
Copy link
Member Author

Do you want to open a false negatives issue for the properties above in Stylelint?

If both releases of stylelint-config-standard and stylelint are synchronized, yes.
Else Id prefer if the exceptions were added beforehand—even if they are inactive for a short while.

@jeddy3
Copy link
Member

jeddy3 commented Aug 16, 2022

If both releases of stylelint-config-standard and stylelint are synchronized, yes.

Yes, they're synced. We do new releases of the configs, if we make any changes to Stylelint that impact either of them.

@Mouvedia
Copy link
Member Author

Yes, they're synced.

Alright then. Ill either open an issue or a PR.

@Mouvedia
Copy link
Member Author

Do we really want to have 5 exceptions out of 6 properties targetted?
i.e. it only prefers percentage for shape-image-threshold

		'alpha-value-notation': [
			'percentage',
			{
				exceptProperties: [
                	'opacity', 
                	'fill-opacity',
                	'flood-opacity',
                	'stop-opacity',
                	'stroke-opacity',
               ],
			},
		],

I think the saner option should be to just pick number as the default.
When it's 5 out of 6 it's not really exceptions anymore…
@jeddy3 @ntwb

@jeddy3
Copy link
Member

jeddy3 commented Aug 19, 2022

We can remove each exception when it has fuller browser support. Percentages feel more natural, especially in colours, e.g. hsl(0deg 100% 50% / 25%), which I assume is why they've often been used in graphics apps and been added to the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked is blocked by another issue or pr
Development

Successfully merging a pull request may close this issue.

2 participants