Update SizeWithUnit.parseStringSize to allow 'initial' and 'auto'
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
I have a javascript function that directly modifies element element CSS styles. If I set the width or height to 'initial', Vaadin throws an error when reading the element.
The initial and auto incoming values can be simply replaced with an empty string. The empty string is allowed in the SharedUtil.SIZE_PATTERN regex and has the same effect.
I will submit a fix, but I want make sure there is no disagreement.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SizeWithUnit.parseStringSize and inspect how it uses SharedUtil.SIZE_PATTERN when reading width or height values. Verify handling for the incoming values 'initial' and 'auto', then confirm parsing no longer throws and that the resulting value has the same effect as an empty string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100