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

Input color and font-weight stylig is not applied #90

Open
MikolajKaminski opened this issue Dec 1, 2022 · 7 comments
Open

Input color and font-weight stylig is not applied #90

MikolajKaminski opened this issue Dec 1, 2022 · 7 comments

Comments

@MikolajKaminski
Copy link

MikolajKaminski commented Dec 1, 2022

I'm unable to style the input (specifically color and font-weight).

As can be seen on the images below. I do correctly set the --color and --item-font-weight variables, yet these are not applied to the actual input styles. I apply other styles too ie. --item-background and this one works, so I believe it is not an issue with my implemenation.

I worked my way around it using ::ng-deep, however it is not the desired solution as it is deprecated.

Correctly set variables.

Screenshot 2022-12-01 at 3 37 34 PM

Not applied to the input.

Screenshot 2022-12-01 at 3 43 14 PM

@AlexMiniApps
Copy link
Owner

@MikolajKaminski Hi. What the version of the code-input component do you use?

@MikolajKaminski
Copy link
Author

@MikolajKaminski Hi. What the version of the code-input component do you use?

@AlexMiniApps Lastest release - v1.6.0

@AlexMiniApps
Copy link
Owner

@MikolajKaminski it looks like you have incorrect styled the component, the styles have the different css paths:
image

@MikolajKaminski
Copy link
Author

That is because the style variables are applied to the code-input component, which then contains the input fields. As you can see on the bottom screenshot, the other variables are applied to the input, it's just the --color and --input-font-weight which are not passed through.

@MikolajKaminski
Copy link
Author

MikolajKaminski commented Dec 2, 2022

205296477-1d33a60a-d0a6-4c96-93ec-0e7ce6760017

@AlexMiniApps As you can see, the --item-background styling works well, so I do not expect this to be an issue with how I apply the styling.

@AlexMiniApps
Copy link
Owner

@MikolajKaminski ok. Please provide the SCSS source sample where you are styling the component for further research.

@MikolajKaminski
Copy link
Author

MikolajKaminski commented Dec 2, 2022

@AlexMiniApps Below is the styling I use for updating the code-input component

:host {
    --light-gray: #F4F4F4;
  
    --border-light-gray: 1px solid var(--light-gray);
    --border-gray: 1px solid #CAD4DA;
    --border-purple: 1px solid #5950ec;
}

code-input {
    --color: #0B2242;
    --item-font-weight: 500;
    --item-spacing: 1rem;
    --item-background: var(--light-gray);
    --item-height: 3.5rem;
    --item-border: var(--border-light-gray);
    --item-border-bottom: var(--border-light-gray);
    --item-border-has-value: var(--border-gray);
    --item-border-bottom-has-value: var(--border-gray);
    --item-border-focused: var(--border-purple);
    --item-border-bottom-focused: var(--border-purple);
    --item-shadow-focused: none;
    --item-border-radius: 0.625rem;
}

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

No branches or pull requests

2 participants