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

<vaadin-input-container>: vaadin-input-field-value-font-weight is kaput #7957

Open
anezthes opened this issue Oct 9, 2024 · 2 comments · May be fixed by #8141
Open

<vaadin-input-container>: vaadin-input-field-value-font-weight is kaput #7957

anezthes opened this issue Oct 9, 2024 · 2 comments · May be fixed by #8141
Assignees
Labels

Comments

@anezthes
Copy link
Contributor

anezthes commented Oct 9, 2024

Description

vaadin-input-field-value-font-weight doesn't work; changing its value has no effect on the input element's font weight.

Expected outcome

Changing the value of vaadin-input-field-value-font-weight should alter the font weight of the input element. However, no visible change occurs, and the font weight remains unaffected.

Minimal reproducible example

html {
  vaadin-input-field-value-font-weight: 700;
}

Steps to reproduce

  1. Go to https://vaadin.com/docs/latest/components/text-field
  2. Open up the inspection tools
  3. Paste vaadin-input-field-value-font-weight: 700; into the element style of vaadin-text-field

Environment

Vaadin version(s): 24.5
OS: macOS Sequoia

Browsers

All of them

@web-padawan web-padawan added bug Something isn't working theme labels Oct 9, 2024
@web-padawan
Copy link
Member

The style is overridden here and this style on vaadin-input-container takes precedence over the one defined on the host element (in this case vaadin-text-field). IMO we should move the custom property to be used here instead:

@TatuLund
Copy link
Contributor

I noticed the same today.

One can add styles like this in project to patch it

vaadin-text-area > textarea {
   font-weight: var(--vaadin-input-field-value-font-weight);
}

vaadin-text-field > input {
   font-weight: --vaadin-input-field-value-font-weight;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants