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

r-input gets too small to read on small screens (CSS issue) #11

Open
lrq3000 opened this issue Jan 4, 2021 · 0 comments
Open

r-input gets too small to read on small screens (CSS issue) #11

lrq3000 opened this issue Jan 4, 2021 · 0 comments

Comments

@lrq3000
Copy link

lrq3000 commented Jan 4, 2021

On small screens, the r-input component gets resized to a too small size to read. Strangely on iooxa.dev, the example r-input keeps its size, but I could not find any way to modify the CSS to force the r-input to do that.

Here is what it looks like, using the Chrome Web Development tools (F12):

r-input-too-small

I also tested on a phone and it's the same.

For the moment I could improve a bit the readability by increasing the font-size:

r-input, input, mwc-textfield, .mdc-floating-label, .mdc-floating-label--float-above, .mdc-text-field--filled {
    font-size: 130% !important;
}
body {
    --mdc-typography-subtitle1-font-size: 100%;
}

But I don't know why I can't modify other properties such as height or width, it seems that the CSS is bundled with the components javascript code so it's hard to change :-/

PS: Example code to reproduce the above page:

<script src="https://unpkg.com/@iooxa/article"></script>
<link rel="stylesheet" href="https://unpkg.com/@iooxa/article/dist/iooxa.css">

<div style="display: flex; flex-direction: column">
<r-var name="a" value="1" type="Number"></r-var>
<r-var name="b" value="10" type="Number"></r-var>
<r-var name="c" value="100" type="Number"></r-var>
<r-var name="sum" :value="a+b+c" type="Number"></r-var>
<r-var name="sumsquared" :value="sum**2" type="Number"></r-var>

<r-input label="a" :value="a" :change="{a: parseFloat(value)}"></r-input>
<r-input label="b" :value="b" :change="{b: parseFloat(value)}"></r-input>
<r-input label="c" :value="c" :change="{c: parseFloat(value)}"></r-input>
<r-input label="Sum" :value="sum" :change="{sum: value, a: value-b-c}"></r-input> <!-- Simply change one variable so that the input sum is correct -->
<r-input label="Sum squared" bind="sumsquared"></r-input>
</div>
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

No branches or pull requests

1 participant