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

Conditional inline styling #134

Open
ramiroaisen opened this issue Sep 3, 2019 · 1 comment
Open

Conditional inline styling #134

ramiroaisen opened this issue Sep 3, 2019 · 1 comment
Labels
bits and pieces Small bug fixes and enhancements pending Waiting for more information

Comments

@ramiroaisen
Copy link

ramiroaisen commented Sep 3, 2019

It will be better to put --css-vars in conditional styles like style={someprop is defined ? "--css-var: ${someprop}" : ""} insted of style="--css-var: {someprop}"`

this way you doesnt need to put !important if you do

.some-component{
  color: #fff:
}
@ramiroaisen ramiroaisen changed the title Avoid inline styles Conditional inline styling Sep 4, 2019
@Vehmloewff
Copy link
Member

Thanks for the issue @ramaisen!

Just to be clear, are you thinking about something like this?

@Vehmloewff Vehmloewff added pending Waiting for more information bits and pieces Small bug fixes and enhancements labels Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bits and pieces Small bug fixes and enhancements pending Waiting for more information
Projects
None yet
Development

No branches or pull requests

2 participants