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

Clip Bug #375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Clip Bug #375

wants to merge 1 commit into from

Conversation

RichardCox09
Copy link

@RichardCox09 RichardCox09 commented Aug 11, 2022

Consider the following example:

.foo{
  position : absolute;
  clip : rect(0,0,0,0);
}

Without my change, the validator threw and exception that there were too few arguments for the function.

@ylafon
Copy link
Member

ylafon commented Aug 22, 2022

The example you give is not throwing an exception, at least not on https://jigsaw.w3.org/css-validator/#validate_by_input
DO you have ways of reproducing this?

@RichardCox09
Copy link
Author

Hello,

first of all, sorry for taking so long to reply, I must have overread your comment.

Yes, you are totally right, the web-validator doesn't throw an exception.

BUT: If you try to validate it with the Java source code, it throws an exception.
If you don't set the Medium of the ApplContext (ApplContext.setMedium()), it throws the Exception.

The exception comes from CssParser Line 6157, where it says
if (!values.end() && ac.getMedium() == null) { addError(new InvalidParamException("unrecognize", "", ac), values);

If you don't set the meidum, it is null, and the if is true, so it adds an error.

My suspicion is that the web-validator has set a medium, could that be?

I hope this helps with recreating the problem.

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.

2 participants