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

feat(react): allow dynamic inline styles #33

Open
castarco opened this issue Sep 4, 2023 · 4 comments
Open

feat(react): allow dynamic inline styles #33

castarco opened this issue Sep 4, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest For tasks eligible for Hacktoberfest participation react For React-related stuff

Comments

@castarco
Copy link
Contributor

castarco commented Sep 4, 2023

Allow dynamic inline styles, as they are quite useful when generating numeric values that can be predicted in advance (so we can't prepare specific CSS classes for them).

@castarco castarco added good first issue Good for newcomers help wanted Extra attention is needed enhancement New feature or request and removed help wanted Extra attention is needed labels Sep 4, 2023
@Sicolas-Flamel
Copy link

By allowing dynamic inline styles, you can generate styles directly in the HTML or code, making it more flexible to apply styles based on dynamic or computed values. This approach could potentially enhance the maintainability and readability of your code by keeping the style-related logic closer to where it's actually used.

Here's a simplified example of how dynamic inline styles might look in HTML and JavaScript:

const dynamicWidth = 200; // Computed or predicted width value
const dynamicHeight = 150; // Computed or predicted height value

document.getElementById("dynamicDiv").style.width = ${dynamicWidth}px;
document.getElementById("dynamicDiv").style.height = ${dynamicHeight}px;

@Shouvik11-b
Copy link

Can I take up this issue??

@castarco
Copy link
Contributor Author

castarco commented Sep 4, 2023

@Shouvik11-b feel free to take it! 😄 , it's always a pleasure to have some people jumping into the project.

Now I don't have much time to provide guidance, but I'll check in later and write something more in detail. In any case, I suspect you'll do fine 👍🏻 .

@castarco castarco added the react For React-related stuff label Sep 15, 2023
@castarco castarco changed the title feat: allow dynamic inline styles feat(react): allow dynamic inline styles Sep 15, 2023
@castarco castarco added the hacktoberfest For tasks eligible for Hacktoberfest participation label Sep 15, 2023
@castarco
Copy link
Contributor Author

Hi @Shouvik11-b, how are you doing with this one? Do you need any help/guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest For tasks eligible for Hacktoberfest participation react For React-related stuff
Projects
None yet
Development

No branches or pull requests

3 participants