scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
162 stars 29 forks source link

Added font weight #530

Closed Nj221102 closed 7 months ago

Nj221102 commented 7 months ago

Description

I have added the functionality of using font- weight in para -> #471

Shoes.app do
    para "This is normal"  

    para "This is bolder" , font_weight: "bold"

    para "This is a little less bold" , font_weight: 800

    para "This is bolder than the last one " , font_weight: 700

    para "Close to normal "  , font_weight: 300

  end

Image(if needed, helps for a faster review)

Screenshot 2024-01-29 at 6 34 17 PM

Checklist

noahgibbs commented 7 months ago

This looks really good! You can technically just do "props['font_weight']" to get the "or nil" effect rather than using a ternary question-mark-colon operator. But this is good :-)

Pavan-Nambi commented 7 months ago

is it supposed to be :weight or :font-weight ok? i mean ig acc to manual it's weight ig?

Nj221102 commented 7 months ago

This looks really good! You can technically just do "props['font_weight']" to get the "or nil" effect rather than using a ternary question-mark-colon operator. But this is good :-)

Thanks for the compliment, should I remove the ternary operator or leave it as it is?

noahgibbs commented 7 months ago

I'm fine with leaving it as-is. You'll need to run "rake test:regenerate_html_fixtures" though -- you added an example and it doesn't have fixture output yet. That's why the test failed above. I'll file a bug to give a better error message when that happens because there's a new example.

Nj221102 commented 7 months ago

I'm fine with leaving it as-is. You'll need to run "rake test:regenerate_html_fixtures" though -- you added an example and it doesn't have fixture output yet. That's why the test failed above. I'll file a bug to give a better error message when that happens because there's a new example.

Have made the requested changes, is it good now.

noahgibbs commented 7 months ago

Thanks! Merged.