We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems that implementation of input size attribute differs across browsers: inputs are narrower in Chrome than in Firefox and Safari:
input
size
↑ Input with size of 16, Chrome.
16
↑ The same field in Firefox.
This is probably caused by vague specification of HTML.
There is probably no pure HTML + CSS solution, CSS cannot apply the value of size attribute anywhere else than in content.
content
However, we can take the value of inputSize and pass it to CSS through a custom property. Setting a width should then be as easy as this:
inputSize
width: calc(1ch * var(--rui-local-input-size));
Or probably more purely:
width: var(--rui-local-input-size);
The text was updated successfully, but these errors were encountered:
Refactor form field sizes to use custom properties (#101)
eb3a800
Handle custom input size with CSS to fix different behaviour across b…
0f160f9
…rowsers (#101)
0138503
1751c26
2a3453d
0235204
adamkudrna
Successfully merging a pull request may close this issue.
Problem
It seems that implementation of
input
size
attribute differs across browsers:input
s are narrower in Chrome than in Firefox and Safari:↑ Input with
size
of16
, Chrome.↑ The same field in Firefox.
This is probably caused by vague specification of HTML.
Suggested Solution
There is probably no pure HTML + CSS solution, CSS cannot apply the value of
size
attribute anywhere else than incontent
.However, we can take the value of
inputSize
and pass it to CSS through a custom property. Setting a width should then be as easy as this:Or probably more purely:
The text was updated successfully, but these errors were encountered: