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

how to change thaw component text size? #85

Closed
skydig opened this issue Jan 17, 2024 · 10 comments
Closed

how to change thaw component text size? #85

skydig opened this issue Jan 17, 2024 · 10 comments

Comments

@skydig
Copy link

skydig commented Jan 17, 2024

image
like above picture,
how can I change calendar font size just like 2024-01-17(smaller) which I have modified using class?
thanks.

@luoxiaozero
Copy link
Collaborator

If you want to change the popup style of all date picker components, you can add a class to override it.

If you want to change only the popup style of the specified date picker component, I can add a popup_class attribute to the date picker component.

@skydig
Copy link
Author

skydig commented Jan 18, 2024

the quick solution is to" change the popup style of all date picker components", could you give me a class override example? I can try it.
thanks in advance.

@luoxiaozero
Copy link
Collaborator

Add the following classes.

.thaw-date-picker-panel {
    font-size: 12px;
}

@skydig
Copy link
Author

skydig commented Jan 18, 2024

image
it really can work, but the panel position is strange just live above picture.

and date panel can work too, the panel can appear but disappear quickly and date can not be selected?

I use leptos_meta style grammer as following, don't know it's correct or not.
image

@luoxiaozero
Copy link
Collaborator

Try it like this.

<Style>
".font-normal { font-weight: 400; font-size: 0.75rem; }"
".thaw-time-picker-panel, .thaw-date-picker-panel { font-size: 0.75rem; }"
</Style>
"date"
<DatePicker class="font-normal" value=date_value/>
"time"
<TimePicker class="font-normal" value=time_value />

@skydig
Copy link
Author

skydig commented Jan 18, 2024

Try it like this.

<Style>
".font-normal { font-weight: 400; font-size: 0.75rem; }"
".thaw-time-picker-panel, .thaw-date-picker-panel { font-size: 0.75rem; }"
</Style>
"date"
<DatePicker class="font-normal" value=date_value/>
"time"
<TimePicker class="font-normal" value=time_value />

thanks,it really work, I don't know why it's class="font-normal", but it really work,

sorry again,
I add button color class as follwing picture, but why the button color keep as default(not changed)?
image

and using .thaw-alert__content, .thaw-alert__header to change alert component font size seem not work( only header font size can change?)

@luoxiaozero
Copy link
Collaborator

luoxiaozero commented Jan 18, 2024

There should be style overwriting due to css priority issues.

@skydig
Copy link
Author

skydig commented Jan 19, 2024

There should be style overwriting due to css priority issues.

is there temporary solution or it's application leptos issue?

@luoxiaozero
Copy link
Collaborator

luoxiaozero commented Jan 20, 2024

I add button color class as follwing picture, but why the button color keep as default(not changed)?

Try this.

<Style>
".my-button.thaw-button { background-color: #04AA6D; }"
</Style>
<Button class="my-button">"next"</Button>

and using .thaw-alert__content, .thaw-alert__header to change alert component font size seem not work( only header font size can change?)

I guess it is a css priority issue, which can be solved by adding !important.

@skydig
Copy link
Author

skydig commented Jan 22, 2024

splendid! your important solution can work
thanks!

@skydig skydig closed this as completed Jan 22, 2024
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

2 participants