How do you make responsive text? I mean, do you use a font-size relative to the viewport width like font size: 5vw? or do you set the font size on each brackpoint?
Ali Sariyer
@alisariyerAll comments
- @cervantesdeveloperSubmitted over 2 years ago@alisariyerPosted over 2 years ago
Hi Victor,
Nice work. I use this technic for responsive font:
- Use a variable as --rem: 1rem in :root or html selector
- For any element you can use like: h1: { font-size: calc( var(--rem) * 1.4 ); } p: { font-size: var(--rem);}
- In media query: @media (min-width: 576px) { :root{ --rem: 1.1rem; } } So you can use this technic by changing variable value only. I hope it will be useful for you.
Have a nice coding :)
Marked as helpful1 - @josephe44Submitted over 2 years ago
I had issues on the custom button and am yet to figure it out. Also setting the value to .toFixed(2) always return a string not a number, if you have better way, you could tell me? Also when I resolve the custom input, i would be moving the state to context, in other to manage my state properly and make my code cleaner.
thank you, your feedback will be great
@alisariyerPosted over 2 years agoHi Josephe,
I hope you're fine,
You have a good work Josephe. I spent a little time for your bugs, I used your tip state callback inside handleCustomTip and used also parseFloat(({your calculation}).toFixed(2)) to fix string issue. You can always enhance your codes. So I opened a pull request on GitHub, you can observe my code changings in TipCalculForm.jsx file on your GitHub repository. If you like, you can merge. I hope these will help you.
Have a nice coding!
0 - @dominikapapSubmitted over 2 years ago
I spend a lot of time on image hover effect, couldn't get two elements to have different opacity, is there a better solution?
@alisariyerPosted over 2 years agoHi Dominika,
About your question, I made a pull request on GitHub for your problem about hover.
I found a solution for your problem as removing a element, and put svg into overlay container. So not need #image positioning. I hope it will help.
Marked as helpful0